{"id":40376,"date":"2016-09-04T14:10:52","date_gmt":"2016-09-04T13:10:52","guid":{"rendered":"https:\/\/www.xjtag.com\/example-xjease-code\/"},"modified":"2023-03-27T12:09:39","modified_gmt":"2023-03-27T11:09:39","slug":"example-xjease-code","status":"publish","type":"page","link":"https:\/\/www.xjtag.com\/ja\/example-xjease-code\/","title":{"rendered":"XJEase \u30b3\u30fc\u30c9\u4f8b"},"content":{"rendered":"<p>XJTAG\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5185\u306b\u3042\u308b<a href=\"https:\/\/www.xjtag.com\/ja\/products\/software\/xjdeveloper\/#library\">XJEase library<\/a>\u306b\u306f\u3001\u6b86\u3069\u306e\u90e8\u54c1\u306b\u30de\u30c3\u30c1\u3059\u308b<a href=\"https:\/\/www.xjtag.com\/ja\/products\/software\/xjdeveloper\/#xjease\">XJEase<\/a>\u30c7\u30d0\u30a4\u30b9\u30d5\u30a1\u30a4\u30eb\u304c\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3067\u63d0\u4f9b\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>XJEase\u81ea\u4f53\u306f\u5b66\u7fd2\u304c\u5bb9\u6613\u306a\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3067\u3042\u308a\u3001<a href=\"https:\/\/www.xjtag.com\/ja\/products\/software\/xjdeveloper\/\">XJDeveloper<\/a>\u304b\u3089\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30c7\u30d0\u30a4\u30b9\u30e2\u30c7\u30eb\u3092\u8868\u793a\u307e\u305f\u306f\u7de8\u96c6\u3057\u3066\u3001\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u305f\u308a\u3001\u65b0\u3057\u3044\u30c7\u30d0\u30a4\u30b9\u7528\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306f\u3001\u3044\u304f\u3064\u304b\u306e\u5358\u7d14\u306aXJEase\u306e\u4f8b\u3067\u3059\u3002<\/p>\n<p>XJDeveloper\u3067\u306f\u3001\u30c6\u30b9\u30c8\u30c7\u30d0\u30a4\u30b9\u30d5\u30a1\u30a4\u30eb\u753b\u9762\u3092\u4f7f\u7528\u3057\u3066\u3001\u30c7\u30d0\u30a4\u30b9\u3054\u3068\u306eXJEase\u30b3\u30fc\u30c9\u3092\u8868\u793a\u307e\u305f\u306f\u7de8\u96c6\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u30e1\u30e2\u30ea\u30c7\u30d0\u30a4\u30b9\u306e\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8\u306e\u3088\u3046\u306b\u8907\u6570\u306e\u30d0\u30b9\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4e00\u90e8\u306e\u30d0\u30b9\uff08nWE\u306a\u3069\uff09\u306f\u5358\u4e00\u30d4\u30f3\u3067\u3059\u304c\u3001\u30a2\u30c9\u30ec\u30b9\u30d0\u30b9\u3068\u30c7\u30fc\u30bf\u30d0\u30b9\u306b\u306f\u591a\u304f\u306e\u30d4\u30f3\u304c\u3042\u308a\u307e\u3059\u3002 \u5404\u30d4\u30f3\u306f\u3001\u30c6\u30b9\u30c8\u5bfe\u8c61\u30c7\u30d0\u30a4\u30b9\u306e\u30d4\u30f3\u756a\u53f7\u3067\u3042\u308a\u3001\u30c7\u30fc\u30bf\u30b7\u30fc\u30c8\u304b\u3089\u53d6\u5f97\u3055\u308c\u307e\u3059\u3002 \u3053\u308c\u306f\u300c\u30c7\u30d0\u30a4\u30b9\u30bb\u30f3\u30c8\u30ea\u30c3\u30af\u300d\u306a\u30d5\u30a1\u30a4\u30eb\u3067\u3059\u3002\u30c7\u30d0\u30a4\u30b9\u304c\u5b9f\u88c5\u3055\u308c\u308b\u56de\u8def\u306b\u4f9d\u5b58\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u56fa\u6709\u306e\u30c7\u30d0\u30a4\u30b9\u3092\u53c2\u7167\u3057\u307e\u3059\u3002\u3064\u307e\u308a\u3001\u30c7\u30d0\u30a4\u30b9\u304c\u5225\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u4f7f\u7528\u3055\u308c\u308b\u5834\u5408\u3067\u3082\u3001\u30d5\u30a1\u30a4\u30eb\u306f\u518d\u5229\u7528\u3055\u308c\u307e\u3059\u3002<\/p>\n<div align=\"center\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-30131\" style=\"width: 100%; max-width: 607px; height: auto;\" src=\"https:\/\/www.xjtag.com\/wp-content\/uploads\/xjdeveloper-busses-screenshot.gif\" alt=\"Busses screen in XJDeveloper\" width=\"607\" height=\"212\" \/><\/div>\n<p>&nbsp;<\/p>\n<p>\u3053\u308c\u3089\u306e\u30d0\u30b9\u3092\u4f7f\u7528\u3057\u3066\u3001\u30e1\u30e2\u30ea\u306b\u8aad\u307f\u66f8\u304d\u3059\u308b\u7c21\u5358\u306a\u6a5f\u80fd\u304c\u5f97\u3089\u308c\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\uff1a<\/p>\n<div style=\"font-size: 8pt; margin: 20px 0px 10px; overflow: auto; width: 97.5%; cursor: text; direction: ltr; max-height: 200px; line-height: 12pt; font-family: 'Courier New', courier, monospace; background-color: #f4f4f4; text-align: left; border: silver 1px solid; padding: 4px;\">\n<pre><tt><span style=\"color: #9a1900; font-style: italic;\">\/\/ Write a byte of data to the address specified<\/span>\r\n<b><span style=\"color: #000000;\">WriteCycle( INT address, INT data )()<\/span><\/b>\r\n  <b><span style=\"color: #0000ff;\">SET<\/span><\/b> ADDRESS <span style=\"color: #990000;\">:<\/span><span style=\"color: #990000;\">=<\/span> address<span style=\"color: #990000;\">[<\/span><span style=\"color: #993399;\">10<\/span><span style=\"color: #990000;\">.<\/span><span style=\"color: #990000;\">.<\/span><span style=\"color: #993399;\">0<\/span><span style=\"color: #990000;\">]<\/span><span style=\"color: #990000;\">,<\/span> DATA <span style=\"color: #990000;\">:<\/span><span style=\"color: #990000;\">=<\/span> data<span style=\"color: #990000;\">[<\/span><span style=\"color: #993399;\">7<\/span><span style=\"color: #990000;\">.<\/span><span style=\"color: #990000;\">.<\/span><span style=\"color: #993399;\">0<\/span><span style=\"color: #990000;\">]<\/span><span style=\"color: #990000;\">,<\/span> nCS <span style=\"color: #990000;\">:<\/span><span style=\"color: #990000;\">=<\/span> <span style=\"color: #993399;\">0<\/span><span style=\"color: #990000;\">,<\/span> nWE <span style=\"color: #990000;\">:<\/span><span style=\"color: #990000;\">=<\/span> <span style=\"color: #993399;\">0<\/span><span style=\"color: #990000;\">;<\/span>\r\n  <b><span style=\"color: #0000ff;\">SET<\/span><\/b> nCS <span style=\"color: #990000;\">:<\/span><span style=\"color: #990000;\">= <\/span><span style=\"color: #993399;\">1<\/span><span style=\"color: #990000;\">,<\/span> nWE <span style=\"color: #990000;\">:<\/span><span style=\"color: #990000;\">=<\/span> <span style=\"color: #993399;\">1<\/span><span style=\"color: #990000;\">;<\/span>\r\n<b><span style=\"color: #0000ff;\">END<\/span><\/b><span style=\"color: #990000;\">;<\/span>\r\n\r\n<span style=\"color: #9a1900; font-style: italic;\">\/\/ Read from the address specified and return the byte read in the data parameter<\/span>\r\n<b><span style=\"color: #000000;\">ReadCycle( INT address )( INT data )<\/span><\/b>\r\n  <b><span style=\"color: #0000ff;\">SET<\/span><\/b> ADDRESS <span style=\"color: #990000;\">:<\/span><span style=\"color: #990000;\">=<\/span> address<span style=\"color: #990000;\">[<\/span><span style=\"color: #993399;\">10<\/span><span style=\"color: #990000;\">.<\/span><span style=\"color: #990000;\">.<\/span><span style=\"color: #993399;\">0<\/span><span style=\"color: #990000;\">]<\/span><span style=\"color: #990000;\">,<\/span> DATA <span style=\"color: #990000;\">:<\/span><span style=\"color: #990000;\">=<\/span> <b><span style=\"color: #0000ff;\">I<\/span><\/b><span style=\"color: #990000;\">,<\/span> nOE <span style=\"color: #990000;\">:<\/span><span style=\"color: #990000;\">= <\/span><span style=\"color: #993399;\">0<\/span><span style=\"color: #990000;\">,<\/span> nCS <span style=\"color: #990000;\">:<\/span><span style=\"color: #990000;\">=<\/span> <span style=\"color: #993399;\">0<\/span><span style=\"color: #990000;\">;<\/span>\r\n      <i><span style=\"color: #9a1900;\">\/\/<\/span><\/i><i><span style=\"color: #9a1900;\"> This will set the data bits to input.<\/span><\/i>\r\n  <b><span style=\"color: #0000ff;\">SET<\/span><\/b> nCS <span style=\"color: #990000;\">:<\/span><span style=\"color: #990000;\">=<\/span> <span style=\"color: #993399;\">1<\/span><span style=\"color: #990000;\">,<\/span> nOE <span style=\"color: #990000;\">:<\/span><span style=\"color: #990000;\">=<\/span> <span style=\"color: #993399;\">1<\/span><span style=\"color: #990000;\">,<\/span> data <span style=\"color: #990000;\">:<\/span><span style=\"color: #990000;\">=<\/span> DATA<span style=\"color: #990000;\">;<\/span>\r\n  <b><span style=\"color: #0000ff;\">FLUSH<\/span><\/b><span style=\"color: #990000;\">;<\/span>\r\n<b><span style=\"color: #0000ff;\">END<\/span><\/b><span style=\"color: #990000;\">;<\/span><\/tt><\/pre>\n<p>&nbsp;<\/p>\n<\/div>\n<p>\u307e\u305f\u4ed6\u306b\u3082\u3001\u4f8b\u3048\u3070\u30c7\u30fc\u30bf\u30d0\u30b9\u3092\u30c6\u30b9\u30c8\u3059\u308b\u6a5f\u80fd\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u4f8b\u306f\u3001XJTAG\u30e9\u30a4\u30d6\u30e9\u30ea\u30c6\u30b9\u30c8\u306e\u52d5\u4f5c\u3092\u793a\u3057\u307e\u305b\u3093\u304c\u3001\u3053\u308c\u306f\u3001\u5358\u7d14\u306a\u30a6\u30a9\u30fc\u30ad\u30f3\u30b0\u30ef\u30f3\u30c6\u30b9\u30c8\u30d1\u30bf\u30fc\u30f3\u3092\u30c7\u30d0\u30a4\u30b9\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u3059\u3079\u3066\u304c\u671f\u5f85\u3069\u304a\u308a\u3067\u3042\u308b\u5834\u5408\u3001\u95a2\u6570\u306f\u300cresult\u300d\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u30670\u3092\u8fd4\u3057\u307e\u3059\u304c\u3001\u4f55\u304b\u554f\u984c\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u306f\u3001\u30a8\u30e9\u30fc\u3092\u793a\u3059\u305f\u3081\u306b1\u3092\u8fd4\u3057\u3001\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u51fa\u529b\u3057\u307e\u3059\u3002<\/p>\n<div style=\"font-size: 8pt; margin: 20px 0px 10px; overflow: auto; width: 97.5%; cursor: text; direction: ltr; max-height: 200px; line-height: 12pt; font-family: 'Courier New', courier, monospace; background-color: #f4f4f4; text-align: left; border: silver 1px solid; padding: 4px;\">\n<pre><tt><b><span style=\"color: #000000;\">TestData( )( INT result )<\/span><\/b>\r\n\r\n  <span style=\"color: #009900;\">INT<\/span> dataLine<span style=\"color: #990000;\">,<\/span> value<span style=\"color: #990000;\">,<\/span> testValue<span style=\"color: #990000;\">;<\/span>\r\n\r\n  result <span style=\"color: #990000;\">:<\/span><span style=\"color: #990000;\">=<\/span> <span style=\"color: #993399;\">0<\/span><span style=\"color: #990000;\">;<\/span>\r\n\r\n  <i><span style=\"color: #9a1900;\">\/\/<\/span><\/i><i><span style=\"color: #9a1900;\"> Walking '1's<\/span><\/i>\r\n  <b><span style=\"color: #0000ff;\">FOR<\/span><\/b> dataLine <span style=\"color: #990000;\">:<\/span><span style=\"color: #990000;\">=<\/span> <span style=\"color: #993399;\">0<\/span> <b><span style=\"color: #0000ff;\">TO<\/span><\/b> <span style=\"color: #993399;\">7<\/span>\r\n    testValue <span style=\"color: #990000;\">:<\/span><span style=\"color: #990000;\">=<\/span> <span style=\"color: #993399;\">1<\/span> <span style=\"color: #990000;\">&lt;<\/span><span style=\"color: #990000;\">&lt;<\/span> dataLine<span style=\"color: #990000;\">;<\/span>\r\n    WriteCycle<span style=\"color: #990000;\">(<\/span> dataLine<span style=\"color: #990000;\">,<\/span> testValue <span style=\"color: #990000;\">)<\/span><span style=\"color: #990000;\">;<\/span>\r\n  <b><span style=\"color: #0000ff;\">END<\/span><\/b><span style=\"color: #990000;\">;<\/span>\r\n\r\n  <b><span style=\"color: #0000ff;\">FOR<\/span><\/b> dataLine <span style=\"color: #990000;\">:<\/span><span style=\"color: #990000;\">=<\/span> <span style=\"color: #993399;\">0<\/span> <b><span style=\"color: #0000ff;\">TO<\/span><\/b> <span style=\"color: #993399;\">7<\/span>\r\n    testValue <span style=\"color: #990000;\">:<\/span><span style=\"color: #990000;\">=<\/span> <span style=\"color: #993399;\">1<\/span> <span style=\"color: #990000;\">&lt;<\/span><span style=\"color: #990000;\">&lt;<\/span> dataLine<span style=\"color: #990000;\">;<\/span>\r\n<b><span style=\"color: #000000;\">    ReadCycle( dataLine )( value )<\/span><\/b><span style=\"color: #990000;\">;<\/span>\r\n    <b><span style=\"color: #0000ff;\">IF<\/span><\/b> debug <b><span style=\"color: #0000ff;\">THEN<\/span><\/b>\r\n      <b><span style=\"color: #0000ff;\">PRINT<\/span><\/b><span style=\"color: #990000;\">(<\/span><span style=\"color: #ff0000;\">\"Wrote 0x\"<\/span><span style=\"color: #990000;\">,<\/span> <b><span style=\"color: #0000ff;\">HEX<\/span><\/b><span style=\"color: #990000;\">(<\/span>testValue<span style=\"color: #990000;\">)<\/span><span style=\"color: #990000;\">,<\/span> <span style=\"color: #ff0000;\">\" to address \"<\/span><span style=\"color: #990000;\">,<\/span> dataLine<span style=\"color: #990000;\">,<\/span><span style=\"color: #ff0000;\">\" read back 0x\"<\/span><span style=\"color: #990000;\">,<\/span> <b><span style=\"color: #0000ff;\">HEX<\/span><\/b><span style=\"color: #990000;\">(<\/span>value<span style=\"color: #990000;\">)<\/span><span style=\"color: #990000;\">,<\/span> <span style=\"color: #ff0000;\">\"\\n\"<\/span><span style=\"color: #990000;\">)<\/span><span style=\"color: #990000;\">;<\/span>\r\n    <b><span style=\"color: #0000ff;\">END<\/span><\/b><span style=\"color: #990000;\">;<\/span>\r\n\r\n    <b><span style=\"color: #0000ff;\">IF<\/span><\/b> value <span style=\"color: #990000;\">!<\/span><span style=\"color: #990000;\">=<\/span> testValue <b><span style=\"color: #0000ff;\">THEN<\/span><\/b>\r\n      result <span style=\"color: #990000;\">:<\/span><span style=\"color: #990000;\">=<\/span> <span style=\"color: #993399;\">1<\/span><span style=\"color: #990000;\">;<\/span>\r\n      <b><span style=\"color: #0000ff;\">PRINT<\/span><\/b><span style=\"color: #990000;\">(<\/span><span style=\"color: #ff0000;\">\"Error found while testing Data line \"<\/span><span style=\"color: #990000;\">,<\/span> dataLine<span style=\"color: #990000;\">,<\/span> <span style=\"color: #ff0000;\">\".\\n\"<\/span><span style=\"color: #990000;\">)<\/span><span style=\"color: #990000;\">;<\/span>\r\n    <b><span style=\"color: #0000ff;\">END<\/span><\/b><span style=\"color: #990000;\">;<\/span>\r\n  <b><span style=\"color: #0000ff;\">END<\/span><\/b><span style=\"color: #990000;\">;<\/span>\r\n\r\n<b><span style=\"color: #0000ff;\">END<\/span><\/b><span style=\"color: #990000;\">;<\/span><\/tt><\/pre>\n<p>&nbsp;<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>XJTAG\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5185\u306b\u3042\u308bXJEase library\u306b\u306f\u3001\u6b86\u3069\u306e\u90e8\u54c1\u306b\u30de\u30c3\u30c1\u3059\u308bXJEase\u30c7\u30d0\u30a4\u30b9\u30d5 [&hellip;]<\/p>\n","protected":false},"author":15,"featured_media":0,"parent":0,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"page-templates\/page-basic-footer.php","meta":{"_acf_changed":false,"_relevanssi_hide_post":"","_relevanssi_hide_content":"","_relevanssi_pin_for_all":"","_relevanssi_pin_keywords":"","_relevanssi_unpin_keywords":"","_relevanssi_related_keywords":"","_relevanssi_related_include_ids":"","_relevanssi_related_exclude_ids":"","_relevanssi_related_no_append":"","_relevanssi_related_not_related":"","_relevanssi_related_posts":"","_relevanssi_noindex_reason":"","footnotes":""},"pagecategory":[373],"class_list":["post-40376","page","type-page","status-publish","hentry","pagecategory-support"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.xjtag.com\/ja\/wp-json\/wp\/v2\/pages\/40376","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xjtag.com\/ja\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.xjtag.com\/ja\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.xjtag.com\/ja\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xjtag.com\/ja\/wp-json\/wp\/v2\/comments?post=40376"}],"version-history":[{"count":0,"href":"https:\/\/www.xjtag.com\/ja\/wp-json\/wp\/v2\/pages\/40376\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.xjtag.com\/ja\/wp-json\/wp\/v2\/media?parent=40376"}],"wp:term":[{"taxonomy":"pagecategory","embeddable":true,"href":"https:\/\/www.xjtag.com\/ja\/wp-json\/wp\/v2\/pagecategory?post=40376"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}