In-depth: Raspberry Pi Pico's PIO - programmable I/O!

preview_player
Показать описание
In this video we take an in-depth look into the new Raspberry Pi Pico/RP2040 high-speed programmable I/O system: PIO!

I know this video is quite fast-paced and dense, but I'm trying to experiment with different formats for these in-depth videos :)

Errata:
- 8:20 - the register is always decremented, not only if the condition is met
- 9:01 - The pin will be OFF for one cycle and ON for 2 cycles - said it the other way around accidentally

Links:

Timestamps:
00:00:00​ - Intro
00:01:15​ - PIO architecture
00:02:30 - The state machine
00:05:30​ - IO Mapping
00:06:56​ - Set Instruction
00:07:47​ - Jump Instruction
00:09:08​ - Mov Instruction
00:10:23 - In/Out Instructions
00:10:53 - Push/Pull Instructions
00:11:43 - IRQ Instruction
00:12:47 - Wait Instruction
00:13:38 - Delay
00:14:45 - Side-Set
00:15:48 - Program Wrapping
Рекомендации по теме
Комментарии
Автор

This PIO thing is pretty cool, I should learn more about it

Wren
Автор

The Raspberry Pi Foundation just lit a fire underneath Arduino. The pico is so packed with features and as such appeals to people that have experience with Espressif's chips while at the same time being more than a quarter the price of an Uno plus being more intuitive. They covered everyone with their hardware, they sure did know what they were doing.

martandrmc
Автор

Finally! someone talking the PIO.
And it has to be our favorite reverse engineer.

eFeXuy
Автор

I have been around microcontrollers off and on since the MK3870 at the end of the 1970s. Having this level of IO functionality driven by separate execution units with well thought out instruction sets is just mind-blowing in its possibilities. I know other chip families have had smart, programmable IO systems, but this takes it to a new level. As someone who used only to program in assembler for most of the 1980's, I found that this was a great video that explained the capabilities very well. Thanks. Subscribed.

GodmanchesterGoblin
Автор

Currently working on a PIO based project, and this video has been a life saver. I'd love see a video that has more examples of how IO mapping works in practice, especially with overlapping pins. Thanks for the great work!

rubenschaer
Автор

This clarifies lots what this board is intended to be, it is not just another microcontroller but a very advanced one. Thanks for the deep explanation

raulrrojas
Автор

Nice to have this video! I've read through the datasheet section, but this helps in visualising how it all comes together

xTJ
Автор

This is the video I've been looking for for the last two months! Thanks! Watching it on loop

RebelPhoton
Автор

After a lot of explanations that are either too vague or too specific, this is a nice concise description of how the PIOs work. Thanks.

edgeeffect
Автор

A lot of knowledge, nice video. But I could not quite follow without examples

suncrafterspielt
Автор

Around 8:25, JMP (X--), the documentation says: JMP X-- and JMP Y-- always decrement scratch register X or Y, respectively. The decrement is not conditional on the
current value of the scratch register. The branch is conditioned on the initial value of the register, i.e. before the
decrement took place: if the register is initially nonzero, the branch is taken. (RP2040 Datasheet, page 320, 321)
The emphasis is on ALWAYS so that the decrement is ALWAYS done.

gustavkusnir
Автор

This tie up everything together I've read or watched so far about PIO, but never quite get to breaking that threshold of solidifying my understanding of PIO. But the video did it for me. Great job!

DeLaCruzer
Автор

I can't thank you enough for this video, it is very clear, very well structured and very detailed. All other 'tutorials' I've seen pretty much say "PIO is really powerful, you can do amazing stuff. Here's an example of how to flash the on board LED. Work everything else out for yourself".

fourhorsesltd
Автор

I love assembly language for it being so simple yet so complicated.
If I'm programming, I always prefer low level, for some reason.... Yet I hate myself afterwards 😂

masonp
Автор

I recently got a Pico and a VGA drmo board, and I've spent the last few days getting to know all of the nice peripherals the Pico has. This video is a great overview of the PIO!

TheFerdi
Автор

WoW !!! exactly to the point, fast paced and covers everything , now when I read the spec. it will make sense ... thanks
this is the BEST !!!

martinrousselle
Автор

Excellent explanation. Thank you for this video! I reduced the speed of the video to 75% though which helped me watching the video in a more relaxed manner 🙂

stal
Автор

Best PIO explanation I've seen so far! Thanks so much. Looking forward to the examples video. I tried to follow the one in hackspace mag but really struggled. I think largely I'm falling down on the buffers and the the shift registers and keep getting lost on what direction things are going relative to what (PIO SM, main cores, or pins/IO). Your diagrams/animations really helped in this video though so thanks for that effort.

WistrelChianti
Автор

Very concise and visual explanation. I like it very much! It gives a great overview _and_ details

LeoDDJ
Автор

This is amazing. Thank you for the effort you obviously put into this (and your other) videos.

alexhirsch