Raspberry Pi Pico PIO - PIO Interrupts using C - Ep. 19

  Рет қаралды 6,624

Life with David

Life with David

Күн бұрын

Пікірлер: 43
@MordecaiV
@MordecaiV Жыл бұрын
I know you'll probably have more popular videos with micropython, but I really really appreciate the c level videos.
@LifewithDavid1
@LifewithDavid1 Жыл бұрын
I like C so much better. Yeah, it's a little more complicated; but you have much better control with C. You'll see how much better C is with interrupts than MicroPython. Thanks for watching!
@Steven-jf4cs
@Steven-jf4cs 8 ай бұрын
I've seen many interrupt introductions and this was by far the best! Top drawer!
@LifewithDavid1
@LifewithDavid1 8 ай бұрын
Thank you!
@kamals4905
@kamals4905 Жыл бұрын
Best tutorial I've ever watched about pio As i understand with this example, here is second scenario, Drive addressable led (neopixel or ws2812)with any other mcu, Decode that signal with pio instance ,by doing that I think it will be easy to understand more clearly Thanks👍
@LifewithDavid1
@LifewithDavid1 Жыл бұрын
Glad you liked it. I'll have to look at neopixel. I see there are exercises in the SDKs. Thanks for watching!
@davidmiddleton2927
@davidmiddleton2927 Жыл бұрын
I am very impressed and grateful for your efforts
@LifewithDavid1
@LifewithDavid1 Жыл бұрын
Thank you so much 😀
@goowatch
@goowatch Жыл бұрын
Thank you! I learned a lot. Your explanations are the best
@LifewithDavid1
@LifewithDavid1 Жыл бұрын
Glad it was helpful! Thanks for watching!
@28add11
@28add11 Жыл бұрын
Thanks! Very helpful to learn about all the C interrupts.
@LifewithDavid1
@LifewithDavid1 Жыл бұрын
Glad it was helpful!
@jimm7001
@jimm7001 Жыл бұрын
David, you "compiled" a lot of information into this video! Nice presentation. But, a tangential question: We appear to be at around 100 videos. Do you know what the rating is for the service life of the Vid-Shirt? Thanks.
@LifewithDavid1
@LifewithDavid1 Жыл бұрын
Thank you. We handle it with museum curator gloves and wash it periodically. LOL.
@danman32
@danman32 10 ай бұрын
I encountered kernel panics too when i used interrupt callback in ESP32 to indicate when an ADC sample was ready to calculate RMS voltage to current routine. Solution there was to use RTOS built into the ESP32 framework. In the case of the Pico, the so-called crash may be the watchdog timer, which was the issue with the ESP32. Interrupt callbacks on ESP32 would hold up all other background housekeeping, including clearing the watchdog timer in a timely manner.
@LifewithDavid1
@LifewithDavid1 10 ай бұрын
I expect you are correct. I've done interrupts using bare metal with no watchdog tmer and they are rock solid. Thanks for the comment!
@sapiosuicide1552
@sapiosuicide1552 7 ай бұрын
This video saved my life
@LifewithDavid1
@LifewithDavid1 7 ай бұрын
Wow, that's a lot of pressure! Thanks for watching (and living). :-)
@honorbean2973
@honorbean2973 9 ай бұрын
Wow this is impressive. Nice work!
@LifewithDavid1
@LifewithDavid1 9 ай бұрын
Thank you very much!
@markday3145
@markday3145 Жыл бұрын
"All modern processors use interrupts." It warmed my heart to see a 6502 among the modern processors. Interrupts were simpler back then...
@LifewithDavid1
@LifewithDavid1 Жыл бұрын
Yea, I purposely threw that in. As you can see from some of my previous videos, I really like the 6502. It was cutting edge when I started designing my computer. In fact I have a 3rd quarter 1975 version in a ceramic and gold DIP. You are right; interrupts were much simpler. Thanks for watching!
@davidkender4660
@davidkender4660 11 ай бұрын
David, Can all your assiduous effort be translated into an equivalent Pico library routine (using the Arduino IDE) of mimicking the Arduino's Interruption Service Routine along with attachInterrupt? It would stupendous if the Pico hardware interrupt worked on multiple GPIO pins with Modes RISING, FALLING, CHANGE; but I would be ecstatic with only one Pico GPIO pin and any of the modes. Thank you for all of your diligent work and brilliant video tutorials. Dave K
@LifewithDavid1
@LifewithDavid1 11 ай бұрын
Thank you for the comment and suggestion. I will have to look into that. Unfortunately, I'm not very familiar with the Arduino Interrupt Service routine; so it will take a bit of study before I can figure out what to do. In my last video, I did use interrupts; but not for GPIO. Thanks for watching!
@fabiovsroque
@fabiovsroque Жыл бұрын
Hi David, is it true that Pi Pico has only one pin interrupt, or GPIO interrupt per core? I can't beleave, I am devastated...
@LifewithDavid1
@LifewithDavid1 Жыл бұрын
If you mean IO_IRQ_BANK0 of the NVIC, then you are right However, since it is part of the NVIC; it is very powerful. I haven't experimented with it much, but I believe you can set it up such that any and/or all GPIO pads can throw an IObank interrupt; it's up to the callback routine to figure out which one. That makes sense because you wouldn't want multiple NVIC interrupts hitting at once for "simultaneous" signals; there would be more racing going on than at the Indy 500. Like I said, I haven't experimented with this; maybe look into the NVIC part of the ARM Cortex M0+ architecture for more information. Thanks for watching!
@fabiovsroque
@fabiovsroque Жыл бұрын
@@LifewithDavid1 Thank you very much for the hints!
@martinbonfiore7871
@martinbonfiore7871 4 ай бұрын
Great series! I am trying to understand a program that I found that uses IO_IRQ_BANK0 and I am not understanding. It seems to different and maybe powerful but why someone would use it is not clear. Any help or pointers to info would be greatly appreciated.
@LifewithDavid1
@LifewithDavid1 4 ай бұрын
Bank 0 is the GPIO. IO_IRQ_BANK0 refers to NVIC interrupt #13 (table 80 of the RP2040 datasheet). Check out section 2.19.5.2. "Enable a GPIO interrupt" of the RP2040 datasheet to help understand how to use GPIO Interrupts. You would use GPIO interrupts so you don't always have to check the status of the GPIO. Instead, let the interrupt start an interrupt service routine when the GPIO changes state. Then the core can do something productive, like comprehending its navel, while waiting for a GPIO to fire. It does take a bit of head scratching to understand how to set up these interrupts. Good luck!
@martinbonfiore7871
@martinbonfiore7871 4 ай бұрын
@@LifewithDavid1 Thanks!
@deanbell5164
@deanbell5164 Жыл бұрын
Have you thought about linear power control of AC with triac(s) bye using the PIO?
@LifewithDavid1
@LifewithDavid1 Жыл бұрын
That would take a little thought. An easy way to determine 0 crossing time would be to use the RP2040's built in ADC. PIO doesn't access the ADC directly, however, you might be able to do something with DMA; I'm not sure. The other way would be to build a 0 crossing detector circuit and feed that into the PIO. Interesting.
@deanbell5164
@deanbell5164 Жыл бұрын
@@LifewithDavid1 I use a H11AA1 for the zero crossing detection and DMA for the PIO plumbing with interrupts for the triggers. I thought this may a good topic for one of your PIO videos.
@LifewithDavid1
@LifewithDavid1 Жыл бұрын
That would be cool. Thanks for the suggestion. There is so many things that little board can do; I hope to do so many projects.
@deanbell5164
@deanbell5164 Жыл бұрын
By the way I have a 1000 steps for the power to (half) phase table, this is for accurate solar power diversion into a 4Kw load. 230V @ 50Hz here in NZL.
@jyvben1520
@jyvben1520 Жыл бұрын
wow, too much for me, intro ok which suggests we could chain pio statemachines using the register, so when limited by one pio "program" we end with setting a register which then lets the next statemachine do ... (could be wrong but i'll never find out)
@LifewithDavid1
@LifewithDavid1 Жыл бұрын
Maybe MicroPython will be a little less overwhelming. Thanks for watching!
@wktodd
@wktodd Жыл бұрын
Interesting Dave. But ... A Muppet?
@LifewithDavid1
@LifewithDavid1 Жыл бұрын
Captain Pico strikes!
@robminderman7213
@robminderman7213 Жыл бұрын
Thumbs up for puppets
@LifewithDavid1
@LifewithDavid1 Жыл бұрын
Always wondered what Captain Pico would sound like!
Raspberry Pi Pico PIO - PIO Interrupts using MicroPython - Ep. 20
22:18
Life with David
Рет қаралды 4,3 М.
Raspberry Pi Pico - PIO explained
50:01
Slador
Рет қаралды 31 М.
НИКИТА ПОДСТАВИЛ ДЖОНИ 😡
01:00
HOOOTDOGS
Рет қаралды 1,3 МЛН
Cool Parenting Gadget Against Mosquitos! 🦟👶
00:21
TheSoul Music Family
Рет қаралды 24 МЛН
Osman Kalyoncu Sonu Üzücü Saddest Videos Dream Engine 262 #shorts
00:20
Raspberry Pi Pico PIO - VGA: Homebrew Video Interface Program Ep.12
19:15
#220 PICO and PIO: First Look - far easier than you might 💭 think
21:51
Raspberry Pi Pico Lecture 15: PIO Overview and Examples
1:13:04
V. Hunter Adams
Рет қаралды 9 М.
Using PICO Interrupts
25:15
Making Stuff with Chris DeHut
Рет қаралды 19 М.
Software Defined Radio with Pi-Pico
9:41
101 Things
Рет қаралды 55 М.
Raspberry Pi Pico - Первый взгляд
8:48
arduinoLab
Рет қаралды 62 М.
Raspberry Pi Pico talks to Intel 80188 as I/O device
1:00:36
Raspberry Pi Pico Lecture 3: Timers, timer interrupts, SPI
52:23
V. Hunter Adams
Рет қаралды 19 М.
Getting Started with Multicore Programming on the Raspberry Pi Pico
11:14
Learn Embedded Systems
Рет қаралды 45 М.
НИКИТА ПОДСТАВИЛ ДЖОНИ 😡
01:00
HOOOTDOGS
Рет қаралды 1,3 МЛН