What is PIO | Programmable I/O on Raspberry Pi Pico

  Рет қаралды 81,457

Raspberry Pi

Raspberry Pi

Күн бұрын

Пікірлер: 56
@McTroyd
@McTroyd 3 жыл бұрын
You guys really nailed it with the PIO on the RP2040. This is cool on so many levels, from introducing the basics of Assembler to a Python user, to solving the timing problems you mention in this video. Looking forward to seeing what comes next!
@AndrewTubbiolo
@AndrewTubbiolo 3 жыл бұрын
My grandpappy told me that PIO stands for Pilot Induced Oscillation.
@hand-somepaws9285
@hand-somepaws9285 3 жыл бұрын
He ain't wrong
@packratswhatif.3990
@packratswhatif.3990 2 жыл бұрын
I thought it meant : Pigs In Outer-Space .
@SpeccyMan
@SpeccyMan 2 жыл бұрын
Parallel Input Output
@SpeccyMan
@SpeccyMan 2 жыл бұрын
@@packratswhatif.3990 Not quite, since outer space isn't hyphenated. Try "Pigs In Orbit" instead.
@BrownianMotionPicture
@BrownianMotionPicture 3 жыл бұрын
PIO is a great gift to the world. Thank you RPTL.
@paulmichaelfreedman8334
@paulmichaelfreedman8334 2 жыл бұрын
I made a matrix of 37 x 8 pixels from a single 300 RGB LED strip and used a pi pico to drive it. I mapped the PETSCII font so it can scroll a text that looks like the C64 including all the graphics characters. The micropython program used PIO to push the data to the LEDs with exact timings. I admit I did not write that code myself but it's also pointless trying to re-invent the wheel so I just copied that code. But I can say out of experience that the RP2040 is pretty darn powerful for its price and size. And now you can emulate a C64 with it including a 320x240 display! It uses PIO to exactly time the VGA output signal which is generated on the fly because the Pico does not have enough RAM for a frame buffer.
@Splarkszter
@Splarkszter 2 ай бұрын
Would be cool if you shared that code. Sounds really awesome!
@rondamon4408
@rondamon4408 3 жыл бұрын
Very interesting! I'm really enjoying my pico
@joeblow6088
@joeblow6088 3 жыл бұрын
Cool video, and great explanation! I've had issues with checking for button input while executing other code. It's probably mostly due to the fact that I'm not very good at coding, but it will be helpful to learn to use State Machines for things like that. NeoPixels are also a great example, because it's something I add to most of my projects. Looking forward to your future videos!
@jyvben1520
@jyvben1520 3 жыл бұрын
do you use an irq handler, that works fine for button, use pull=Pin.PULL_DOWN (the button delivers 3.3v when pressed) use pull=Pin.PULL_UP ( the button connects to ground when pressed ) import machijne # or from machine import Pin, disable_irq, enable_irq buttonX=machine.Pin(2, machine.Pin.In, pull=machine.Pin.PULL_DOWN) buttonX.irq(trigger=machine.Pin.IRQ_RISING, handler=pin_irq) buttonXwaspressed = False # variable you can check in your main loop, reset it when your code has acted on it. def pin_irq(pin): state = machine.disable_irq() # no interrupt while handling this one # change a variable or act on another pin, if using a variable then global buttonXwaspressed # essential to use the global already existing variable buttonXwaspressed = True # let your main loop react to this machine.Pin(25).value(1) # example, act on hardware, onboard led is turned on. #end handler with machine.enable_irq(state) # all irq handlers will act as expected # you can have the irq handler react to which pinname is given in the parameter, butn1.irq(trigger=machine.Pin.IRQ_RISING, handler=pin_irq) butn2.irq(trigger=machine.Pin.IRQ_RISING, handler=pin_irq) in "def pin_irq(pin)" function if pin == butn1: # change or set ... e.g. ON/1/True elif pin == butn2: # change or set ... e.g. OFF/0/False or increment (e.g. += 1024)
@JosSSMr
@JosSSMr 3 жыл бұрын
Hi, PIO is present in other Raspberry devices or only in Pico? Thanks in advance
@2231puppy
@2231puppy 3 жыл бұрын
PIO is only for the RP2040 chips. The other RPis use Broadcomm chips, so they do not have PIO
@allthegearnoidea6752
@allthegearnoidea6752 2 жыл бұрын
I have to say I see how PIO is useful but as a beginner I thinks it makes thinks like writing a byte to a port much more complicated than it needs to be. Maybe there is a library that can do this but if so haven’t found it yet. Happy to receive advice if anyone has more knowledge that’s. Best regards Chris
@markharrisllb
@markharrisllb 2 жыл бұрын
Don't ESP32s have PIO? Or is my naivety showing?
@mafhper
@mafhper 3 жыл бұрын
My pico is on the way :)
@duncanx99
@duncanx99 3 жыл бұрын
The link to more information just results in a 'This Page Can't Be Reached' error...
@raspberrypi
@raspberrypi 3 жыл бұрын
Eeek. How about now?
@duncanx99
@duncanx99 3 жыл бұрын
@@raspberrypi That now leads to a valid webpage but I can't see anything specifically related to using the PIO - that only seems to be mentioned once, in relation to dithered pixels. Maybe I misunderstood what was said in the video...
@jyvben1520
@jyvben1520 3 жыл бұрын
a day later, no problemo, results in "www.raspberrypi.org/documentation/rp2040/getting-started/"
@siriokds
@siriokds 2 жыл бұрын
It can be useful to make a 5V tolerant gpio Pi Pico.
@AgainPsychoX
@AgainPsychoX 3 жыл бұрын
I wonder, can I make USB port out of those PIO???
@gamertron0882
@gamertron0882 3 жыл бұрын
Well... yes but why, why would you do that, there is already a micro usb on the pico
@AgainPsychoX
@AgainPsychoX 3 жыл бұрын
@@gamertron0882 My use case is to intercept mouse movement and keys, and make it detect patterns and do stuff - programmable macros for mouse. There are some mouses on the market with functionality like this, but I could use just Pico instead of 50$ mouse + license on their scripting software... Other people could use it also for hardware keyloggers, or maybe some fancy USB hubs.
@Mr.Leeroy
@Mr.Leeroy 3 жыл бұрын
Just look into USB signal integrity, USB eye test and abandon the idea.. Even if Pico has enough frequency for USB 1.1 Low speed, which is probably not the case. You could though poll mouse buttons with your additional MCU like Atmega32u4 and send your macros along the second USB cable or via USB hub IC.
@julianbinder2371
@julianbinder2371 3 жыл бұрын
its probably easier to use something like autohotkey or just some python libraries to do that on your computer itself, which is free
@rohitjg
@rohitjg 3 жыл бұрын
When is support for arduino ide coming?
@TimothyChapman
@TimothyChapman 3 жыл бұрын
What about using this as a USB joystick?
@julianbinder2371
@julianbinder2371 3 жыл бұрын
you could just use the on-board usb-connection for that, reading out a USB-joystick should be pretty easy even without PIO
@Henry-sv3wv
@Henry-sv3wv 2 жыл бұрын
@@julianbinder2371 someone made usb interface with the PIO for the LULZ
@modm8843
@modm8843 3 жыл бұрын
Great video
@paulmichaelfreedman8334
@paulmichaelfreedman8334 2 жыл бұрын
Programmed I/O is not new. Many generations of Parallel ATA / IDE harddisks used PIO for data handling. The disk's label would state the type of interface and the mode of operation (PIO mode x)
@gulotts
@gulotts 3 жыл бұрын
The morse code was SOS?!! Oh no
@neils132
@neils132 3 жыл бұрын
it was “RASPBERRY PI” sent backwards i p y r r e b p s a r
@RogerTannous
@RogerTannous 3 жыл бұрын
Why do you always try to advertize for MicroPython in your videos while C++ is also possible with RP2040
@randomuser2468
@randomuser2468 3 жыл бұрын
Woohoo!
@신디-z2v
@신디-z2v 3 жыл бұрын
thanks~
@BharatMohanty
@BharatMohanty 3 жыл бұрын
Bought my first ever single board computer (pi zero w)
@bg31337
@bg31337 3 жыл бұрын
But keep in mind that an RPi Pico is not a SBC anymore. It's a microcontroller
@SpeccyMan
@SpeccyMan 2 жыл бұрын
Morse Code is NOT a series of dots and dashes. It is a series of dits and dahs!
@will9twl
@will9twl 3 жыл бұрын
can anyone identify another MCU that has a PIO too?
@Henry-sv3wv
@Henry-sv3wv 2 жыл бұрын
RP2040 is the only one.
@hellterminator
@hellterminator 3 жыл бұрын
It's pronounced "I squared C," not "I two C." It's actually supposed to be stylized I²C as well, but since that wasn't easily doable in the 80s, I2C was accepted.
@jamesbrown99991
@jamesbrown99991 2 жыл бұрын
Are you sure it's not pronounced "eye eye see"?
@Henry-sv3wv
@Henry-sv3wv 2 жыл бұрын
on avr it's called: TWI - two wire interface
@AlexejSvirid
@AlexejSvirid Жыл бұрын
Actually, I²C is Inter-IntegratedCircuit, or Inter-IC protocol. That's why I is squared.
@TyronStDenis
@TyronStDenis 3 жыл бұрын
It’s the only Internet that you always will be Connected to Wi-Fi and Data with this PIO Thing.
@cokeforever
@cokeforever 2 жыл бұрын
No sound at all??
@jaskaranbindra9939
@jaskaranbindra9939 3 жыл бұрын
Is this Mark Zuckerberg's voice?
@jamesbrown99991
@jamesbrown99991 2 жыл бұрын
No. The dude sounds irish
@victorschlim4644
@victorschlim4644 3 жыл бұрын
If my understanding is correct, this is the same as DMAs in other microcontrollers.
@wuschelmohr
@wuschelmohr 3 жыл бұрын
No
@chinoto1
@chinoto1 3 жыл бұрын
DMA is for streaming a chunk of memory to another controller on the board, such as SPI, PWM, and possibly PIO. You could implement SPI or PWM by using PIO if you wanted. Supposedly you can use PIO to generate signals for VGA. I plan to use PIO for my ws2812 lights so I can construct just the GRB array and have PIO handle generating the signal instead of passing a 16x larger signal array to the SPI controller.
@massimookissed1023
@massimookissed1023 2 жыл бұрын
DMA is a way of moving data between memory and other devices, without it going through and occupying the core processor. Like instructing an intern to move a stack of papers from the filing cabinet to the broom cupboard without having to supervise and micromanage them doing that task.
In-depth: Raspberry Pi Pico's PIO - programmable I/O!
17:19
stacksmashing
Рет қаралды 141 М.
What is a microcontroller? ft. Raspberry Pi Pico
4:29
Raspberry Pi
Рет қаралды 179 М.
Какой я клей? | CLEX #shorts
0:59
CLEX
Рет қаралды 1,9 МЛН
ССЫЛКА НА ИГРУ В КОММЕНТАХ #shorts
0:36
Паша Осадчий
Рет қаралды 8 МЛН
КОНЦЕРТЫ:  2 сезон | 1 выпуск | Камызяки
46:36
ТНТ Смотри еще!
Рет қаралды 3,7 МЛН
Turning a Raspberry Pi Pico into a GPU!
16:42
element14 presents
Рет қаралды 129 М.
What is VGA and How to Use it With a Raspberry Pi Pico
18:28
Gary Explains
Рет қаралды 57 М.
Raspberry Pi Pico 2: a RISC-V bet!
8:05
Jeff Geerling
Рет қаралды 311 М.
The Pi Pico has problems, so I made my own, the ProPico
7:17
Dmytro Engineering
Рет қаралды 40 М.
Raspberry Pi Pico PIO - Ep. 8 - Introduction to DMA
18:21
Life with David
Рет қаралды 20 М.
Getting Started with Multicore Programming on the Raspberry Pi Pico
11:14
Learn Embedded Systems
Рет қаралды 47 М.
Why You Need To Put A Raspberry Pi Pico Inside Your XBOX Right Now!
17:37
Macho Nacho Productions
Рет қаралды 301 М.
Какой я клей? | CLEX #shorts
0:59
CLEX
Рет қаралды 1,9 МЛН