Raspberry Pi Pico PIO - Ep. 1 - Overview with Pull, Out, and Parallel Port

  Рет қаралды 39,612

Life with David

Life with David

Күн бұрын

Пікірлер: 100
@TheRandomwraith
@TheRandomwraith Жыл бұрын
This whole series is a truly exceptional education resource on using PIO & state machines with the Raspberry Pi Pico. Thank you for posting👏
@LifewithDavid1
@LifewithDavid1 Жыл бұрын
Glad you like them! Thanks for watching.
@grantpeterson2524
@grantpeterson2524 3 жыл бұрын
Who says old dogs can’t learn new tricks (and teach them exceptionally well too)! You’re a genius! Thanks for the help understanding, your teaching is concise but understandable.
@LifewithDavid1
@LifewithDavid1 3 жыл бұрын
Thank you for the kind words!
@AB8Y_radio
@AB8Y_radio 2 жыл бұрын
Finally someone showing how to control multiple pins. All of the examples I could find are single pin. I was able to use this to make a pio LCD driver. Next I want to make a 8080 parallel driver for a TFT display I have on hand.
@LifewithDavid1
@LifewithDavid1 2 жыл бұрын
That sounds like a very doable project. Good luck! Hopefully my other videos will help.
@AB8Y_radio
@AB8Y_radio 2 жыл бұрын
@@LifewithDavid1 one thing that doesn't make sense to me is the auto-pull feature. Shouldn't the threshold be 8 in your program? With it set to 16 you are only ever doing manual pulls. Out is pulling 8 bits then we wrap around and pull a new word into the OSR. Unless I'm not understanding it correctly.
@victorldunn9638
@victorldunn9638 3 жыл бұрын
I too had difficulty saying Instantiation to students during lectures in the UK... In the end I used "In-Stan-See-Ay-Shon" Great walk-through of PIO State Machines - Thank you.
@LifewithDavid1
@LifewithDavid1 3 жыл бұрын
That's a great way to do it. I'll spell it phonetically on my script next time. Thanks!
@BrightBlueJim
@BrightBlueJim 3 жыл бұрын
Think of it as in-stanch-yay-shun. The 'i' between stanch and yay happens automatically.
@pro-nav
@pro-nav 3 жыл бұрын
The grandpa I never knew I needed. Great video sir, I was trying to program PIO this helped me to understand what I was actually doing wrong. Thank you I will be waiting for next part.
@LifewithDavid1
@LifewithDavid1 3 жыл бұрын
You are very welcome
@rdear
@rdear 2 жыл бұрын
Thanks for making this video, David! I just got a few Picos and I’m excited to continue your series and get to making some interesting projects! Edit: Forgot to add that I’ve seen dozens of PIO videos in the past few months and yours by far is the best! Clearest explanation and demonstration I’ve seen!
@LifewithDavid1
@LifewithDavid1 2 жыл бұрын
Thank you so much for your kind words!
@mahoneytechnologies657
@mahoneytechnologies657 3 жыл бұрын
Love the Heathkit Instruments! I built many, The world needs another Heathkit like company!!!!
@LifewithDavid1
@LifewithDavid1 3 жыл бұрын
You're right! I built my first Heathkit, a good crystal radio, in 1961 when I was 7 years old.
@jchidley
@jchidley 3 жыл бұрын
I had looked at the PIO documentation which I found tricky to understand. Your explanation makes sense to me
@LifewithDavid1
@LifewithDavid1 3 жыл бұрын
Thank you. I'm working on a side set video next.
@norm1124
@norm1124 2 ай бұрын
Exactly ❤
@skf957
@skf957 3 жыл бұрын
I've coded (copied) and called a PIO blinking LED example from within a C++ program. I don't know C++ very well and find it tricky, but using PIO took me to whole new level of tricky. Good video, well explained and you've got my sub.
@LifewithDavid1
@LifewithDavid1 3 жыл бұрын
Thank you so much. Glad it was helpful.
@joseparedesalbuja8293
@joseparedesalbuja8293 3 жыл бұрын
Thank you for your investigation about instantation. I believe that is very important to program microcontrolers with optimum and fast data transfer through GPIOs. This method accelerates the job by using independent machine states further than registers (like arduino). Thank you again.
@LifewithDavid1
@LifewithDavid1 3 жыл бұрын
You're welcome. Thanks for watching.
@profesoremilio
@profesoremilio Жыл бұрын
It's just what I was looking for, I really appreciate the time you give us with these explanations. Greetings.
@LifewithDavid1
@LifewithDavid1 Жыл бұрын
Glad it was helpful! Hopefully you'll check out my other PIO videos.
@zilog1
@zilog1 2 жыл бұрын
the little raspi pico super hero reminds me of Captain Zilog for the z80 stuff lmao. i love it
@LifewithDavid1
@LifewithDavid1 2 жыл бұрын
Thanks for watching. I'm enjoying bringing him to "life".
@allthegearnoidea6752
@allthegearnoidea6752 2 жыл бұрын
This is just what I wanted Thanks David. My best regards Chris
@LifewithDavid1
@LifewithDavid1 2 жыл бұрын
Thanks for watching! Glad it helped. Check out my other Pico videos.
@trumpeteerTralala
@trumpeteerTralala Жыл бұрын
Thanks David. I like and appreciate your videos very much. Please keep it up!
@LifewithDavid1
@LifewithDavid1 Жыл бұрын
You're welcome. The viewers are why I keep making videos.
@vojtechmarsal8576
@vojtechmarsal8576 3 жыл бұрын
...and I thought the documentation for pico is awesome, but this video brings it to the next lvl. Thanks David I should finally build some project around the pico, looks like it should be the goto option for timing sensitive applications. I am rather surprised that I did not find a single example where PIO would be used as a counter tho, I guess noone needs rotary encoders these days.
@LifewithDavid1
@LifewithDavid1 3 жыл бұрын
Glad it was helpful!
@astrogus
@astrogus 2 жыл бұрын
Working with Pico W means changes. One pin important for testing is onboard Led. Normally was Pin 25, but now for Pico W is connected to infineon chip at WL_GPIO0. In micropython can be addressed like Pin("LED") or Pin("GPIO0"), but... if you try to use that nomenclature in StateMachine() instatation... set_base=Pin("LED") o set_base=Pin("GPIO0")... boom! no way. And.. of course, no documentation from raspberry SDK's, even in Pico W specific datasheet. I believe that for a board good for experimentation, the change of onboard Led is going to cause some headakes. Thanks for your excellent videos!
@LifewithDavid1
@LifewithDavid1 2 жыл бұрын
Thank you for the tips. When I finally get a "W", I'll keep that in mind. I'll try to document my journeys.
@astrogus
@astrogus 2 жыл бұрын
@@LifewithDavid1 I managed to get two of them (Pico W), send me PM with your address and I'll send you one. I think it will be more productive for the community in your hands!
@funkbungus137
@funkbungus137 5 ай бұрын
this is what I was looking for, awesome.
@LifewithDavid1
@LifewithDavid1 5 ай бұрын
That's great. Check out my other PIO videos for more info.
@flashcorp76
@flashcorp76 2 жыл бұрын
Love the End Fligt. Flite, flaeyt, lordy 😁👍🏻👍🏻Instantaneous Flight 😎
@LifewithDavid1
@LifewithDavid1 2 жыл бұрын
Thanks. Just a clip of a flight over Sandusky, Ohio, USA.
@4mb127
@4mb127 9 ай бұрын
For some reason this is the only place I've been able to find parallel out to pins example. Thanks, David. Very helpful. Question: Why do you need the autopull=True, pull_thresh=16 in the @asm_pio? Because you already have pull in the program.
@LifewithDavid1
@LifewithDavid1 9 ай бұрын
You are very perceptive. You don't! I was learning and I hadn't figured that out yet. Thanks for the comment, and thanks for watching.
@kristiansims
@kristiansims 3 жыл бұрын
This is the kind of Pico project I'm interested in! Instant sub.
@LifewithDavid1
@LifewithDavid1 3 жыл бұрын
Thank you!
@AbdullahKahramanPhD
@AbdullahKahramanPhD 3 жыл бұрын
You're a great teacher!
@LifewithDavid1
@LifewithDavid1 3 жыл бұрын
Thank you very much! 😃
@BuFu1O1
@BuFu1O1 2 жыл бұрын
Excellent analysis, sir!
@LifewithDavid1
@LifewithDavid1 2 жыл бұрын
Thanks for watching
@mohinderkaur6671
@mohinderkaur6671 2 жыл бұрын
Great video! Thanks!
@LifewithDavid1
@LifewithDavid1 2 жыл бұрын
Thanks for watching!
@montpierce424
@montpierce424 3 жыл бұрын
Great Video. Well Done !!
@LifewithDavid1
@LifewithDavid1 3 жыл бұрын
Thank you very much; and thank you for nudging me in my "throughput" video to dig into the RP2040 more deeply. I appreciate everyone's comments!
@siriokds
@siriokds 3 жыл бұрын
Great job. You make me this stuff understandable. Could you please make some example about pinsdir ? I'm interested in parallel bidirectional transmission where the direction of the data changes in real time.
@LifewithDavid1
@LifewithDavid1 3 жыл бұрын
I'm also interested in bidirectional parallel data transfer; so pinsdir absolutely will need to be addressed. It might be a while since I wasn't to show some other things first; like the speed increase on actual data with PIO and the delay features. Also, it's getting nicer outside so I have a VW to fix, and camping to do. But I will get to it! Thanks for the suggestion!
@siriokds
@siriokds 3 жыл бұрын
@@LifewithDavid1 One issue I'm addressing is how to synchronize pio pindirs with level shifter/buffer IC. Another issue is how to change pindirs to 8bit data pins leaving 16bit address pins as input. Please deal with the topic. 🙏
@audiodiwhy2195
@audiodiwhy2195 2 жыл бұрын
Excellent series! thanks!!
@LifewithDavid1
@LifewithDavid1 2 жыл бұрын
Glad you like them!
@Konrad_Wallmeier
@Konrad_Wallmeier 3 жыл бұрын
Hello David, thanks for the great explanation! Could you please also post the respective code sample. That would be great. The Github link does not work.
@LifewithDavid1
@LifewithDavid1 3 жыл бұрын
Thanks for the comment. I've added the file link into Github and tested it; it seems to work from several people's accounts.
@williwuchtig3336
@williwuchtig3336 3 жыл бұрын
Thank you a lot.
@LifewithDavid1
@LifewithDavid1 3 жыл бұрын
You are welcome!
@weakbit633
@weakbit633 2 жыл бұрын
Thank you for this Video and the 'instantation'! weakbit
@LifewithDavid1
@LifewithDavid1 2 жыл бұрын
You're welcome! I'm now able to say "instantiation" much more easily.
@kippie80
@kippie80 2 жыл бұрын
Oh yeah, like the ceramic chip illustrations. Bet they are your chips too? :)
@LifewithDavid1
@LifewithDavid1 2 жыл бұрын
Thanks, Yes they are, a 6502 and 6530 from 1975/76. Thanks for watching!
@radekhn
@radekhn 3 жыл бұрын
Hi David, I hold this in my memory, not dive into the PIO yet. There was mentioned somewhere that one of the PIO examples was BUS communication .... let me lookup ... hm... RP2040 datasheet, page 330 mentioned "8080 and 6800 parallel bus" however I did not found it in examples. The PIO is very hard to wrap mind around, and the documentation is hard to understand for me. The learning curve is very flat. Looks the key point is the "3.5.6. GPIO Mapping" on page 359
@LifewithDavid1
@LifewithDavid1 3 жыл бұрын
I didn't dive in until just recently. It took a little head scratching; but then it started to make sense.
@chriskiwi9833
@chriskiwi9833 2 жыл бұрын
Thank you
@LifewithDavid1
@LifewithDavid1 2 жыл бұрын
You're welcome. Thanks for watching! Hopefully the next few videos in the series will be helpful.
@Ololoshize
@Ololoshize Жыл бұрын
Thanks, like for great manual. But how can you fit 500 into 8 bits? I mean "for from 0 to 500", but you mapped only 8 PINs, so maximum value is 255.
@LifewithDavid1
@LifewithDavid1 Жыл бұрын
You're right. But I was just demonstrating output. The 8 bits will just roll over. For instance, it could have been from 0 to 20,000,000 and the least significant 8 bits would just keep rolling over. However you are right, I can only output 255 using the LED display I mapped. Thanks for watching!
@Ololoshize
@Ololoshize Жыл бұрын
@@LifewithDavid1 thank you, your content is great. This moment just confused me, thx for clarify.
@cthoadmin7458
@cthoadmin7458 2 жыл бұрын
Can you program PIO to do direct memory access? Direct access to the main memory of the main processors that is? High quality stuff, nice work David.
@cthoadmin7458
@cthoadmin7458 2 жыл бұрын
Of course you can!!! Silly me! you have a video on it... Palm going to forehead...
@LifewithDavid1
@LifewithDavid1 2 жыл бұрын
Thank you for watching! I actually have two videos on DMA, the second goes into more gory detail (Ep 8 & Ep 9).
@Marc_Wolfe
@Marc_Wolfe Жыл бұрын
Wait wait... so the FIFO registers are buffered in a way where the data can't be corrupted by my code not accounting for timing/synchronization? The PIO program will just either use the old number or the new number depending on timing?
@LifewithDavid1
@LifewithDavid1 Жыл бұрын
Yes, they are pretty flexible. For instance see this video (kzbin.info/www/bejne/kHalnIBre7ZrbLM) at about 8:37 to see how PIO can use the latest data from the transmit FIFO; even if no data is available. This video also discusses interrupts across state machines and the main cores.
@Marc_Wolfe
@Marc_Wolfe Жыл бұрын
@@LifewithDavid1 Should have thought to re-watch that one now that my ideas are slightly more than half baked.
@LifewithDavid1
@LifewithDavid1 Жыл бұрын
@@Marc_Wolfe Sounds like a cool project. I'd start by prototyping one system; like maybe real time engine crank position based on a single TDC sensor. That exercise will get your hands dirty with the pico and you can start to see the possibilities. You wouldn't even need an engine, you could use a drill and a hall sensor or IR sensor to start playing with it.
@Marc_Wolfe
@Marc_Wolfe Жыл бұрын
@@LifewithDavid1 As far as actually doing something, just going to try fuel only with an Arduino Mega on a generator engine... for now.
@Marc_Wolfe
@Marc_Wolfe Жыл бұрын
@@LifewithDavid1 If/when you do an Arduino Zero (SAMD21) series, I'd recommend ctrl+F "Event System" when looking through the datasheet. Maybe it can't do quite as complex of stuff, but when it can do the same, it sounds like it'd be much easier to implement.
@nuggetteam7
@nuggetteam7 3 жыл бұрын
hey this is great stuff! subbed!
@LifewithDavid1
@LifewithDavid1 3 жыл бұрын
Thanks for the sub!
@jdu1697
@jdu1697 2 жыл бұрын
Hello, thank you for this video. I am very new to electronics, but for my project I need to get my hands on it, is it possible to have a tutorial for the raspberry Pico to play videos randomly after activating an ultra sound sensor if it Please ?
@LifewithDavid1
@LifewithDavid1 2 жыл бұрын
Thanks for watching! The Pico might not be the best device for this. With only 2 MByte of storage and no native video interface, it would be a real struggle. However, a Raspberry Pi Zero would be able to handle it much more easily. I have done a video using a motion detector using a Zero: kzbin.info/www/bejne/kIG8lHSrjsqgfZY Hopefully that will help. Good luck!
@jdu1697
@jdu1697 2 жыл бұрын
@@LifewithDavid1 Ah okay thank you very much
@bobweiram6321
@bobweiram6321 Жыл бұрын
It would be nice if reorganize your playlists in chronological order and by topic. The one containing this video is partially sorted with a few non-PIO specific videos thrown in, making it difficult to follow along. I had to create my own playlist so I can reorder them. A big benefit of having organized playlists is that you'll rank higher on search results and subsequents video parts will show up on the viewer's queue, which increases your view count.
@LifewithDavid1
@LifewithDavid1 Жыл бұрын
Thanks, I didn't know I could do that. When I started the play list I just had a couple Pico videos; and then, like rabbits, they multiplied! I'll have to look into that. Thanks for watching!
@rtnashokverma3486
@rtnashokverma3486 2 жыл бұрын
Good morning David from CT, USA. Great video series on Pi Pico. Would you be interested in doing a Pico-based hardware/software project in C on commercial basis? Kindly let me know. Best wishes. Ashok
@LifewithDavid1
@LifewithDavid1 2 жыл бұрын
Thank you! I'm honored; but I'm not that good. My videos detail my adventures in learning about the Pico. I can't hold a candle to most of the designers out there.
@mahoneytechnologies657
@mahoneytechnologies657 3 жыл бұрын
Very well done, easy to understand!
@LifewithDavid1
@LifewithDavid1 3 жыл бұрын
Thank you very much. Thanks for watching!
@MrEdwardhartmann
@MrEdwardhartmann 3 жыл бұрын
Nice intro
@LifewithDavid1
@LifewithDavid1 3 жыл бұрын
Thank you!
@ahbushnell1
@ahbushnell1 2 жыл бұрын
Why didn't you use that scope behind you?
@LifewithDavid1
@LifewithDavid1 2 жыл бұрын
It's only a two channel scope. I do use the scope in later PIO episodes. Thanks for watching!
@leks341
@leks341 2 жыл бұрын
Great video! What I didnt understand is the part where microcontroller is communicating with this pio with .put() command. Where this i value is sent to?
@LifewithDavid1
@LifewithDavid1 2 жыл бұрын
The processor uses "put" to move data from the processor into the PIO TX (transmit) FIFO. PIO uses "pull" to move data from the TX FIFO into the OSR. PIO uses "push" to move data from the ISR into the RX (receive) FIFO. The processor uses "get" to grab data from the RX FIFO. Hope that helps!
@mahoneytechnologies657
@mahoneytechnologies657 3 жыл бұрын
I believe the RP2040 will cause all other Processor companies to introduce PIOs, PIOs are just Too Useful not to!
@LifewithDavid1
@LifewithDavid1 3 жыл бұрын
I see that Arduino is embracing the RP 2040.
Raspberry Pi Pico PIO - Ep. 2 - Side Set, Wait, and Handshaking
11:32
Life with David
Рет қаралды 18 М.
Raspberry Pi Pico 2: a RISC-V bet!
8:05
Jeff Geerling
Рет қаралды 304 М.
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 13 МЛН
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 16 МЛН
路飞做的坏事被拆穿了 #路飞#海贼王
00:41
路飞与唐舞桐
Рет қаралды 25 МЛН
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 32 МЛН
#220 PICO and PIO: First Look - far easier than you might 💭 think
21:51
DON'T Use Raspberry Pis for Servers! (Use THIS)
16:23
Hardware Haven
Рет қаралды 1,2 МЛН
Raspberry Pi Pico 2 | Everything You Need To Know
7:04
Core Electronics
Рет қаралды 62 М.
RP2040 - Introduction to Assembly Language - BMA-01
25:21
Life with David
Рет қаралды 13 М.
In-depth: Raspberry Pi Pico's PIO - programmable I/O!
17:19
stacksmashing
Рет қаралды 139 М.
Raspberry Pi Pico
16:16
ExplainingComputers
Рет қаралды 317 М.
How to use Timers on the RPi PICO
17:05
Making Stuff with Chris DeHut
Рет қаралды 17 М.
DIY H-bot Plotter (Raspberry Pi Pico)
19:01
Nikodem Bartnik
Рет қаралды 33 М.
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 13 МЛН