{"id":2192,"date":"2025-04-15T08:12:40","date_gmt":"2025-04-15T08:12:40","guid":{"rendered":"https:\/\/webprojects.cloud\/wordpress\/splatco\/?post_type=spl_knowledgebase&#038;p=2192"},"modified":"2025-05-02T06:01:24","modified_gmt":"2025-05-02T06:01:24","slug":"32bit-controller-enhancements","status":"publish","type":"spl_knowledgebase","link":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/32bit-controller-enhancements\/","title":{"rendered":"32bit Controller Enhancements"},"content":{"rendered":"\n<p>Other than early examples of the EC1 and some DIN Family controllers, SPLat 32 bit controllers are identified by their black PCBs.&nbsp; These controllers add several enhancements to the SPLat VM as described below.<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">SPLat\/PC Simulator<\/h6>\n\n\n\n<p>The SPLat\/PC simulator does not support any of these enhancements.\u00a0 We recommend you only use the simulator as a learning tool or to test small routines.\u00a0 Full application debugging can only be performed on the controller using SPLatlink or instructions like\u00a0<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/communications-instructions\/iiprinttext-desttext-string-d-23\/\">iiPrintText<\/a>\u00a0to output debug information via the serial port.<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">Enhanced MultiTrack implementation<\/h6>\n\n\n\n<p>32 bit controllers benefit from having much more memory in the processor chip than our classic 8-bit controllers. This has allowed us to enhance MultiTrack:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Each task has its own register stack (<code><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/glossary-of-terms\/#o3808\">X<\/a>, Y, Z, T<\/code>),\u00a0<code>I, R<\/code>, its own\u00a0<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/glossary-of-terms\/#o2970\">NVEM<\/a>\u00a0registers and its own floating point registers W &amp; Q. That means you can hold temporary results in registers during yielding instruction like\u00a0<code><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/multitrack-instructions\/yieldtask-d16\/\">YieldTask<\/a><\/code>,\u00a0<code><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/timing-instructions\/pause-tttt\/\">Pause<\/a><\/code>,\u00a0<code><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/fasttrack-instructions\/waiton-ii\/\">WaitOn<\/a><\/code>, etc and it will still be there when you resume.\u00a0 In other words, your registers won&#8217;t be changed when other tasks run.\u00a0 Only U &amp; V are shared by all tasks.<br><\/li>\n\n\n\n<li>When a task is launched, its registers (except\u00a0<code>R<\/code>) are set to the same values as in the task that launches it. This provides a good way of launching tasks with initial parameters. At start-up the default task is deemed to be running (before any\u00a0<code><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/multitrack-instructions\/runtasksforever-d16\/\">RunTasksForever<\/a><\/code>).<br><\/li>\n\n\n\n<li>Each task has its own subroutine return stack. That means you can execute a yielding instruction inside subroutines, like YieldTask, Pause, WaitOn, etc.<br><\/li>\n\n\n\n<li><code><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/timing-instructions\/elapsed-timers\/task-timers\/marktime-d16\/\">MarkTime<\/a><\/code>\u00a0&amp;\u00a0<code><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/timing-instructions\/pause-tttt\/\">Pause<\/a><\/code>\u00a0use separate timers, so they can be active at the same time.\u00a0 Whence you can Pause in a LoopIfTiming loop.<br><\/li>\n\n\n\n<li><code><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/timing-instructions\/elapsed-timers\/task-timers\/marktime-d16\/\">MarkTime<\/a><\/code>,\u00a0<code><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/floating-point-instructions\/fstsincemark-d22\/\">fSTSinceMark<\/a><\/code>,\u00a0<code><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/multitrack-instructions\/loopiftiming-ttttttllll-d16\/\">LoopIfTiming<\/a><\/code>\u00a0are available even if you&#8217;re not using MultiTrack, ie, you can use them even if you&#8217;re single tasking.<br><\/li>\n\n\n\n<li>Each task has its own SuperTimer scaling (more details below)<br><\/li>\n\n\n\n<li>128 tasks (up from 32)<\/li>\n\n\n\n<li>Up to 1024 instructions between Yield or Pause statements (up from 256)<\/li>\n<\/ul>\n\n\n\n<h6 class=\"wp-block-heading\">PWM base frequency<\/h6>\n\n\n\n<p>The analog outputs on most 32 bit controllers are in reality pulse width modulated digital outputs. They can be filtered to produce an analog voltage. The duty cycle (percentage ON time) of the signal is proportional to the number sent to the output by an\u00a0<code><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/floating-point-instructions\/fanout-c-d18\/\">fAnOut<\/a><\/code>\u00a0instruction. The default frequency of the PWM signal is 40kHz. This can be changed by executing the following code:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">   SetU            0,U0<br>   SPxCmd1         0,!<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/glossary-of-terms\/#o431\">CPU<\/a><\/pre>\n\n\n\n<p>where&nbsp;<code>U0<\/code>&nbsp;is taken from the following table:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>U0<\/th><th>PWM frequency<\/th><\/tr><tr><td>0<\/td><td>16kHz<\/td><\/tr><tr><td>1<\/td><td>8kHz<\/td><\/tr><tr><td>2<\/td><td>4kHz<\/td><\/tr><tr><td>3<\/td><td>2kHz<\/td><\/tr><tr><td>4<\/td><td>1kHz<\/td><\/tr><tr><td>5<\/td><td>500Hz<\/td><\/tr><tr><td>6<\/td><td>250Hz<\/td><\/tr><tr><td>7<\/td><td>125Hz<\/td><\/tr><tr><td>8<\/td><td>50Hz (RC servo)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>The 50Hz frequency is particularly suitable for driving RC (hobby) servo motors. The other frequencies give a range of choices for, for example, controlling the speed of DC motors.<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">Modify SuperTimer 10mS clock interval per task<\/h6>\n\n\n\n<p>You can change the basic 10mS SuperTimer clock interval to some other value. Set U0 to the required value in mS and then execute a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">   SPxCmd1         1,!CPU<\/pre>\n\n\n\n<p>The default interval is 10mS. Example, set the SuperTimer clock interval to 3mS:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">   SetU            0,3<br>   SPxCmd1         1,!CPU<\/pre>\n\n\n\n<p>This change will affect only the timing of the MultiTrack task that executes it.&nbsp; Other tasks will continue to run at 10ms or whatever you have changed each of them to.<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">NVEM writes<\/h6>\n\n\n\n<p>The flash memory architecture of the processor used in 32 bit controllers is not conducive to having a\u00a0<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/glossary-of-terms\/#o369\">SPLatWare<\/a>\u00a0program writing to NVEM.\u00a0 Many of these controllers will have NVEM1, so check the documentation for your specific controller.\u00a0 Some also have NVEM2 (RAM, up to 64KB on some boards), NVEM3 (battery-backed &#8211; where there&#8217;s a battery &#8211; RAM, from 20 bytes on HMI boards to 4KB on some) and NVEM4 (Flash-based NV memory).<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">Serial Expansion via XwIre (SEXI)<\/h6>\n\n\n\n<p>32 bit controllers support\u00a0<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/xwire-instructions\/sexi-serial-i-o-expansion-via-xwire-interface\/\">SEXI<\/a>\u00a0when running as an Xwire Master.\u00a0 This means any 8 bit or 32 bit Xwire slave can have its I\/O mapped into the master&#8217;s I\/O space.\u00a0 All the usual instructions will work, including Blink, Input, Off, GoIfInK, fAnIn, fAnOut, etc.\u00a0 SPLat\/PC will also show the additional I\/O in the digital and analogue windows.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Other than early examples of the EC1 and some DIN Family controllers, SPLat 32 bit controllers are identified by their black PCBs.&nbsp; These controllers add&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":2191,"menu_order":0,"template":"","class_list":["post-2192","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>32bit Controller Enhancements - 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=\"32bit Controller Enhancements - SPLat Controls\" \/>\n<meta property=\"og:description\" content=\"Other than early examples of the EC1 and some DIN Family controllers, SPLat 32 bit controllers are identified by their black PCBs.&nbsp; These controllers add...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/32bit-controller-enhancements\/\" \/>\n<meta property=\"og:site_name\" content=\"SPLat Controls\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-02T06:01:24+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=\"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\/programming-reference\/instructions-arranged-by-function\/32bit-controller-enhancements\/\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/32bit-controller-enhancements\/\",\"name\":\"32bit Controller Enhancements - SPLat Controls\",\"isPartOf\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website\"},\"datePublished\":\"2025-04-15T08:12:40+00:00\",\"dateModified\":\"2025-05-02T06:01:24+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/32bit-controller-enhancements\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/32bit-controller-enhancements\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/32bit-controller-enhancements\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Programming reference\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Instructions arranged by function\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"32bit Controller Enhancements\"}]},{\"@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":"32bit Controller Enhancements - 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":"32bit Controller Enhancements - SPLat Controls","og_description":"Other than early examples of the EC1 and some DIN Family controllers, SPLat 32 bit controllers are identified by their black PCBs.&nbsp; These controllers add...","og_url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/32bit-controller-enhancements\/","og_site_name":"SPLat Controls","article_modified_time":"2025-05-02T06:01:24+00:00","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\/programming-reference\/instructions-arranged-by-function\/32bit-controller-enhancements\/","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/32bit-controller-enhancements\/","name":"32bit Controller Enhancements - SPLat Controls","isPartOf":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website"},"datePublished":"2025-04-15T08:12:40+00:00","dateModified":"2025-05-02T06:01:24+00:00","breadcrumb":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/32bit-controller-enhancements\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/32bit-controller-enhancements\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/32bit-controller-enhancements\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/"},{"@type":"ListItem","position":2,"name":"Programming reference","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/"},{"@type":"ListItem","position":3,"name":"Instructions arranged by function","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/programming-reference\/instructions-arranged-by-function\/"},{"@type":"ListItem","position":4,"name":"32bit Controller Enhancements"}]},{"@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\/2192","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\/2191"}],"wp:attachment":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/media?parent=2192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}