This article explores the peculiarities of programming the Raspberry Pi Pico's PIO using Micropython, particularly highlighting the nature of constants. It builds on points from Part 1 and focuses on the issue of the set instruction's limitation to constants between 0 and 31. This can lead to silent corruption of PIO instructions, much like the tragic miscommunication in Shakespeare’s narratives. The article illustrates these concepts through an example involving an ultrasonic range finder and discusses alternative approaches to managing constants in PIO.
In the world of PIO programming, constants should be reliable, steadfast, and, well, constant. But what if they're not?
The set instruction in PIO is limited to constants between 0 and 31. Moreover, the star-crossed set instruction doesn't report an error.
Collection
[
|
...
]