David, your tutorials are so wonderful. Love how you are explaining these concepts for us laymen. I was finally able to get a driver written for my HUB75 LED matrix, driven at 50MHz! This wouldn’t have been possible without an FPGA for me otherwise. Keep it up!
I've really enjoyed your Pico videos. I picked one up a month ago, and used your videos to get me started on the right foot. I decided to use the Arduino IDE, which simplifies the build process. I built an AWG using PDM, and it worked ok, but required a lot of ram for the dma. I changed it to an 8 but DAC (resistor ladder) saving a ton of ram. My only issue was the added cycles every once in a while to perform the chaining and a few cycles in the dac state machine. Then it struck me... create a second state machine that provides the timing for the dac machine. The dac waits for an irq set, clears the irq and writes the data. That works like a champ, with no jitter on my output.
I love this series on Pico's PIO. It's really helping me wrap my head around it. Are you planning on doing more videos about video generation once you've figured it out? Or will you be moving on to other things with the PIO? I'd love to see more about video generation since as you noted the provided code is a bit complicated.
Thank you. That's a great question. My next steps are to understand video generation more. To do that I need to learn C/C++, the SDK PIO assembler, DMA and two core operation. I'm going to do videos about the journey; with the goal of writing or modifying video code to do something fun or useful with the Pico. After I understand video, I think other PIO functions like audio will be a piece of cake. In this case it's more about the journey since I already have a handful of RPi Zeros that can run rings around the Pico video wise. I'm getting started; however; I can see it's going to take some time to wrap my thick skull around all I need to know. Thanks for the feedback; we'll see where it goes!
Thanks for the video. It shows some of the extreme lengths the folks at R-pi went to in order to make the RP2040 the success it is. I have a Pico or four, and I went down the C/C++ route almost from the off. I had major issues installing the toolchain onto W.10, but got there in the end thanks to RU-vid, ending up with a viable VSC environment. Much easier (if only because there is a runnable script) was when I did the same thing on a R-pi 3b+ When I went back to the W.10 setup, I found it to be broken. Probably something I’d done, but I won’t be fixing it, instead staying on Linux for this type of thing (and everything else as soon as I can). It just feels “right”. I experimented (cut ‘n’ paste) with PIO and struggled to get my head around it. Not so much the “assembler”, but the C++ helper programs and how they all interact with one another. Beyond my capabilities, but I just know that the RP2040, with a relatively high clock speed (for a MCU), dual cores and 8 state machines - must be capable of some pretty stunning stuff in the right hands. Not mine though. I too worked on System 370 - on DOS/VS then MVS, getting pretty familiar with JCL, EXEC, EXEC2, REXX, VSAM and a lot of the utilities that were in use at that time. Happy days until the bean-counters arrived to spoil the fun. When I retired in 2016, it had become a dire existence. I still miss my early days though, and mucking around with the Pico and the R-pi kind of brings back those memories.
Thanks for watching. I agree that RPi has gone above and beyond and I know they will dominate the microcontroller industry the future. I was thinking I should get a RPi 4 and move toward compiling C/C++ in Linux, W10 seems a little fragile. As you see can see from my videos, I'm enjoy reliving the days of "little" computing. Hopefully these little systems will keep both of our brains sharp during retirement. My issue with JCL was when I was developing a Fortran Finite Element program for class at 3:00 AM, there wasn't any support at the computer center; so I had to figure it out on my own. Nothing like a deadline and trying to learn a new "language".
@@LifewithDavid1 Totally agree with respect to keeping our brains sharp - I view these little systems as a more fulfilling alternative to crosswords and other such puzzles.
@@LifewithDavid1 WSL (Windows Subsystem For Linux) is a pretty good way to run Linux stuff in W10, so you could probably use that to get the Pi Pico's C/C++ toolchain up and running in linux on W10, without needing a separate computer for linux.
You would certainly think so. I'm not sure why I would have said that unless I saw it in some of the RasPi documentation. I see there have been a lot of corrections to the VGA text recently. Nice catch!
Pi Pico SDK environment using Visual Studio Code has improved quite a bit since when this video was created 2 years ago and I highly recommend installing the SDK environment using the Pico SDK installer. As long as you launch VSC using the shortcut the SDK install creates, and you have your CMAKE instructions set up correctly, the VSC will dynamically help you with coding mistakes even before you build/compile your code. It will even provide you the means of finding where a reference, such as a function or variable, is declared, defined or used rather than having to use plain Find all the time. I often make stupid syntax mistakes or misuse of data types, and in the past, such as in Arduino IDE, I would not find out about them until I ran a build. But with the VSC and CMAKE plugin, I find these out while I am writing, lowering the time to fix mistakes.
Thanks for the tip. I'll have to try Visual Studio the next time I use C/C++. I've looked at it a couple times before; and the learning curve seemed pretty steep at the time. Recently, I've moved to bare metal assembly so I'm not using the SDK at all. But I'll give it a go next time. Thanks for watching!
Nice video, learned a lot about my new toy. The problem of the exact values for the resistors can be circumvented using an R-2R ladder for the DACs. A bit more bulky but as all the resistors are the same, the exact value is less critical.
Thanks, I'll have to look at those. I'm not sure of their max speed. We have to output a new value every 40 nanoseconds. EDIT: I looked into the max speed of the I2S protocol and unfortunately it is about 100 times too slow. Video, even VGA is pretty demanding. Thanks for the suggestion, though. I might have to look into it for sound generation. I'm looking at MIDI now; maybe a tiny synthesizer?
@@LifewithDavid1 Yeah, I tried to come back and edit that comment to say the same; but for some reason it wasn't displaying. Maybe grey scale and some "digital potentiometers"; full speed brightness and some optional color stuff. Wonder how hi res you can go at 60 FPS with just black and white, not grey scale, just full black and full white. Nothing flashy, just information data display stuff. I definitely want to look into that with a Teensy 4.0; found out it has features I want, like USB host and device mode ports simultaneously. Really audio friendly devices; make a graphic equalizer and VU meter or something, along with audio ADC and DAC, plug in an ordinary keyboard and use it as MIDI and to interface with sketch settings adjustments... just throw the kitchen sink at it. Apparently people have done VGA on them already.... Went on a tangent there.
@@Marc_Wolfe No problem. For more info on what it takes for video display, please see my PIO episode 12 ( ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ZEBkM5FQ86Q.html ). That gives the math needed for "low res" VGA at 30 FPS. Grey scale just means you only need one DAC instead of three, but for the same resolution you still need the same speed. For black and white you don't need a DAC at all, just on or off. That should be pretty easy to do. Good luck!
In my experience, the Pico running at 125 mHz runs nice and cool for what I used it for. I think a hard overclocking would cook things to the point that a heat sink would be needed; but I don't think so for normal use.
A little control task is quite simple for me to do with it. The rest is quite complicated. At least I like to learn a thing or two more in that world at my own pace.
You're right, these micro-controllers are so flexible that they can be used for really simple control or turned into little computers that would rival mainframes of 60 years ago. Something for everyone. Thanks for watching!