Excellent! I am sure many awesome things could be done using PIO about which its engineers didn't even think of. Looking forward to try VGA output. I'll try to reduce the resolution to save the RAM.
Хорошая лекция ! Не понял только одно место 37:46 - почему out pins, 3 [4] и следом out pins, 3 [2] ? [2] - это с учетом того, что следующий jmp x-- colorout будут еще +2 такта ?
How do you debug pio programs? Especially if you don't have a high speed oscilloscope? I see there is an open source java RP2040 PIO emulator written by Jürgen Reuter, that has the ability to single step and also generate timing diagrams of the emulated outputs. And it gives access to the PIO state machine registers as well (since it is all emulated). Have you used that? Or possibly a pico based logic analyzer?
I haven't used that emulator, though it looks really useful. The PIO programs are tricky to debug. I have a relatively low-speed 2-channel oscilloscope. I debugged this particular program by using the PIO clock dividers to slow the whole interface down to kHz speeds for easier debugging with the scope. Once I was confident that the relative timing was all correct, I turned off the clock dividers to speed everything back up.
@@hunteradams9430 Thanks, slowing down the clock on the PIO should help, and since the divider has 16 integer bits to play with, I should be able to divide by up to 10000 even if previously dividing by 5. I've been reading the RP2040 Datasheet and how all the different clocks interact. I am really enjoying your class lectures. Thanks for making them available on youtube.
The lower four IRQ flags for each PIO block can be mapped onto the PIO's interrupt request lines. So, you could trigger a software interrupt on either ARM by mapping IRQ 0-3 to PIO0_IRQ_0 or PIO0_IRQ_1 (or same for PIO1), and then attaching an interrupt service routine to that interrupt
Thank you for sharing this huge information! There's no much of this Raspberry Pico PIO/DMA on internet right now
Excellent! I am sure many awesome things could be done using PIO about which its engineers didn't even think of. Looking forward to try VGA output. I'll try to reduce the resolution to save the RAM.
Хорошая лекция ! Не понял только одно место 37:46 - почему out pins, 3 [4] и следом out pins, 3 [2] ? [2] - это с учетом того, что следующий jmp x-- colorout будут еще +2 такта ?
No, *jmp* is 1 T-state and *pull* is another one.
How do you debug pio programs? Especially if you don't have a high speed oscilloscope? I see there is an open source java RP2040 PIO emulator written by Jürgen Reuter, that has the ability to single step and also generate timing diagrams of the emulated outputs. And it gives access to the PIO state machine registers as well (since it is all emulated). Have you used that? Or possibly a pico based logic analyzer?
I haven't used that emulator, though it looks really useful. The PIO programs are tricky to debug. I have a relatively low-speed 2-channel oscilloscope. I debugged this particular program by using the PIO clock dividers to slow the whole interface down to kHz speeds for easier debugging with the scope. Once I was confident that the relative timing was all correct, I turned off the clock dividers to speed everything back up.
@@hunteradams9430 Thanks, slowing down the clock on the PIO should help, and since the divider has 16 integer bits to play with, I should be able to divide by up to 10000 even if previously dividing by 5. I've been reading the RP2040 Datasheet and how all the different clocks interact.
I am really enjoying your class lectures. Thanks for making them available on youtube.
Is it possible to connect a software interrupt to the hsync?
The lower four IRQ flags for each PIO block can be mapped onto the PIO's interrupt request lines. So, you could trigger a software interrupt on either ARM by mapping IRQ 0-3 to PIO0_IRQ_0 or PIO0_IRQ_1 (or same for PIO1), and then attaching an interrupt service routine to that interrupt