Quantcast
Viewing all articles
Browse latest Browse all 4879

MicroPython • Re: "Nine Pico PIO Wats with MicroPython (Part 1)"

The biggest gotcha, or Wat as we seem to be calling it here, IMO is that the PIO are programmed from a perspective of how the ARM-side sees things.
Good point! I've added a new section to part 1:
Bonus Wat 2.5: Dr. Dolittle’s PIO Pushmi-Pullyu
Two readers pointed out an important PIO Wat that I missed — so here’s a bonus! When programming PIO, you’ll notice something peculiar:
  • The PIO pull instruction receives values from TX FIFO (transmit buffer) and inputs them into the output shift register (osr).
  • The PIO push instruction outputs values from the input shift register (isr) and transmits them to the RX FIFO (receive buffer).
Wat!? Like the two-headed Pushmi-Pullyu from the Dr. Dolittle stories, something seems backwards. But it starts to make sense when you realize PIO names most things from the host’s perspective (MicroPython, Rust, C/C++), not the point of view of the PIO program.

This table summarizes the instructions, registers, and buffer names. (“FIFO” stands for first-in-first-out.)
Image may be NSFW.
Clik here to view.
Image

Statistics: Posted by carlk — Sun Jan 26, 2025 10:22 pm



Viewing all articles
Browse latest Browse all 4879

Trending Articles