{"id":1932,"date":"2025-04-14T11:36:40","date_gmt":"2025-04-14T11:36:40","guid":{"rendered":"https:\/\/webprojects.cloud\/wordpress\/splatco\/?post_type=spl_knowledgebase&#038;p=1932"},"modified":"2025-06-10T08:49:40","modified_gmt":"2025-06-10T08:49:40","slug":"sx10505-programming","status":"publish","type":"spl_knowledgebase","link":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/sx10505-4-analog-out\/sx10505-programming\/","title":{"rendered":"SX10505: Programming"},"content":{"rendered":"\n<p>The following table shows how the Xwire data block needs to appear in memory. The Transmit data block consists of 16 bytes.<\/p>\n\n\n\n<p>Xwire transmit data block:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>Memory<\/th><th>Description<\/th><th>Format<\/th><\/tr><tr><td>3<\/td><td>10 bit analog out.<\/td><td>0V-10V output voltage range<\/td><\/tr><tr><td>7<\/td><td>10 bit analog out<\/td><td>0V-10V output voltage range<\/td><\/tr><tr><td>11<\/td><td>8 bit analog out<\/td><td>0V-10V output voltage range<\/td><\/tr><tr><td>15<\/td><td>8 bit analog out<\/td><td>0V-10V output voltage range<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>*Note that this data block does not need to start at memory location 0. The data block can be moved anywhere in memory as long as it stays together, is in the order above and is defined in the&nbsp;<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/glossary-of-terms\/#o2970\">NVEM<\/a>&nbsp;Xwire table in the program code.<\/p>\n\n\n\n<p>Memory locations in the Xwire transmit data block 0-7 correspond to the two 10 bit analog outputs on the SX10505.<\/p>\n\n\n\n<p>Memory locations in the Xwire transmit data block 8-15 correspond to the two 8 bit analog outputs on the SX10505.<\/p>\n\n\n\n<p>Each channel is sent in 4 bytes as a floating point number in the range of 0 to 1. The same format used by the &#8220;fanout&#8221; instruction.<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">Example program demonstrating how to interface with a SX10505<\/h6>\n\n\n\n<pre class=\"wp-block-preformatted\"> \n* The MMI202 communicates to the SX10505 over the XWire peripheral.\n* MMI202 controller is the XWire master and the SX10505 is the XWire slave.\n* The MMI202 has both its analog inputs set to Thermistor mode.\n* The SX10505 has 4 analog output channels.\n        * Channel O0 is connected to a fan set to run off 5 volts.\n \n        * Channel O1 is connected to a fan set to run off 7.5 volts.\n \n        * Channel O2 is connected to a pump which will echo analog input 2 on\n        * the MMI202.\n  \n        * Channel O3 is connected to a pump which will output the inverse of analog \n        * input 2 on the MMI202. \n \n* If at any time there are Xwire communications errors OP15 on the MMI202 front panel will light.\n \n \n* Equates *\n \noError:                 oequ            15      ;LED is lit when there is an XWire error.\n \n* XWire Transmit data block *\n* Data block of 16 bytes *\n \nfSXAnout0:              mequ            10,4    ;Location where analog Output 0 value is stored for SX10505 to take.\nfSXAnout1:              mequ            14,4    ;Location where analog Output 1 value is stored for SX10505 to take.\nfSXAnout2:              mequ            18,4    ;Location where analog Output 2 value is stored for SX10505 to take.    \nfSXAnout3:              mequ            22,4    ;Location where analog Output 3 value is stored for SX10505 to take.    \n \n \n* Initialisation *\n \nStart:  \n        XwireMaster     XWireTab                ;start xwire going\n         \n        floadw          1\n        fanout          8                       ;set the MMI analog drive voltage \n \n        floadw          .5                      ;analog output channel O0 set to 50%    \n        fstore          fSXAnout0\n \n        floadw          .75                     ;analog output channel O1 set to 75%    \n        fstore          fSXAnout1\nloop:\n        pause           10                      ;only sample analog inputs every 100mS. \n        fanin           2                       ;read analog channel 2 on the MMI, returns a number 0 - 1 in W. (0-100%)\n        fstore          fSXAnout2\n \n        fanin           3                       ;read analog channel 3 on the MMI, returns a number 0 - 1 in W. (0-100%)\n        floadq          1\n        fsub                                    ;invert the analog sample.\n        fstore          fSXAnout3\n \n        xwiregeterrcount                        ;get the xwire error count\n        output          oError                  ;if the error count is above 1 led 15 on the MMI202 will light until next run\n        goto            loop    \n \n        NVEM0\nXWireTab:\n        NV0Byte         0,10,16,0,0\n        NV0Byte         255                     ;End of table sentinel.<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The following table shows how the Xwire data block needs to appear in memory. The Transmit data block consists of 16 bytes. Xwire transmit data&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1922,"menu_order":4,"template":"","class_list":["post-1932","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>SX10505: Programming - 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=\"SX10505: Programming - SPLat Controls\" \/>\n<meta property=\"og:description\" content=\"The following table shows how the Xwire data block needs to appear in memory. The Transmit data block consists of 16 bytes. Xwire transmit data...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/sx10505-4-analog-out\/sx10505-programming\/\" \/>\n<meta property=\"og:site_name\" content=\"SPLat Controls\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-10T08:49:40+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=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/sx10505-4-analog-out\/sx10505-programming\/\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/sx10505-4-analog-out\/sx10505-programming\/\",\"name\":\"SX10505: Programming - SPLat Controls\",\"isPartOf\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website\"},\"datePublished\":\"2025-04-14T11:36:40+00:00\",\"dateModified\":\"2025-06-10T08:49:40+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/sx10505-4-analog-out\/sx10505-programming\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/sx10505-4-analog-out\/sx10505-programming\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/sx10505-4-analog-out\/sx10505-programming\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Product documentation\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Product documentation: Xwire peripherals\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"SX10505: 4 analog out\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/sx10505-4-analog-out\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"SX10505: Programming\"}]},{\"@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":"SX10505: Programming - 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":"SX10505: Programming - SPLat Controls","og_description":"The following table shows how the Xwire data block needs to appear in memory. The Transmit data block consists of 16 bytes. Xwire transmit data...","og_url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/sx10505-4-analog-out\/sx10505-programming\/","og_site_name":"SPLat Controls","article_modified_time":"2025-06-10T08:49:40+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/sx10505-4-analog-out\/sx10505-programming\/","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/sx10505-4-analog-out\/sx10505-programming\/","name":"SX10505: Programming - SPLat Controls","isPartOf":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website"},"datePublished":"2025-04-14T11:36:40+00:00","dateModified":"2025-06-10T08:49:40+00:00","breadcrumb":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/sx10505-4-analog-out\/sx10505-programming\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/sx10505-4-analog-out\/sx10505-programming\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/sx10505-4-analog-out\/sx10505-programming\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/"},{"@type":"ListItem","position":2,"name":"Product documentation","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/"},{"@type":"ListItem","position":3,"name":"Product documentation: Xwire peripherals","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/"},{"@type":"ListItem","position":4,"name":"SX10505: 4 analog out","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-xwire-peripherals\/sx10505-4-analog-out\/"},{"@type":"ListItem","position":5,"name":"SX10505: Programming"}]},{"@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\/1932","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\/1922"}],"wp:attachment":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/media?parent=1932"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}