<?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>Stepper Motor Control with Raspberry Pico PIO and DRV8711 driver- Part 4: PIO</title><link>/products/raspberry-pi/b/blog/posts/stepper-motor-control-with-raspberry-pico-pi-and-drv8711-driver--part-3-gpio-1421751455</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.In this series, I&amp;#39;m trying t...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Stepper Motor Control with Raspberry Pico PIO and DRV8711 driver- Part 4: PIO</title><link>https://community.element14.com/products/raspberry-pi/b/blog/posts/stepper-motor-control-with-raspberry-pico-pi-and-drv8711-driver--part-3-gpio-1421751455</link><pubDate>Sun, 06 Apr 2025 14:33:41 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:67a214f8-dced-456b-b19d-f93972cdd8f3</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;I got the new script working including dir pin now.&lt;/p&gt;
&lt;p&gt;bit 31:1 are the steps&lt;/p&gt;
&lt;p&gt;bit 0 is direction&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:eceb07cc-cde6-45ec-b4f7-1063782ef88a:type=text&amp;text=.program%20stepper%0A.side_set%201%0A%0A.wrap_target%0Astart%3A%0A%20%20%20%20pull%20block%20%20%20%20%20%20side%200%20%3B%20Pull%20from%20FIFO%20to%20OSR%0A%20%20%20%20out%20pins%2C%201%20%20%20%20%20side%200%20%3B%20shift%20direction%20out%20of%20OSR%20and%20output%20to%20dir%0A%20%20%20%20mov%20x%2C%20osr%20%20%20%20%20%20side%200%20%3B%20Copy%20rest%20of%20OSR%20to%20scratch%20X%0A%20%20%20%20jmp%20%21x%20start%20%20%20%20side%200%0A%20%20%20%20jmp%20x--%20count%20%20%20side%200%0Acount%3A%0A%20%20%20%20nop%20%20%20%20%20%20%20%20%20%20%20%20%20side%201%0A%20%20%20%20jmp%20x--%20count%20%20%20side%200%0A.wrap]&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;out pins, 1 shifts the lsb out of the data that we passed, and sets the DIR pin to that&lt;/div&gt;
&lt;div&gt;the step pin is managed by the side command.&lt;/div&gt;
&lt;/div&gt;&lt;img src="https://community.element14.com/aggbug?PostID=28814&amp;AppID=86&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Stepper Motor Control with Raspberry Pico PIO and DRV8711 driver- Part 4: PIO</title><link>https://community.element14.com/products/raspberry-pi/b/blog/posts/stepper-motor-control-with-raspberry-pico-pi-and-drv8711-driver--part-3-gpio-1421751455</link><pubDate>Sun, 06 Apr 2025 13:21:14 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:67a214f8-dced-456b-b19d-f93972cdd8f3</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I&amp;#39;ve started writing my own stepper PIO program.&lt;/p&gt;
&lt;p&gt;The original code that I used can step up to 32 steps per call. The version I&amp;#39;m writing, you can step whatever fits in a uint32_t (4,294,967,295).&lt;/p&gt;
&lt;p&gt;I may steal one of the 32 bits for the motor spin direction later ...&lt;/p&gt;
&lt;p&gt;code:&lt;/p&gt;
&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:f333db77-c872-44f9-ace8-b6df1e86a718:type=text&amp;text=.program%20stepper%0D%0A.side_set%201%0D%0A%0D%0A.wrap_target%0D%0Astart%3A%0D%0A%20%20%20%20pull%20block%20%20%20%20%20%20side%200%20%3B%20Pull%20from%20FIFO%20to%20OSR%0D%0A%20%20%20%20mov%20x%2C%20osr%20%20%20%20%20%20side%200%20%3B%20Copy%20most-recently-pulled%20value%20back%20to%20scratch%20X%0D%0A%20%20%20%20jmp%20%21x%20start%20%20%20%20side%200%0D%0A%20%20%20%20jmp%20x--%20count%20%20%20side%200%0D%0Acount%3A%0D%0A%20%20%20%20nop%20%20%20%20%20%20%20%20%20%20%20%20%20side%201%0D%0A%20%20%20%20jmp%20x--%20count%20%20%20side%200%0D%0A.wrap]&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=28814&amp;AppID=86&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Stepper Motor Control with Raspberry Pico PIO and DRV8711 driver- Part 4: PIO</title><link>https://community.element14.com/products/raspberry-pi/b/blog/posts/stepper-motor-control-with-raspberry-pico-pi-and-drv8711-driver--part-3-gpio-1421751455</link><pubDate>Sat, 05 Apr 2025 19:16:25 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:67a214f8-dced-456b-b19d-f93972cdd8f3</guid><dc:creator>DAB</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Nice update Jan.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=28814&amp;AppID=86&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Stepper Motor Control with Raspberry Pico PIO and DRV8711 driver- Part 4: PIO</title><link>https://community.element14.com/products/raspberry-pi/b/blog/posts/stepper-motor-control-with-raspberry-pico-pi-and-drv8711-driver--part-3-gpio-1421751455</link><pubDate>Sat, 05 Apr 2025 10:43:28 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:67a214f8-dced-456b-b19d-f93972cdd8f3</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;There is&amp;nbsp;an extension for VSCode, to syntax-highlight PIO scripts. It&amp;#39;s called&amp;nbsp;PIO ASM Syntax Highlighting:&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/1280x720/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-67a214f8-dced-456b-b19d-f93972cdd8f3/pastedimage1743849711306v1.png" alt=" " /&gt;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=28814&amp;AppID=86&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Stepper Motor Control with Raspberry Pico PIO and DRV8711 driver- Part 4: PIO</title><link>https://community.element14.com/products/raspberry-pi/b/blog/posts/stepper-motor-control-with-raspberry-pico-pi-and-drv8711-driver--part-3-gpio-1421751455</link><pubDate>Fri, 04 Apr 2025 21:13:19 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:67a214f8-dced-456b-b19d-f93972cdd8f3</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;If you want to directly control a H-bridge for a stepper motor, look at this PIO script:&amp;nbsp;&lt;a id="" href="https://gist.github.com/cleverca22/fea42ae43e18b9e563a1578a7d54c03b" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;https://gist.github.com/cleverca22/fea42ae43e18b9e563a1578a7d54c03b&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It allows stepping &lt;strong&gt;and micro-stepping&lt;/strong&gt; without a dedicated stepper motor driver. An H-bridge IC will do.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=28814&amp;AppID=86&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>