{"id":3678,"date":"2025-04-21T06:35:17","date_gmt":"2025-04-21T06:35:17","guid":{"rendered":"https:\/\/webprojects.cloud\/wordpress\/splatco\/?post_type=spl_knowledgebase&#038;p=3678"},"modified":"2025-06-10T12:25:10","modified_gmt":"2025-06-10T12:25:10","slug":"xwire-master-configuration","status":"publish","type":"spl_knowledgebase","link":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/xwire\/xwire-programming\/xwire-master-configuration\/","title":{"rendered":"Xwire: Master configuration"},"content":{"rendered":"\n<p>In the Xwire master you need a table in NVEM0 that defines all the data connections that are to take place. The tables in master and slave(s) must be consistent with each other, or it won&#8217;t work.<\/p>\n\n\n\n<p>In the master the table contains one 5-byte entry per slave. The entry defines the slave address, and the address and block lengths within the Master of the Tx and Rx&nbsp;<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/glossary-of-terms\/#o414\">RAM<\/a>&nbsp;blocks for the slave. The general format is as follows:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">        NVEM0\n\nXWireTab:\n        NV0Byte         SlaveAddr0,TxRAMStart0,TxRAMLen0,RxRAMStart0,RxRAMLen0\n        NV0Byte         SlaveAddr1,TxRAMStart1,TxRAMLen1,RxRAMStart1,RxRAMLen1\n        NV0Byte         SlaveAddr2,TxRAMStart2,TxRAMLen2,RxRAMStart2,RxRAMLen2\n... etc\n        NV0Byte         255    ;End of table sentinel.<\/pre>\n\n\n\n<p><code>SlaveAddr0, SlaveAddr1<\/code>&nbsp;etc are the Xwire addresses of the slave 0, slave 1 etc. Legal values are 0 to 253.<\/p>\n\n\n\n<p><code>TxRAMStart0, TxRAMStart1<\/code>&nbsp;etc are the addresses in Master RAM where data is to be taken from and sent to the slaves.<\/p>\n\n\n\n<p><code>TxRAMLen0, TxRAMLen1<\/code>&nbsp;etc are the number of bytes that are to be sent to the respective slaves.<\/p>\n\n\n\n<p><code>RxRAMStart0, RxRAMStart1<\/code>&nbsp;etc are the addresses in master RAM where data received from the respective slaves is to be stored.<\/p>\n\n\n\n<p><code>RxRAMLen0, RxRAMLen1<\/code>&nbsp;etc are the number of bytes to expect (and store in RAM) from the respective slaves.<\/p>\n\n\n\n<p>The final 255 is vital. It signals the end of the table.<\/p>\n\n\n\n<p><em>Notice that the master does not know where in the slave the data is located.<\/em><\/p>\n\n\n\n<h6 class=\"wp-block-heading\">Example:<\/h6>\n\n\n\n<p>Suppose we have two slaves. The first slave is to receive 2 bytes of data from the master and send back 3 bytes of data. The slaves are set to Xwire bus addresses 8 and 76. We decide that data to the first slave will be taken from local (master) RAM address 19 and 20, and data from the first slave will be stored in RAM at 21 through 23. Our table might look like this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">        NVEM0\nXWireTab:\n        NV0Byte         8,19,2,21,3    ;First slave\n        NV0Byte         76,57,5,85,2   ;Second slave\n        NV0Byte         255            ;End of table<\/pre>\n\n\n\n<p>Can you work out where the data to and from the second slave are located? How many bytes are transferred in each direction? (Answer at the bottom of the page).<\/p>\n\n\n\n<p>Normally you should use symbolic names, so it might look more like this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">S0TxRAM:        mEQU    19,2    ;Define Xwire Tx RAM for slave 0\nS0RxRAM:        mEQU    21,3    ;Define Xwire Rx RAM for slave 0\nS0Address:      EQU     8       ;Xwire address of slave 0\nS1TxRAM:        mEQU    57,5    ;Define Xwire Tx RAM for slave 1\nS1RxRAM:        mEQU    85,2    ;Define Xwire Rx RAM for slave 1\nS1Address:      EQU     76      ;Xwire address of slave 1\n\n        NVEM0\nXWireTab:\n        NV0Byte         S0Address,S0TxRAM,2,S0RxRAM,3\n        NV0Byte         S1Address,S1TxRAM,5,S1RxRAM,2\n        NV0Byte         255<\/pre>\n\n\n\n<p>The configuration will be invoked by the following instruction placed in the early initialization code for the master<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>        XwireMaster    <\/code><\/pre>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n\n\n\n<p><em>Answer to question: We send the second slave 5 bytes starting at 57. We expect back 2 bytes which will be stored at 85 and 86.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Xwire master you need a table in NVEM0 that defines all the data connections that are to take place. The tables in master&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3673,"menu_order":1,"template":"","class_list":["post-3678","spl_knowledgebase","type-spl_knowledgebase","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Xwire: Master configuration - SPLat Controls<\/title>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Xwire: Master configuration - SPLat Controls\" \/>\n<meta property=\"og:description\" content=\"In the Xwire master you need a table in NVEM0 that defines all the data connections that are to take place. The tables in master...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/xwire\/xwire-programming\/xwire-master-configuration\/\" \/>\n<meta property=\"og:site_name\" content=\"SPLat Controls\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-10T12:25:10+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/xwire\/xwire-programming\/xwire-master-configuration\/\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/xwire\/xwire-programming\/xwire-master-configuration\/\",\"name\":\"Xwire: Master configuration - SPLat Controls\",\"isPartOf\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website\"},\"datePublished\":\"2025-04-21T06:35:17+00:00\",\"dateModified\":\"2025-06-10T12:25:10+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/xwire\/xwire-programming\/xwire-master-configuration\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/xwire\/xwire-programming\/xwire-master-configuration\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/xwire\/xwire-programming\/xwire-master-configuration\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tutorials, application notes and white papers\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Xwire\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/xwire\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Xwire: Programming\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/xwire\/xwire-programming\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Xwire: Master configuration\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/\",\"name\":\"SPLat Controls\",\"description\":\"OEM Embedded Machine Controllers\",\"publisher\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#organization\",\"name\":\"SPLat Controls\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2024\/10\/logo.svg\",\"contentUrl\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2024\/10\/logo.svg\",\"caption\":\"SPLat Controls\"},\"image\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Xwire: Master configuration - SPLat Controls","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"Xwire: Master configuration - SPLat Controls","og_description":"In the Xwire master you need a table in NVEM0 that defines all the data connections that are to take place. The tables in master...","og_url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/xwire\/xwire-programming\/xwire-master-configuration\/","og_site_name":"SPLat Controls","article_modified_time":"2025-06-10T12:25:10+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/xwire\/xwire-programming\/xwire-master-configuration\/","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/xwire\/xwire-programming\/xwire-master-configuration\/","name":"Xwire: Master configuration - SPLat Controls","isPartOf":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website"},"datePublished":"2025-04-21T06:35:17+00:00","dateModified":"2025-06-10T12:25:10+00:00","breadcrumb":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/xwire\/xwire-programming\/xwire-master-configuration\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/xwire\/xwire-programming\/xwire-master-configuration\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/xwire\/xwire-programming\/xwire-master-configuration\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/"},{"@type":"ListItem","position":2,"name":"Tutorials, application notes and white papers","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/"},{"@type":"ListItem","position":3,"name":"Xwire","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/xwire\/"},{"@type":"ListItem","position":4,"name":"Xwire: Programming","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/xwire\/xwire-programming\/"},{"@type":"ListItem","position":5,"name":"Xwire: Master configuration"}]},{"@type":"WebSite","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/","name":"SPLat Controls","description":"OEM Embedded Machine Controllers","publisher":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webprojects.cloud\/wordpress\/splatco\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#organization","name":"SPLat Controls","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#\/schema\/logo\/image\/","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2024\/10\/logo.svg","contentUrl":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2024\/10\/logo.svg","caption":"SPLat Controls"},"image":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/spl_knowledgebase\/3678","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/spl_knowledgebase"}],"about":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/types\/spl_knowledgebase"}],"author":[{"embeddable":true,"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/users\/1"}],"up":[{"embeddable":true,"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/spl_knowledgebase\/3673"}],"wp:attachment":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/media?parent=3678"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}