Raspberry Pi Pico PIO - 8 Little Processors You Can Program

preview_player
Показать описание
The processor in the Raspberry Pi Pico, the RP2040, has a feature called PIO - Programmable Input/Output. As a result you have access to 8 little processors with their own assembly language which you can program to create deterministic interfaces to the real world.

The Pico's PIOs are programmable like general processors. The 8 state machines processors can independently execute programs to manipulate GPIOs and transfer data.





#garyexplains
Рекомендации по теме
Комментарии
Автор

Gary, thank you for this content, I’m a retired hobbyist that between Christmas and new year’s eve discovered the existence of FPGA boards. Rather daunting, but this story might help me a bit. I do know assembly, and the pi pico is rather accessible to me. I’ll be following your channel for sure, and I will also look into what you produced so far. Thanks a lot, very helpfull and motivating! 👍😊

bertkoerts
Автор

The last minute of this video really saved me! Thank you.

johnwilson
Автор

Yet another excellent production. Please keep producing these types of educational videos. Good job, professor!

muddyexport
Автор

took me back to my 6502 days back in the mid 80's thanks 🙂

chrisforeman
Автор

This kind of thing is amazing! It really saves main CPU clocks cycles, rather than having to service high frequency interrupts.
You've produced a great video demo, thanks.
Some NXP chips (I work with MPC5534 and MPC5777C) have a similar I/O coprocessor they call an eTPU. It concentrates more on timing. It has two independent timers, one can have dynamically variable speed. Each I/O (I think there's 32 per eTPU. 5534 has one eTPU, 5777C has 3) has two capture/compare registers, and can trigger interrupts.
You can code the ISRs in a weird dialect of C or different weird dialect of C++, but may have to pay for a compiler.
Each I/O can be assigned RAM, as well as global eTPU RAM. Any RAM declared as public can be accessed by the CPU(s) as well as the eTPU.
It's amazing what can be done with it, but it can be hard to ensure proper coherency when you start doing complex things.

sparkyj
Автор

The truly genius move by the Raspberry Pi Foundation, FPGA I/O features without complicated dev tools, amazing flexibility for interfacing.

rbus
Автор

Do we really need any more channels besides yours and Explaining Computers?

markharrisllb
Автор

Good video Gary, but with all the Time delays in Python you kind of missed the point of the PIO for new users.
The key is that once started, the PIO routines run separately in the background and do not affect the performance of the main Pico processors so, for example, a PIO could be reading serial data with very accurate timing, while the main processors run complex mathematics on the data...

DukeofEarl
Автор

Many thanks for this video. I was trying to program the PIOs using Rust and could not get it to work. This really helped me sort out my thinking mistakes and get it working (the translation from Python to Rust was not so difficult).

I also wasted a lot of time on the difference between OUT and SET pin mappings - pity I didn’t watch this beforehand.

andrewdoble
Автор

Thank you Gary. You've made understandable what every other website and channel has carefully avoided. I'm going to have a play and see how it goes.

ghjq
Автор

The PIO is one of the things which make the picopi so great compared to other systems in this area, thanks for this video! I have relatively quickly hit a block which probably would not have been solvable properly on other systems but now I have had a serious look at the PIO yesterday, and my judgement is, that it is solvable with minimal effort compared to for instance an Arduino !

werpu
Автор

Exactly what I needed to get my state machine working the way I wanted. Thanks!

rugwalle
Автор

Thank you Gary for keeping us educated! We love your work!! Cheers

nevg
Автор

You really do have a knack for explaining things- thanks very much.

johnwettroth
Автор

Great explanations and great capabilities on this chip, AND with micropython!

DrPowerElectronics
Автор

If you can get ahold of one, the Teensy 4 and 4.1 have a suped-up version of the PIO called FlexIO. That would make a very interesting episode. And that can all be done within the Arduino IDE.

jonathanstein
Автор

he explained PIO well basically in the first 40 seconds. awesome

godfreyw
Автор

Exactly what I was looking for Great work !!!! Keep up the good work 🙂

shlamdrago
Автор

Wonderful, interesting and easy to follow - thank you

AllThingsCloudie
Автор

Thanks Gary! The inclusion of the pio in the Pico is revolutionary. I'm hoping later iterations give us more than a 32 instruction memory shared with all 8 of the state machines! While having these state machines is wonderful, having more instruction space would make this truly wonderful!

markwarburton