<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Pico PIO state machine implements a peripheral: Rotary Decoder substeps example</title><link>/products/raspberry-pi/b/blog/posts/pico-pio-state-machine-implements-a-peripheral-rotary-decoder-substeps-example</link><description>The Pico has a set of PIO co-processors. They are real-time controllers that can execute logic with deterministic timing. Ideal to run strict-timed sequences and state machines. And to implement extra peripherals (like a quadrature decoder h...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Pico PIO state machine implements a peripheral: Rotary Decoder substeps example</title><link>https://community.element14.com/products/raspberry-pi/b/blog/posts/pico-pio-state-machine-implements-a-peripheral-rotary-decoder-substeps-example</link><pubDate>Sat, 29 Mar 2025 18:05:14 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:4f93b503-5750-4fdd-a0d1-68d83cb42f93</guid><dc:creator>DAB</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Nice project Jan.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=28791&amp;AppID=86&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Pico PIO state machine implements a peripheral: Rotary Decoder substeps example</title><link>https://community.element14.com/products/raspberry-pi/b/blog/posts/pico-pio-state-machine-implements-a-peripheral-rotary-decoder-substeps-example</link><pubDate>Sat, 29 Mar 2025 08:55:47 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:4f93b503-5750-4fdd-a0d1-68d83cb42f93</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Stepper motor time. I found an example to control a stepper via&amp;nbsp; PIO. I want to try that out first, then see if I can make it do ramp-up ramp-down.&lt;/p&gt;
&lt;p&gt;&lt;img height="343" src="/resized-image/__size/996x686/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-4f93b503-5750-4fdd-a0d1-68d83cb42f93/20250329_5F00_094920.jpg" width="498" alt=" " /&gt;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=28791&amp;AppID=86&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Pico PIO state machine implements a peripheral: Rotary Decoder substeps example</title><link>https://community.element14.com/products/raspberry-pi/b/blog/posts/pico-pio-state-machine-implements-a-peripheral-rotary-decoder-substeps-example</link><pubDate>Thu, 27 Mar 2025 20:44:34 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:4f93b503-5750-4fdd-a0d1-68d83cb42f93</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;The design has a calibration function.&lt;/p&gt;
&lt;p&gt;Suggestion is to create test code that runs the motor stable at 50%, then call that function. It will&amp;nbsp;then return the&amp;nbsp;&lt;span&gt;phase sizes of&amp;nbsp;the encoder.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;These values can then be used&amp;nbsp;in the real firmware to have optimal coverage over the whole speed range.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=28791&amp;AppID=86&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Pico PIO state machine implements a peripheral: Rotary Decoder substeps example</title><link>https://community.element14.com/products/raspberry-pi/b/blog/posts/pico-pio-state-machine-implements-a-peripheral-rotary-decoder-substeps-example</link><pubDate>Wed, 26 Mar 2025 04:00:44 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:4f93b503-5750-4fdd-a0d1-68d83cb42f93</guid><dc:creator>shabaz</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Nice..&amp;nbsp;That&amp;#39;s really neat that the rotary encoder handling is all delegated to the PIO. Since there are two, this could also be interesting for motors with encoders, e.g. robotics, dedicate a Pi Pico per pair of motors for instance.&lt;/p&gt;
&lt;p&gt;Does the code increment/decrement the count based on the calculated speed too? (e.g. handy if you&amp;#39;re using the rotary encoder as a user interface control, incrementing say frequency from 0 to 1 MHz in steps of 1 Hz when moved slowly, but in steps of 100 Hz when rotated a bit quicker, and so on).&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=28791&amp;AppID=86&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>