{"id":1832,"date":"2025-04-14T08:17:36","date_gmt":"2025-04-14T08:17:36","guid":{"rendered":"https:\/\/webprojects.cloud\/wordpress\/splatco\/?post_type=spl_knowledgebase&#038;p=1832"},"modified":"2025-06-10T08:36:19","modified_gmt":"2025-06-10T08:36:19","slug":"spice10213-programming","status":"publish","type":"spl_knowledgebase","link":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/","title":{"rendered":"SPice10213: Programming"},"content":{"rendered":"\n<p>Once installed on a SPLat controller, the SPice10213 appears as several regular analog and digital I\/O points. The following table shows the mappings for all the I\/O on the board. Numbers in parenthesis are the numeric analog channel numbers used with&nbsp;<code><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/analog-instructions\/fanin-c-d18\/\">fAnIn<\/a><\/code>&nbsp;and&nbsp;<code><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/analog-instructions\/fanout-c-d18\/\">fAnOut<\/a><\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>Function<\/th><th>Cnctr pin<\/th><th>SLXXX<\/th><th>MMiXXX<\/th><th>MS12<\/th><\/tr><tr><th>Motor 1 direction<\/th><th>4<\/th><td>Output 8<\/td><td>Output 16<\/td><td>Output 12<\/td><\/tr><tr><th>Motor 1 speed<\/th><th>8<\/th><td>Output 12<\/td><td>Output 20<\/td><td>Output 16<\/td><\/tr><tr><th>(jumper = PWM)<\/th><th>9<\/th><td>Output 13<\/td><td>Output 21<\/td><td>Output 17<\/td><\/tr><tr><th>(jumper = DO)<\/th><th>7<\/th><td>Output 11<\/td><td>Output 19<\/td><td>Output 15<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>The above chart shows the SPice10213 function mappings for various controllers.<\/p>\n\n\n\n<p>You will notice that&nbsp;<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/glossary-of-terms\/#o366\">SPice<\/a>&nbsp;connector pins (&#8220;Cnctr pin&#8221;) 8 and 9 have both AnOut (analog output) and &#8220;ordinary&#8221; (meaning digital) output assignment associated with them. This is because the SPice pins are configurable as to their function, and with the SPice10213 it makes sense to use PWM (variable speed) or simple digital on\/off modes, depending on the application. You need to decide which mode you are going to use and then configure the SPice connector accordingly (more on this below).<\/p>\n\n\n\n<p>Motor 1 is the reversible output. It uses one output for speed control (be it on\/off or variable) and one digital output for direction.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"121\" src=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2025\/04\/SPice10213-Programming-.jpg\" alt=\"\" class=\"wp-image-1833\" srcset=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2025\/04\/SPice10213-Programming-.jpg 200w, https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2025\/04\/SPice10213-Programming--64x39.jpg 64w\" sizes=\"auto, (max-width: 200px) 100vw, 200px\" \/><\/figure>\n\n\n\n<p>Motor 2 is non-reversible. It requires only one output. However, you have a choice of two SPice pins, which are selected by an onboard jumper (highlighted above). The jumper has positions labelled &#8220;DO&#8221; and &#8220;PWM&#8221;, which select SPice pins 7 and 9 respectively. The reason for this is that on the\u00a0<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/glossary-of-terms\/#o364\">MMi99<\/a>\/200 and the SL99 pin 9 is used for the\u00a0<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/tutorials-application-notes-and-white-papers\/tutorial-thermistor-temperature-measurement\/\">thermistor drive voltage<\/a>\u00a0if you are using that feature. In that case you would set the jumper to &#8220;DO&#8221; and sacrifice speed control on motor 2 in return for having the thermistor drive. In the &#8220;PWM&#8221; position you are using connector pin 9, in which case you are free to configure the pin for PWM or for on\/off (digital) operation (that can be a bit confusing, that the PWM position can actually be configured for either mode).<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">Initializing the SPice connector<\/h6>\n\n\n\n<p>Because the pins of the SPice connector, to which the SPice10213 is connected, can be configured for different functions (analog\/digital, input\/output), you need to have some code in your program that configures them to the correct settings for the SPice12013.<\/p>\n\n\n\n<p>The following section of code should be run by your program just once, at the beginning, before your program attempts to do anything else with the SPice10213.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">         <a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/splat-expansion-framework-generic-instructions\/clru\/\">ClrU<\/a><br>         <a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/splat-expansion-framework-generic-instructions\/setu-ni\/\">setu<\/a>         0,1         ;set spice connector pin 4 as DO (Direction 1)<br><br>;Select one of the 2 following depending on your needs:<br>         setu         4,4         ;set spice connector pin 8 as PWM output<br>         setu         4,1         ;set spice connector pin 8 as digital output<br><br><br>;Select one of the 3 following depending on your needs:<br>         setu         3,1         ;set spice connector pin 7 as digital output (jmpr=\"DO\")<br>         setu         5,4         ;set spice connector pin 9 as PWM output (jmpr=\"PWM\")<br>         setu         5,1         ;set spice connector pin 9 as digital output (jmpr=\"PWM\")<br><br>         <a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/splat-expansion-framework-generic-instructions\/spiceconfigu\/\">SpiceConfigU<\/a>             ;Commit the configuration<\/pre>\n\n\n\n\n","protected":false},"excerpt":{"rendered":"<p>Once installed on a SPLat controller, the SPice10213 appears as several regular analog and digital I\/O points. The following table shows the mappings for all&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1825,"menu_order":5,"template":"","class_list":["post-1832","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>SPice10213: 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=\"SPice10213: Programming - SPLat Controls\" \/>\n<meta property=\"og:description\" content=\"Once installed on a SPLat controller, the SPice10213 appears as several regular analog and digital I\/O points. The following table shows the mappings for all...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/\" \/>\n<meta property=\"og:site_name\" content=\"SPLat Controls\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-10T08:36:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2025\/04\/SPice10213-Programming-.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"200\" \/>\n\t<meta property=\"og:image:height\" content=\"121\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\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=\"3 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\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/\",\"name\":\"SPice10213: Programming - SPLat Controls\",\"isPartOf\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2025\/04\/SPice10213-Programming-.jpg\",\"datePublished\":\"2025-04-14T08:17:36+00:00\",\"dateModified\":\"2025-06-10T08:36:19+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/#primaryimage\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2025\/04\/SPice10213-Programming-.jpg\",\"contentUrl\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2025\/04\/SPice10213-Programming-.jpg\",\"width\":200,\"height\":121},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-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: SPice add-on boards\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"SPice10213: DC motor control\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"SPice10213: 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":"SPice10213: 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":"SPice10213: Programming - SPLat Controls","og_description":"Once installed on a SPLat controller, the SPice10213 appears as several regular analog and digital I\/O points. The following table shows the mappings for all...","og_url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/","og_site_name":"SPLat Controls","article_modified_time":"2025-06-10T08:36:19+00:00","og_image":[{"width":200,"height":121,"url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2025\/04\/SPice10213-Programming-.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/","name":"SPice10213: Programming - SPLat Controls","isPartOf":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/#primaryimage"},"image":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/#primaryimage"},"thumbnailUrl":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2025\/04\/SPice10213-Programming-.jpg","datePublished":"2025-04-14T08:17:36+00:00","dateModified":"2025-06-10T08:36:19+00:00","breadcrumb":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-programming\/#primaryimage","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2025\/04\/SPice10213-Programming-.jpg","contentUrl":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2025\/04\/SPice10213-Programming-.jpg","width":200,"height":121},{"@type":"BreadcrumbList","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/spice10213-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: SPice add-on boards","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/"},{"@type":"ListItem","position":4,"name":"SPice10213: DC motor control","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/product-documentation\/product-documentation-spice-add-on-boards\/spice10213-dc-motor-control\/"},{"@type":"ListItem","position":5,"name":"SPice10213: 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\/1832","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\/1825"}],"wp:attachment":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/media?parent=1832"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}