Raspberry Pi Pico PIO - Ep. 4 - PIO Timing

preview_player
Показать описание
Join David as he examines the timing functions and features of the RP 2040 PIO that can be used for time critical applications.

00:00 - Introduction
01:05 - Timing Instructions
01:22 - The Set Instruction
01:50 - Frequency
02:34 - Frequency Timing Demonstration
03:48 - NOP
04:50 - Delay
07:18 - Delay time vs. number of Sidesets
08:42 - Jump vs. Wrap
09:33 - Wait
09:57 - Closing

Music:
(Pinnacle 19.5 royalty-free music):
Pulsing Dance
House Fever
Reaction Time
City Night Groove
Рекомендации по теме
Комментарии
Автор

Well produced and clearly explained. No filler, just well thought out and presented examples that build on each other. A severely under subscribed channel.

AKsevenFOUR
Автор

I love the down to earth and down to business flow of your presentation. I have definitely learned a lot of useful information about the seemingly mysterious Pico PIO. Thanks David!

erikfountain
Автор

Seriously underrated channel. You should be having 100x the number of subs as you do.

preddy
Автор

For me, the most ussefull article about the PIO programming I have read up to now. Thanks

miroslavdusek
Автор

Best RP2400 PIO Python tutorial I've seen. By far. Keep up the good works!

calbars
Автор

Thanks, David for inspiring me to use the PIO to solve my bit-pulse problem. It still took me a whole day to toggle a bit but your videos help immensely.

samneggs
Автор

Hi David! Love your channel. Keep up the videos. I loved your speaker rebuild one.

bn
Автор

I think I know what MCU I'm buying next. Working towards fuel injection, and the PIOs seem like my most realistic option towards the level of telemetry latency, asynchronous logic flow, and consistency I want. Got a lot of programming shit to learn for all that. Going for F1 AND OEM quality standards as a minimum. Right now I have a 2560 and a generator lol

Marc_Wolfe
Автор

Hello David,

I am trying to use the PIO to measure the timing between the two rising edges of two PINs. Which is my best approach?

Thanks,

yeanic
Автор

Great series! Question at time mark 7:08 you have a nice pulsing LED however I coded it up myself and the pulse is significantly faster and I am not getting that nice slow pulse you are getting. Any thoughts?

from machine import Pin
from rp2 import PIO, StateMachine, asm_pio


# Outputs a signal through 1 GPIO pin

def timex_prog():
set(pins, 1) # output a 1 to the set pin
nop() [30]
set(pins, 0) [31] # output a 0 to the set pin


timex_sm = StateMachine(0, timex_prog, freq=2000, set_base=Pin(16))
timex_sm.active(1)

mytechnotalent
Автор

so the main program and the pio script can react to the same gpio inbound signal ?
can the main python program keep running after launching the pio script ?
a pio script can wait for a external signal and then execute some steps and stop, so the main python program can have several pio scripts to execute in a certain order ...

jyvben
Автор

Small note: Nop isn't a pseudo instruction because it doesn't do anything, it's a pseudo instruction because it's a 'fake' instruction that is aliased to `mov y, y`, which does nothing. You could have pseudo instructions that do do things, this one just happens to not.

Grazfather