Тёмный

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

stacksmashing
Подписаться 215 тыс.
Просмотров 130 тыс.
50% 1

In this video we take an in-depth look into the new Raspberry Pi Pico/RP2040 high-speed programmable I/O system: PIO!
For a high level video check • Raspberry Pi Pico: you... !
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
- Luke on Twitter: / wren6991
- Pico PIO examples: github.com/raspberrypi/pico-e...
- C SDK Book: datasheets.raspberrypi.org/pi...
- BBC Micro Emu on the Pico: • BBC Micro emulation on...
Links:
- Twitter: / ghidraninja
- Patreon: / stacksmashing
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

Наука

Опубликовано:

 

12 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 202   
@Wren6991
@Wren6991 3 года назад
This PIO thing is pretty cool, I should learn more about it
@AlasdairAllan
@AlasdairAllan 3 года назад
Not sure where that leaves the rest of us Luke. 🤦
@louigi6001
@louigi6001 3 года назад
Once you get the hang of it :-D let us know ... we will bug you for a step by step tutorial that takes us from the pio blink example to writing our own pio stuff. I'm still really puzzled on the raw C helper function % c-sdk
@AndrewTubbiolo
@AndrewTubbiolo 3 года назад
Pilot Induced Oscillation is a pretty scary thing to get into. :)
@martandrmc
@martandrmc 3 года назад
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.
@dieSpinnt
@dieSpinnt 3 года назад
You know that you are comparing Apples and Ataris, don't you? In addition, it won't do any harm if Arduino burns down. That was a joke, of course. Frameworks burn badly, or not at all, when they are mental constructs;) Don't forget: use the right tool for the right job. In some of the comments here you can clearly see how strange a high-speed logic with discrete building blocks is to people. To know about that too can sometimes be an advantage. Or simply have knowledge besides the Arduino, ESP or Raspberry filter-bubble. www.digikey.com/en/products/filter/embedded-microcontrollers/685 ... Fucking 89483 results!
@martandrmc
@martandrmc 3 года назад
@@dieSpinnt The AVR market is not going to change, I am just fearful of Arduino's position here. You could get a bare bones AVR chip for a comparable price to the pico even after the demise of Arduino no problem. It would only really show how expensive their stuff are and pressure them to act. Whatever happens, knowledge is knowledge.
@dieSpinnt
@dieSpinnt 3 года назад
@@martandrmc Hmmmm, I can't see us both discussing the (insert MCU here) Market. Who buys, calls! In retrospect, my thoughts on your Arduino worries to calm you down: If you have to do something quickly, use a BAD editor (I just don't understand why people pick it up. It's a free decision to use a text editor and not code-completion mumbo jumbo or the other way arround) ... in other words: one that works (!) and you want to try something quickly (with thousands of others strengthening your back with their experience through libraries or support), again: something that works ... proven There is always a niche for this type of hobby or craft work. This niche can be really big, so big that even professionals can use it to quickly try out an idea. I think you shouldn't worry. Especially not because of diversity :)
@dieSpinnt
@dieSpinnt 3 года назад
May I show you something other besides my inabilities of soldering TQFP packages? www.st.com/en/microcontrollers-microprocessors/stm32h747-757.html#overview A powerhouse with camera interface, GPU acceleration and a pin header count that doesn't bring us both to a laughter as the pico. The same free tools and support from an industry leader (let us make jokes, later:)). Raspberry Pi Pico ? I don't see this as god's chip. Don't let you fool from the hype. There are Ten of Thousands out there, if not more ... to choose from. Edit: I cheated a little: for the price of the Pico, you have to give up graphics acceleration but you have up to 160 flexible IO lines .... You can then connect externally via the memory interface, as well as operate quad SPI memory and what works as a PIO there does a DMA controller for normal people. The one described has 4.
@martandrmc
@martandrmc 3 года назад
@@dieSpinnt In retrospect, comparing the 2 prices is not by any means the full story. There are devboards out there with an STM32 at around the same price as the pico that have better performance than an Uno but still have not gotten to be main-stream yet. Arduino has alot of software behind it that could also work with a Mega if performance is needed. In conclusion i dont think that Arduino is in as much danger as i have thought, but still the pico is backed by a similarly well-known company. It would not be equivalent to compare STMicro the same way. (Also sorry for not checking for a week)
@eFeXuy
@eFeXuy 3 года назад
Finally! someone talking the PIO. And it has to be our favorite reverse engineer.
@GodmanchesterGoblin
@GodmanchesterGoblin 3 года назад
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.
@seancharles1595
@seancharles1595 Год назад
Me too. I spent five solid years working with 6809,8085,Z80,68K and this video has left my mind reeling with questions like "Yes, but what can/can't you do with it?" I've seen one video of a guy who has recreated the original Transputer boards. I learned Occam for a bit on one of those.
@rubenschaer960
@rubenschaer960 3 года назад
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!
@raulrrojas
@raulrrojas 3 года назад
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
@RebelPhoton
@RebelPhoton 3 года назад
This is the video I've been looking for for the last two months! Thanks! Watching it on loop
@tmkkka8093
@tmkkka8093 3 года назад
Exactly. It's quite complicated if one is new to assembler. .wrap_target at video start :)
@0xTJ
@0xTJ 3 года назад
Nice to have this video! I've read through the datasheet section, but this helps in visualising how it all comes together
@stacksmashing
@stacksmashing 3 года назад
Thank you, that's great to hear! :)
@TheFerdi265
@TheFerdi265 2 года назад
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!
@martinrousselle6380
@martinrousselle6380 3 года назад
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 !!!
@paulmaher5434
@paulmaher5434 3 года назад
Great video. Been reading around this all week without making much progress. Feel like I am starting to understand after watching this video. Well done.
@edgeeffect
@edgeeffect 3 года назад
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.
@WistrelChianti
@WistrelChianti 3 года назад
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.
@LeoDDJ
@LeoDDJ 3 года назад
Very concise and visual explanation. I like it very much! It gives a great overview _and_ details
@masonp1314
@masonp1314 3 года назад
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 😂
@edgeeffect
@edgeeffect 3 года назад
Assembly language is delicious!
@chonchjohnch
@chonchjohnch 3 года назад
If you want a good challenge, try implementing string.h
@JyrkiKoivisto
@JyrkiKoivisto 2 года назад
Coming from Amiga programming background I always find myself reinventing the wheel... :) Love the low level stuff! I haven't watched the whole video yet, but somehow I think that the Amiga co-processor (Copper) has been made to do I/O
@oskarboer1511
@oskarboer1511 3 года назад
Great, sounds like an awesome thing to learn asm and how low level stuff actually works. Thanks for the great explanation!
@DeLaCruzer11
@DeLaCruzer11 2 месяца назад
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!
@suncrafterspielt9479
@suncrafterspielt9479 3 года назад
A lot of knowledge, nice video. But I could not quite follow without examples
@stacksmashing
@stacksmashing 3 года назад
For sure quite a dry topic, tried my best to create it as a 'reference' :) Next one will have some practical examples, that should help!
@suncrafterspielt9479
@suncrafterspielt9479 3 года назад
Ok cool, cant wait for the next video
@frollard
@frollard 3 года назад
Agreed. as stack says, needs to be a reference first...but would be nice to show a very brief example of an instruction executing (like how the effect on square wave is demonstrated).
@zetaconvex1987
@zetaconvex1987 3 года назад
It would also help if he slowed down a bit. It's difficult to absorb information when it's blasted at you.
@spotlight-kyd
@spotlight-kyd 3 года назад
@@stacksmashing Maybe videos are not the best medium for a reference, surprising as that may be in the YT age.
@nithssh
@nithssh 3 года назад
This video is amazing. Very comprehensive! Thanks for making it!
@piperna5786
@piperna5786 3 года назад
Love this video, all I wanted to know in a pretty information-dense format
@chrismeggs8795
@chrismeggs8795 3 года назад
All this bitbanging is great! Takes me back to channel programming IBM/360. What I need now is a slightly higher level helicopter to understand the pico’s application in an architecture dimension.
@gustavkusnir483
@gustavkusnir483 Год назад
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.
@alexhirsch889
@alexhirsch889 3 года назад
This is amazing. Thank you for the effort you obviously put into this (and your other) videos.
@coder_rc
@coder_rc 3 года назад
I literally never seen a raspberry pie nor even I am a hardware guy still understood everything in this video Awesome work! Gonna watch your all hardware videos!!!
@stal1963
@stal1963 3 года назад
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 🙂
@tmkkka8093
@tmkkka8093 3 года назад
You know it's the creme de la creme when you go 0.75 speed :)
@chinoto1
@chinoto1 3 года назад
Meanwhile, I'm watching at 1.5 and not fully processing everything. Oh well, I'm just trying to get the gist of it and I'll look at documentation when I'm actually working with it.
@zyxwvutsrqponmlkh
@zyxwvutsrqponmlkh 3 года назад
​@@chinoto1 Lel, I had to jump down to 1.5 from 3.5; video speed controller is my best plugin.
@y2ksw1
@y2ksw1 Год назад
Thanks, this overview helped a lot to clarify some concepts.
@mandelbro777
@mandelbro777 Год назад
awesome explanation. these 8 PIO's will be super useful.
@deBaer
@deBaer 3 года назад
Very well-made and informative video, thanks!
@tav9755
@tav9755 3 года назад
Very good introduction into this interesting topic. Thanks for sharing
@MrEdwardhartmann
@MrEdwardhartmann 3 года назад
Thanks - I have been waiting for someone to make this video - you got my sub! I modified the ws2812 RGB example in the python code to work with sk6812 RGBW leds, and it was really hard to find any good examples of exactly what the PIO assembly instructions were doing. And even less info on what the python calls to that code was doing. I hope you will cover this in your future videos. Thanks for all your work.
@ryanj4274
@ryanj4274 3 года назад
Outstanding explanation! Now I just need to get my hands on one...
@turtius
@turtius 3 года назад
wow, that was a fantastic video! _marlin 2.0 might be able to run on this_
@vamshioruganti6319
@vamshioruganti6319 3 года назад
Great video, Thanks for your efforts, It is very useful.
@magiceireann
@magiceireann 3 года назад
I took this at a high level but thank you for bring this to my attention
@Xperimenter
@Xperimenter Год назад
This was very clear, thanks!
@bryansiepert9222
@bryansiepert9222 3 года назад
Great info and great animations :)
@elektron2kim666
@elektron2kim666 2 месяца назад
Great run through.
@devnol
@devnol 3 года назад
I like how this was released the same time as Rpf's video that explains PIO (but simply what it is, not how it works).
@m1geo
@m1geo 5 месяцев назад
Really cool, thanks!
@tanvach
@tanvach 3 года назад
This is some smart engineering!
@txd
@txd 3 года назад
Wow amazing video :D
@krystostheoverlord1261
@krystostheoverlord1261 2 года назад
Oooo, this is very interesting! Could be cool to use the pio to hook up some picos together, honestly now I am super excited to get my hands on a batch;
@grumpybollox7949
@grumpybollox7949 3 года назад
this video is very helpful
@csbluechip
@csbluechip 3 года назад
Nice job! Thanks :)
@gcm4312
@gcm4312 3 года назад
this is awesome
@MichaelKingsfordGray
@MichaelKingsfordGray 2 года назад
Thank you, sir!
@larsmuldjord9907
@larsmuldjord9907 Год назад
Currently looking into implementing i2s audio using the PIO sm's. It's easy enough to imagine "how to do it" in my head. But I have a hard time grasping "the right way". Been watching videos and read up on the documentation. Some stuff confuses me, some makes sense. This video was helpful, although I did miss some examples for some of the instructions and the whole concept of mapping certain pins to PINS are still a bit confusing to me. I'm a visual guy, so I definitely got more from the first part of the video with the visual aids. Great video nonetheless. :) Thanks. EDIT: Btw, one thing I am having a very hard time with, is trying to connect my data in my C / C++ code with whatever the sm reads / works on. That whole IRQ, DMA, FIFO, ISR, OSR situation makes my head explode. :D It's probably simpler than it seems. I just need to slowly work my way into it.
@DigitalJedi
@DigitalJedi 10 месяцев назад
I absolutely love PIO in my chips. It means you can hook up just about anything you want, unconstrained by physical ports or dedicated controllers. It's almost like a tiny FPGA on your chip. My ultimate goal is to get multiple RP2040s running as a cluster using their PIOs.
@drivers99
@drivers99 15 дней назад
I’m actually working on clustering a bunch of picos to rebuild Ben Eater’s 8 bit computer (but planning on using 16 bit addresses instead of 4 bit addresses for memory; 65536 bytes instead of only 16 bytes). It kind of silly to build a (slow) cup out of a bunch of processes but some good things are: lots of lights, ability to experiment with cpu architectures quickly (easier than wiring lots of 7400 series chips), and it’s fun and I just want to haha. Python is good enough but I want to using PIO if possible.
@yahmk3978
@yahmk3978 3 года назад
Thank you!
@mr.unbekannt2163
@mr.unbekannt2163 3 года назад
Nice to have this video! This helps me to realize my project. But I don't understand the state machine, because from the UML perspective this is not really a state machine. A state machine must have an entry point and transitions between states, including conditions. The exit state is optional.
@peter9477
@peter9477 3 года назад
Not sure where you're getting that definition. If it's from UML, then they've redefined the term. A state machine doesn't need an exit point. And it certainly doesn't need transitions defined between every state (if that's what you meant there). I've built many no-exit state machines, and almost none with all possible transitions allowed.
@mr.unbekannt2163
@mr.unbekannt2163 3 года назад
@@peter9477 de.m.wikipedia.org/wiki/Zustandsdiagramm_(UML) im Vergleich dazu der de.m.wikipedia.org/wiki/Endlicher_Automat
@peter9477
@peter9477 3 года назад
@@mr.unbekannt2163 I'm not sure what you're expecting me to get from that page. Are you claiming something in it contradicts me? Or are you claiming that the UML definition does require all possible transitions to be allowed? (In which case as I said they have redefined the term, and inappropriately, I might add.)
@fourhorsesltd3788
@fourhorsesltd3788 2 года назад
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".
@philrod1
@philrod1 3 года назад
This [stacksmashing] thing is pretty cool, I should learn more about it
@lohikarhu734
@lohikarhu734 3 года назад
Quite a bit like the lighting control 'engines' that in the LP5523 LED controller (ca.2006), but maybe without the engine priorities(?), although the pin mux idea is similar. this allows for some pretty fast real-time functionality, without needing cpu intervention, and with a LOT of flexibility. (BTW, if you do need an LED controller that doesn't need you to constantly execute code to do complex LED functions, the LP5523 was designed to offload the cpu, and allow LED functionality when the cpu is in deep sleep, even has an "interrupt" input/output to respond to, or initiate, other hardware functionality.)
@GottZ
@GottZ 3 года назад
This is sooo nice! Imagine someone would create a gameboy cartridge with it xD
@stacksmashing
@stacksmashing 3 года назад
Someone did! www.reddit.com/r/raspberry_pi/comments/lhym1v/gameboypico_update_we_have_a_working_game_but/
@kaki9927
@kaki9927 3 года назад
I always really enjoy watching these videos but afterwards I feel like I know nothing xD
@edgeeffect
@edgeeffect 3 года назад
After you've come through the assembly language door with PIO you can carry on down the rabbit hole and program the ARM cores in assembly too!
@sn0wst0rm
@sn0wst0rm 3 года назад
I love your channel so much and I really want to learn how to use ghidra, I really hope you’ll make more learning videos because I love this field and you can teach concepts and methods really well in my opinion, keep it up please, every video from you is a blast!
@xmine08
@xmine08 3 года назад
Crazy level of presentation my dude! Also, PIOs were the thing that made me interested in the Pico - I'm not even an embedded developer. However, with the Shift Register and its capabilities alone the possibilities are crazy ♥
@schwellhaimbassriot2660
@schwellhaimbassriot2660 3 года назад
mal kurz weg vom nüntändö, hehe. didn't know that you can do so naice stuff with pio - fantastic.
@TimoBirnschein
@TimoBirnschein 3 года назад
This looks like the perfect uC to implement some very serious bus sniffers like I2C or SPI. BusPirate has proven to be too slow and unreliable for this, FPGAs as a bit too unapproachable for most.
@dougjones468
@dougjones468 3 года назад
extremely helpful!! i had to play @ 3/4speed because i am from southern US and i listen as slowly as i speak)) i have posted question on rpi-forum about feasibility of pio-state-machines to implement canbus (would need external differential drivers), but sadly no answers. Please reply with opinion if you are familiar with canbus. many thanks for well done vid.
@patrickcs
@patrickcs 3 года назад
Great video. I would love to have this as a document. I’ll run through this slowly and make a lot of notes. It’s very useful. I’d love to know where you got the data from .
@zakz1586
@zakz1586 3 года назад
Datasheets I presume
@_laxman_vijay
@_laxman_vijay 7 месяцев назад
datasheets.raspberrypi.com/pico/pico-datasheet.pdf
@agniveshadhikari
@agniveshadhikari 3 года назад
So basically, my processor gave me a bunch of more complicated processors for free, and now I have to learn them. Great. /s
@RussTanner
@RussTanner Год назад
Fantastic video - very well done. Do you have a followup video to this? I cannot find it on your channel.
@ikocheratcr
@ikocheratcr 3 года назад
I really like this feature in RP2040, I wonder how they come up with it. Is there any other microcontroller that has something like this?
@brycem8161
@brycem8161 3 года назад
Cypress' PSOC series have fpga like programmable hardware blocks builtin.
@edgeeffect
@edgeeffect 3 года назад
It's like a more accessible version of the Parallax Propeller.
@DeepspaceHorizon
@DeepspaceHorizon Год назад
This is actually what i have been waiting for, if i understand it correctly. Thanks for this video! Do i get it right that i can read 8 bit in parallel by only one state machine and write it into memory via dma while data is being transferred via wlan from memory, and all this runs concurrently?
@TheJaguar1983
@TheJaguar1983 Год назад
This reminds me a lot of the code in Shenzhen I/O.
@Grazfather
@Grazfather 3 года назад
Great vis. How did you make these animations?
@michael-rommel
@michael-rommel 3 года назад
Hi, I think there is another errata to be written: at 7:37 and 14:04 you explain, that "set pins, 1" turns an output ON, whereas at 9:01 you explain it as turning it OFF. Or did I misunderstand something here? Thanks for the great video - that was well-paced with dense information!
@stacksmashing
@stacksmashing 3 года назад
You are absolutely correct, great catch! It's off for 1 cycle and on for 2 cycles. Added it to the errata. Glad you liked it!
@BashingDinosaurs
@BashingDinosaurs Год назад
Thanks, cool video. Can the PIO instructions read analog inputs?
@fred-9929
@fred-9929 Год назад
Thanks for this PIO introduction! I now understand what I read in the datasheet ;o) I have a question: as IN and OUT pins groups can overlap, how are common pins handled? Do they automatically change direction depending if they are shifted in or shifted out? I'm asking because I would like to interface the Pico with a Z80 bus, so IN and OUT should point to the same pins...
@kumarbhatia6566
@kumarbhatia6566 3 года назад
Very good but very fast in the discussion. Have to rewind and listen a few times to digest the topics. 8:59 example for JMP is documented in reverse? First the output will be OFF and then ON for 2 cycles? Please confirm.
@davidsuzukiispolpot
@davidsuzukiispolpot Год назад
I just stumbled upon this and am blown away by this feature. I wanted something like this in the past and was considering programmable logic. Does anyone know which other processors have this feature? Maybe the raspberry Pi computers?
@aleXelaMec
@aleXelaMec Год назад
Sad you didnt make some examples. But overall a great vid. Thanks
@trhosking
@trhosking Год назад
He links to examples in the description
@aleXelaMec
@aleXelaMec Год назад
@@trhosking my bad. Thanks
@AZOffRoadster
@AZOffRoadster Год назад
I was surprised to see Pi make this product. What, no linux? I'm in. It reminds me of bit slice programming on the AM2900, or the TPU on the 68332, or Motorola DSCs, or even EPROM based state machines. Now I just gotta think up an application.
@lawrencedoliveiro9104
@lawrencedoliveiro9104 3 года назад
8:28 The Motorola 68000 family had an unusual decrement-and-branch instruction: instead of decrementing and branching until the count reached zero, in which case it would stop branching and fall through (existing the loop), it would decrement to -1 before exiting. This let you deal easily with the case where the loop count was initially zero, in which case you want to just jump over the loop completely. E.g. move.w #count, d0 bra loop_end top_of_loop: .... body of loop ... loop_end: dbra d0, top_of_loop
@lukamarin9622
@lukamarin9622 6 месяцев назад
So had the Z80: 'djnz address', which stands for Decrement and Jump if Not Zero, where register b (8 bit) was the one being decremented. But these very rare and useful instructions (for creating loops) have not much to do with this discussion about PIO, which are far more complex and programmable!
@nickaxworthy3236
@nickaxworthy3236 Год назад
Thanks
@stacksmashing
@stacksmashing Год назад
Oh, my first Super! Thanks a lot! :)
@WistrelChianti
@WistrelChianti 3 года назад
9:08 isn't it off for 1 cycle, on for 2? (the 2nd cycling being the jmp command execution) just checking really.
@tmkkka8093
@tmkkka8093 3 года назад
You are correct, but your timecode is wrong ;)
@peter9477
@peter9477 3 года назад
More like 8:55 but yeah.
@stylesoftware
@stylesoftware 2 года назад
Can you do a vid on software tooling and first examples? Seems a lack out there in youtube land, we are all super keen to get PIOing!
@duprie37
@duprie37 3 года назад
Your English accent is so adorable 🥰
@LittleRainGames
@LittleRainGames 3 года назад
So wait this runs separate from the main code? Man this micro is unbelievable, I want to switch to this, but not sure about the IDE, and Id need to be able to purchase chips.
@BrownianMotionPicture
@BrownianMotionPicture 2 года назад
I never fail to be impressed by the features of the rp2040, and it's
@SimonTekConley
@SimonTekConley Год назад
Wow, I didn't realize the Raspberry PI Pico's have been out for 2 years now.
@FluffyAngelUwU
@FluffyAngelUwU 3 года назад
Go pio yeah yeah go pio yeah
@lukamarin9622
@lukamarin9622 6 месяцев назад
If this post wasn't so 'old', I could have swear it is 100% machine (AI) generated! The speed, rhythm, regularity of reading a text is definitely a robot's voice, no doubt in my mind. Anyways, a good presentation, although a bit superficial.
@madierardmovies9634
@madierardmovies9634 Год назад
Aren't the arrows for RX and TX backwards on the shift register slide? ISR IN has a RX FIFO arrow pointing away from ISR IN. (and Vice versa for out)
@madierardmovies9634
@madierardmovies9634 Год назад
(at time 2:59)
@madierardmovies9634
@madierardmovies9634 Год назад
IGNORE my IGNORANCE... all relative to GPIOs. So input from GPIO's to FIFO buffers, to CPU(?).
@taranagnew436
@taranagnew436 2 года назад
is there a cheatsheet on the io pins commends?
@lawrencedoliveiro9104
@lawrencedoliveiro9104 3 года назад
16:33 Those are just labels that don’t have any special meaning to the assembler. The CPU program then has to set the values of these labels into the relevant PIO registers to enable wrapping.
@gudenau
@gudenau 3 года назад
I'm going to want to make a specialized one wire serial adapter with this thing one day. Edit: Is there a simulator for this? I don't have the hardware to debug the input and output of one of these, would love to be able to provide some basic pin states over time and be able to plot what it does over time.
@dieSpinnt
@dieSpinnt 3 года назад
Search for "Signal/Noise Ratio". One Wire ... ROTFL From Wikipedia: "1-Wire is a device communications bus system designed by Dallas Semiconductor Corp. that provides low-speed (16.3 kbit/s[1]) data, signaling, and power over a single conductor." There is a reason why this is low speed. By specification you don't need high-speed shenanigans like shown in the video and simply by the physics. It is impossible to get a good signal integrity via this bus-implementation at high frequencies. If you are flying up to the 100MHz+ range, nobody can deny technologies like LVDS and the study of high frequency behavior of electronics and the corresponding physics. Also, that the pico can theoretically generate these signals must not mean that he can also DRIVE the signals necessary. Don't get me wrong, please try your (by my understanding) worthless experiments. Maybe with a better bus? At least two wires? Well wired for high frequencies with buffers? The simulator: RTFM, I mean the data-sheet (Reference and Programming) and really ... you need a simulator for a $5 device you can debug and watch at the oscilloscope? Please stop joking ... no, have fun!:)
@gudenau
@gudenau 3 года назад
@@dieSpinnt If you want me to get a DSO by all means send me the money.
@dieSpinnt
@dieSpinnt 3 года назад
@@gudenau Nope. I am not forcing you into something. You can live without one, but then ... you simply can't do what you are trying to do. Just that:)
@stacksmashing
@stacksmashing 3 года назад
Jedzia you should really overthink your attitude, you are not contributing positively.
@dieSpinnt
@dieSpinnt 3 года назад
@@stacksmashing Take for example the very good qemu-arm emulator. It is impossible to translate timings to a real chip. High speed one-wire protocol ... I overthought it: He will try it with or without me. DSO: There are $29 STM32F103 based ones out there which would be fine for 16kbit/s. I don't gave that advice from thin air. To prevent tears and frustration! Low speed applications, but not for 200MHz SPI or something in that region .... which always works and you can as a bonus ... rely on! Skepticism is always not seen as positivity. But thanks that you RTFM and present that here with your videos. Can't wait for a real world app of PIO.
@SWJIAO
@SWJIAO 3 года назад
is it possible to implement QSPI(Quad-SPI) with PIO of Pico?
@patrickcs
@patrickcs 3 года назад
I will make document from this it’s great. Do you have access to more info ?
@bennguyen1313
@bennguyen1313 11 месяцев назад
Any examples of some of the cool things that people have imagined with this type of I/O power? For example, I looked for some logic analyzer or AWG, but nothing on YT shows up!
@FindecanorNotGmail
@FindecanorNotGmail 3 года назад
You forgot to mention that DMA can be used to read and write the FIFOs. Because you didn't, I started to doubt that it had DMA so I had to look it up in the docs.
@stacksmashing
@stacksmashing 3 года назад
At 1:55 you can see DMA listed on the left side :)
@proxy1035
@proxy1035 3 года назад
3:05 wait, since the Arduino core for the Pico allows for overclocking to ~250MHz does that also make the PIO run faster?
@tmkkka8093
@tmkkka8093 3 года назад
Yes, PIO runs with system clock (so 250MHz overclocked) or you can set it to custom, lower frequency via a divider.
@csbluechip
@csbluechip Год назад
I have seen reports of the RP2040 being overclocked to 270MHz, but the Pico Dev Board UNDERclocks the CPU to 125MHz ...so remember to calculate your divider based on the clock speed returned by `clock_get_hz(clk_sys)`
@thegenxgamerguy6562
@thegenxgamerguy6562 3 года назад
Is PIO fast enough to emulate the bus operation of an 8 MHz CPU? I want to hardware emulate an 8086.
@rjameslower
@rjameslower 3 года назад
Stupid question . What Is the diference between stm32 AND this pio?
@MrEdwardhartmann
@MrEdwardhartmann 3 года назад
pio is a programable co-processor of the RP2040 micro processor made by Raspberry Pi. STM32 is a family of microprocessors (I think the company name is ST Microelectronics) - there are probably more than a hundred different versions of STM32 microprocessors depending on what capability you need. Here is a video comparing the black pill with an STM32f411ceu6 with a Pico - ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-I2VcIKlL-9w.html
@xy-box
@xy-box 3 года назад
I’m not clear: what is application for this? Maybe any examples? Do you continue?
@Mr.Leeroy
@Mr.Leeroy 3 года назад
how similar or different is RP2040s PIO to something like 81C55 IC? Could same functionality be implemented externally on other MCUs?
@dieSpinnt
@dieSpinnt 3 года назад
It is totally different from your RAM chip:) I think you meant a micro-controller with a 80ties series core(?). Totally different architectures (ARM)from a totally different time-period. Yes, such high-frequency functionality can be implemented with standard gate logic, FPGA or something similar. At all, first you have a problem and then you solve it ... not the other way around. Lets wait for some hobbyist talking about their +200MHz SPI and then have a good laugh.
@Mr.Leeroy
@Mr.Leeroy 3 года назад
​@@dieSpinnt I guess, I should rephrase. I am interested if there exist a readily available IC that could bring PIO functionality to other MCUs. I just recall this RAM chip used in some similar way in a schematic of some production device. That's why I saved it, but I am still lucking embedded designing/programming skills to read datasheets fluently to fully understand chips capabilities. I get that Picos PIO is built internally with the same logic that you could design externally with discrete parts, but that is like reinventing the wheel and a whole lot of work on a completely different level of EE, and there are problems like shared memory, that are probably not that trivial to solve, etc.. FPGAs are simply in a order of magnitude different price category, and the thing with reinventing the wheel still stands if there exist integrated solution.
@dieSpinnt
@dieSpinnt 3 года назад
@@Mr.Leeroy Simple experimenting boards for FPGAs are under $20. Chips, PLDs are a fraction of it. I think, this PIO is a nice gimmick and other MCUs handle problems given just equally good with other technologies like IRQ, normal buffers/plain old shift register, dedicated counters and DMA. ..... The problem comes first, then the solution:) So that PIO first has to show its superiority in a real world use case. An example of my skepticism: A traffic light control could be implemented very elegantly with this PIO facility. But that is far from being a high-speed application. In addition, this can be programmed exactly in the traditional way. Without any addition that might be extremely difficult to debug. The instruction memory is much too small and even more difficult to understand for fast applications. It's just old wine in new bottles. The timing has to be right, with or without a PIO. PIO is not cut off from the rest of the application ... And if it is (like a gimmick) it means that the rest of the processor is bored and I would not have needed PIO in the first place. Have you seen Schmitt-Trigger inputs as such for high-speed I/O? Not me:) And I've never seen a programmable DMA controller with PHB(Peripheral High-Speed Bus) access before. No, that was meant ironic. You have to search hard for a MCU without one, these days:) I am not saying this is not useful. Only that this is not something special and maybe a little hyped.
@Mr.Leeroy
@Mr.Leeroy 3 года назад
@@dieSpinnt I'm not advocating for PIO like something worth writing home about in terms of real product design. It's seems like relic from the past. Although, the fact that it is not blocking main cores could come in handy one rainy day. Sure you can code the same thing in a bunch of different ways. But it fits well in Raspberrys educational theme and is indeed an intriguing little feature in educational perspective, just something very low level to tinker (play really) with, get out of comfort zone of Wiring framework.
@dieSpinnt
@dieSpinnt 3 года назад
@@Mr.Leeroy No, sorry. I'm not blaming you. I just think it's terrible that so many others are now on the hype. Blinkers. As if there was nothing else. Programmable I/O is a very flexible and good concept. This is moving in the direction of parallelization or externalization, and there, too, the necessary caution must be exercised. Your thoughts about the Arduino / Wiring Framework? Absolutely true! Let us surprise;)
@wickeddubz
@wickeddubz 3 года назад
My goodness, this is some high-level info for low level hardware manipulation. Deffo not for me, but for those who gonna implement various protocols and interface emulation. Thumbs up!
@hariranormal5584
@hariranormal5584 3 года назад
i kinda wanna make a calculator with this UwU
Далее
Raspberry Pi Pico - PIO explained
50:01
Просмотров 27 тыс.
How Many Balloons Does It Take To Fly?
00:18
Просмотров 37 млн
Raspberry Pi Pico Stepper Motors via PIO
25:17
Просмотров 59 тыс.
Raspberry Pi Pico talks to Intel 80188 as I/O device
1:00:36
Raspberry Pi Pico - Control the (I/O) World
1:03:16
Просмотров 603 тыс.
How the Apple AirTags were hacked
8:38
Просмотров 1,6 млн
The Madness of Z80 I/O
22:52
Просмотров 71 тыс.
What is PIO | Programmable I/O on Raspberry Pi Pico
5:34
Turning a Raspberry Pi Pico into a GPU!
16:42
Просмотров 104 тыс.
Raspberry Pi Pico PIO - Ep. 8 - Introduction to DMA
18:21
Acer Predator Тараканьи Бега!
1:00
Просмотров 426 тыс.