Good to see a RP Pico project that is more than a blinking LED. Thanks for making this one. I hope we will see more complex projects like this from you!! :) Plus it is great to see a C++ project too.
@@robingrosset6941 an idea, i still want someone to Actually Try to add the original (everspin now) MR10Q010, 1Mb QSPI MRAM chip and bench it against the generic slower psram, it should be good for vga buffers running in it's QSPI Read and Write at 52MB/sec mode, it even has real original 'run in place' mode. i dont know if the Pico has the 4 QSPI useable spare pins though !
Hi Paul, the Pico already has an on-board 2MByte (16M bit) QSPI Flash which is speed matched to the CPU so it can do 66MB/s. I can try benching that if you are interested to see if its running full speed but I think this is likely to be faster than adding an additional external QSPI flash. The data sheet I found for the onboard flash is here www.mouser.ca/datasheet/2/949/w25q16jv_spi_revg_03222018_plus-1489727.pdf
@@robingrosset6941 www.mouser.co.uk/datasheet/2/144/MR10Q010_Datasheet-1218962.pdf ...The Write Data Bytes (WRITE) command allows data bytes to be written starting at an address specified by the 24-bit address. The data bytes are written sequentially in memory until the write operation is terminated by bringing CS high. The entire memory can be written in a single command. The address counter will roll over to 0000h when the address reaches the top of memory. MRAM is a random access memory rather than a page, sector, or block organized memory so it is ideal for both program and data storage. Unlike EEPROM or Flash Memory, MRAM can write data bytes continuously at its maximum rated clock speed without write delays or data polling. Back to back WRITE commands to any random location in memory can be executed without write delay. ...
Oh wow, I was just watching Ben Eater's video on building a graphic's card and was thinking wow that's alot of IC's I bet the pico can handle that.... then I see this... Well done!
@@eanerickson8915 well.... the obvious progression is (to me) pick an old well documented pci card found in every old pc/draw/dump reclaim all the components then do a Ben Eater to build it back up on a small breadboard/diy pcway pcb in different simple configurations where you use its bits as you wish...
If you're wondering why you can only get certain resistor values, electronic components are standardized to a logarithmic scale of values known as E series.
thank you much, Although if you might have any thoughts on the following: I am having issues where despite wiring 1 pin of each R,G,B So 1 on GP0, 1 on GP6, etc And the only color I get is red, any thoughts? Im thinking its triggering every other pin but the ones I have wired up, but not even the test pattern shows more than just Red (and black)
Although I wouldn't build such a circuit, but your explanation were great and right to the point. I truly enjoyed watching this informative clip very much. Keep up the good work.
Thanks for that. The circuit design is not mine its from the Hardware Design Guide for RP2040. datasheets.raspberrypi.org/rp2040/hardware-design-with-rp2040.pdf One piece thats maybe not clear in the diagram is the 75 ohm impedance inside the VGA monitor going to ground which is what makes the DAC produce the right-ish voltage levels.
Nicely done. I can see (from the amazon link) your display's native resolution is 1024x600 pixels. Could you tell me what screen resolution and refresh rate were the demos driving the VGA signal at ? Do the display controllers auto-scale up/down the incoming signal's resolution to fit the display or throws error out (like flicker/blank screen) when there is a mismatch ?
For 2 parallel resistors R=(R1*R2)/(R1+R2), so your last calculation is wrong. It is 4.05k For n parallel resistors 1/R = 1/R1 + 1/R2 + 1/R3 ... + 1/Rn
@@derekjc777 Sure, Captain Obvious. And LOL, wtf do you think the "special case" formula (the first one I posted) means? The second one is the general Kirchhoff formula for a parallel resistor network. This is your 2n case. P.S.: Your gibberish isn't even a formula ... besides your "reduce" gave me a good laugh, thank you. Very mathematic ... and scientific! :o) P.S.S: It is very boring to repeat basics that are written on page two of every electronics formula collection ... P.S.S.S: And it is all my fault. I should've written: LOOKUP Resistor Networks and Kirchhoff's Law in WIKIPEDIA! This is just a waste of time, here on TH-cam, don't you think derekjc? :) Anyway, thanks for your comment.
it's a shame they didn't build it against the M4 but still a useful board. fun fact: the original (integer) 25Hz/50Hz "SVGA" was a UK Inmos invented chip/pcb for the transputer that IBM licenced (along with the other inmos IP, japan got the original sram and related IP as you might expect today) for the x86 and never quite used it to it's fullest potential.
TH-cam does not allow videos to be modified once published. The video description contains updated values highlighting the error and there is also an updated video here with the full schematic with correct resistor values. The updated video is linked with a card into the this video at the right timecode th-cam.com/video/i1AwtqPtfrQ/w-d-xo.html. if you click the information button at the timecode you indicate it takes you there.
@@kreynolds1123 you could for shure hack around to gain some extra bits. But the circuit would be way more complicated (and slower) than an extra ADC IC. But as 12 bit is already beyond mV accuracy, why would you need it anyways 😉
I recall a long time ago there was a computer that's CPU spent its entire resource running the video and program code was only executed during the blanking time. I forget the brand/model but 1MHZ was a common speed in those days
I remember the ZX81 which was my first computer. In had fast and slow modes. In fast mode it would not bother updating the screen at all so it would go blank until it finished.
@@robingrosset6941 ^_~ perhaps someone will add something pico to this kit for fun. Can You Build A Brand New ZX Spectrum From 100% New Parts? th-cam.com/video/VFLJLxDTEkQ/w-d-xo.html
@@paulmaydaynight9925 I admit I had an eBay accident and have 4 ZX spectrums in my basement and quite a few ZX81s. I am pretty sure a Pico could emulate a ZX81. :-)
1K is wide available resistor. For 500 ohms you just put two in paralel, tolerance increases, but hey... :-) It is also easy to make 2K, and 4k as 2.2k+1.8k or 2x 2k or just 4x 1k...
Nice Project, subscribed. The ATmega32U4 comparison is not meant to be serious, is it? 32 against 8-bit. Apples and pears:) Better choose another ARM M0 like STM32F0xx. Oh wait, Dual Core and 133MHz. So better choose something like STM32F446 for the comparison. For me you don't need a comparison at all. The right tool for the right job ... what actually translates to experience and RTFM many, many times. Keep up the good work:)
there are a few microcontrollers like ESP32, STM32 and Teensy 4.0 which are more comparable. I wanted to make the point about the pixel clock and the price comparison MSRP for the Arduino vs Pico. Arduino are coming out with an RP2040 based board soon so I think we will see a lot more RP2040 boards.
well, yes, nice job. maybe it would have been easier if you had used an R2R digital-to-analog converter for the circuit. In this case, only 2 resistance types would have been needed
Really neat demo, thanks for making this video. Question, I've been working on an EINK type writer project and found that SPI to a parital refresh eink display is slower than advertised. There are some Eink displays that support the I80 protocol (which appears to be a 24 pin interface), can the pico support this?
So Pico has 26 usable I/Os (actually more if you use all RP2040 pins) but using all them is likely not great for a project as you usually need to use pins for other things too. I looked up I80 protocol, I've never used it but its basically a parallel interface typically 8 or 16 bits wide sometimes 18 bits wide. It has 3 or 5 pins for control lines. I think I would try using a 8 bit or 16 bit interface, the pico should be good for that depending on how many other pins you need. I can't think of a reason it would not work but I don't know of a library for I80.
the timing information is in the pico-extras scanline project here github.com/raspberrypi/pico-extras/blob/master/src/common/pico_scanvideo/vga_modes.c This tells you the supported modes. Is this what you were asking?
How high do you think you could push the pixel clock with this? I am thinking that the Pico might be just the thing to use as a test pattern generator for CRT televisions, which ties into another project of mine. I'd be using NTSC timings instead of VGA, and I'd be looking at making a single luminance signal with sync instead of RGBHV (no chroma necessary), but what I'd really like is to be able to use a wide variety of pixel clocks as the basis for a TVL generator. Any thoughts would be appreciated!
Its a text editor called VSCode. code.visualstudio.com/ It is really good. Works with lots of different languages and will run on Linux, MacOS and Windows.
good video, is there any way to turn old VGA monitors into a digital clock display using picopi, i know it will consume more power but just for a school project
Hey, I don't suppose you managed to get this running on a modern LCD monitor through D-Sub? I just got the official VGA demo board and can't seem to get any of the demos to run on it.
I did, see this video th-cam.com/video/yjW6tPw4anw/w-d-xo.html I connected it to a new Asus 28" 2K monitor via D-Sub and it worked really well. I have just ordered a VGA demo board myself from Pimoroni. (just came back in stock) so I was going to try that out. Which board do you have?
Hi, it would be great to dig a little deeper into how the Pico code generates those sync signals, which I'm guessing uses the new programmable i/o, and puts out a bitmap...
so far i have been able to change the color on the example minimal scanvideo example to give a blue screen instead of different colors each scanline. The code is easy to follow but damn there is alot happening. I want to change the sprite on the sprite example and change positions based on a pin input. I gotta get better with my C knowledge. Embedded systems is as deep as i go with software.
Good intro ... you seem excited about the pico. I appreciate your effort. Probably I'll buy a pico at some point, though I'm not quite so convinced. Everyone forgets to add shipping when they speak of price. I'm about 100 km east of Ottawa, which is significant because Buyapi.ca wants $11 for shipping outside of Ottawa ($6 within Ottawa.) This is the cheapest shipping option. CanaKit.com charges $13 for shipping. One way or the other, the final price is a lot more than the implied $5.25. (Both places currently out of stock.) Compare this for example, with the 38 pin esp32s board running at 240 MHz, which has built in wifi, and typically sells on AliExpress for about $5 CAD plus $1.40 shipping. (Roughly 1/3 the real cost of a pico.) This board can also handle vga, micropython, and almost everything the pico does. I've tried these things successfully on several esp32 boards. Bottom line, the pico seems like a good first attempt at a micro-controller for the 'Raspberry Pi Foundation' and I wish them well, but it is not reasonable to compare the pico to 8 bit Atmels and the pico is already up against some serious competition.
It is true. You can't ship anything in Canada or US for the shipping costs from places like AliExpress. This perhaps reflect postal service rather than the product though. I agree shipping is an issue when comparing prices. It is true for places like DigiKey that small purchases make no sense as shipping is always the killer. I figure I have to buy at least $60 worth of components at a time to make it worth the $15 delivery but it does come very quickly. I do like the documentation for the Pico. It is good and the momentum of new projects being built right now is growing. Also note the Pico clock speed is configurable and Pico has been clocked up to 270 MHz on its 2 cores. Raspberry Pi foundation has also started shipping bare RP2040 chips to places like AdaFruit so I think you will see variants of the RP2040 boards coming soon. Like AdaFruit's HUZZAH32 for ESP32 based boards twitter.com/EbenUpton/status/1362171557469179907 The difference where I think the Pico may be really interesting is the support and community that builds around these products to make it easier for makers to get started and create new things. On the comparison to 8 bit Atmels or ESP32s; I have lost count of how many Arduinos and ESP32s I have. Arduino started something important, they made their products very accessible to everyone. The whole market for clones of Arduino boards exists because of the demand created by the community. ESP32s can be programmed inside Arduino IDE and before Arduino there were very few choices for makers without getting into expensive SDKs and prototype systems. If you take shipping out of the picture and buy a branded Arduino, ESP32 (AdaFruit branded HUZZAH32) and Pico from BuyAPi.ca, they sell all three, you can get many Picos for the price of an Arduino or the ESP32. And this is why I think the comparison is fair. If the Raspberry Pi foundation can build the same community support that Arduino has built then I think the Pico could become something special. Time will tell but it's looking very promising.
@@robingrosset6941 I totally agree with you on most points, especially that this is mostly about community. This is why 8 bit Arduinos and their awful IDE are still hugely popular. Though I have a few observations: The shipping costs on AliExpress need to be taken with a grain of salt, and simply calculated into the total price. As you suggest, I am convinced that Canada has just about the worst postal 'service' in the world. What I often do is spend a lot of time looking for a reliable seller who can provide multiple items of interest, and doesn't gouge on shipping. Then I'll place a large order, for a dozen or so different items, and pay for the expensive (more reliable) shipping. Still, I can't help noticing that it is possible to purchase the pi pico on AliExpress (in stock.) However the best price is about $16 CND + $4 shipping, (compared with ESP32 at around $5 + $2), which sort of implies that picos are intended to sell for about this price. Years ago, I bought a Raspberry pi (within an hour of when they first became available), because I was totally sold on the concept. I showed it to the guy at our local computer store. He just scoffed and suggested that it would never catch on. I'm tempted to go back again to see if he's perhaps changed his tune. So, I'm not down on the pico. Really, I hope they do well; probably they will. It's always good to have choices. I just like to keep things in perspective.
You can do this... you would end up with a grey scale if you put into all RGB lines. Or you could pick a colour with some resistors and end up with a graduated shade of that colour. This project uses 15 GPIO pins for 32768 colours but using say 6 pins would get you 64 colours and lots more free pins for other things. Or simply 3 pins for red, green , blue and mixture of the 3 pin colours which would give magenta, cyan, yellow and white.
@@DmitryKandiner true this would be enough to emulate retro computers which had 8 bit graphics. Lots of 70s and 80s home computers and video arcade games used 8 bit colour like this.
An easier to built and more accurate resistor ladder would be an R2R-Ladder for which you only need two resistor values which basically have to be R and double that value which is more accurate and linear especial when using more bits per pixels for higher color depth but requires some more resistors. Here you can find an example and some theory behind it hackaday.com/2015/11/05/logic-noise-digital-to-analog-with-an-r-2r-dac/
Totally, yup. I used an 2R2 ladder in a project for a sound board DAC a few months ago here is the link th-cam.com/video/TBFA2xbCjZ4/w-d-xo.html It uses a 10K and 20K R2R for an Audio DAC. In the Pico VGA video I was copying the hardware design guide as this is what is being used in boards like those on this link www.cnx-software.com/2021/02/03/open-hardware-raspberry-pi-pico-vga-sd-card-and-audio-demo-board-to-support-qvga-video-playback/ I chose this also because it supports the demo code from Raspberry Pi Foundation for VGA.
So porting Second Reality to it isn't a stupid idea.. If lookup tables are good enough for the Future Crew then they're good enough for me! Now where did I put my VGA monitor from 1993...
Mnn interesting. The colour is an analog signal on each of R,G and B lines. 0 volts is black and 0.7 volts is bright red or green or blue. If all RGB lines are 0.7 v then the screen pixel is white, each signal at full brightness. You at least need something like a resistor to scale the voltages down from 3.3v of the Pico’s I/O line to 0.7 otherwise you might damage your VGA display. Minimally you need one resistor per colour line for each of RGB and you could just use one Pico I/O per colour. This actually gets you 8 colours (including black and white) which is a very retro 80’s computer colour palette. The HSYNC and VSYNC lines are the ones that make the picture stable, these are TTL logic so 5v is what is expected, there is no need for scaling the voltage on these lines, no resistors needed. The pico’s 3.3v is enough to drive most VGA displays (CMOS logic level rather than TTL but most monitors like CMOS levels anyway) Hope this helps
@@robingrosset6941 Thanks for replying, I have driven a VGA monitor with an Arduino Uno and no resistors. So maybe it'll work fine with the the Pico but I probably won't take any risks. Good to know
@@goatmeal5779 What resolution can an Uno do? I calculated that for 320x240 on PAL/NTSC you need a 6MHz pixel clock. Can the UNO output a different 8-bit value from a buffer in RAM on every clock pulse?
Very nice video! Do you think it would be possible to add a w5500 to the pico and receive an image(480px * 480px) over the network to output to to vga? Is the Pico under powered for that?
@@robingrosset6941 I think every household has one. Sometimes we do "spring cleaning" and have to check them all to make sure they're still working. Nobody needs that many pens, but as is usually the case, you'll always have too many, or you simply can't find even one. Never in between.
Why does every YT compare with old Arduino boards, at least compare with e.g. the Blue Pill (very much same cost), based on STM32F103 (Arm M1-core), whereas Pico use two Arm M0+ cores.
I was not benchmarking original Arduino vs Pico in the video. The point of explaining the clock differences relative to Arduino is to talk about pixel clock which is what limits the resolutions you can generate and what puts real VGA out of range of something like an Arduino. I have a Blue Pill I can do a benchmark but Andreas already covered it. th-cam.com/video/cVHCllbN3bQ/w-d-xo.html&vl=en
Hi Larry, so I have seen MicroPython projects for the Pico but only the simple examples like Blink and SPI, PWM ... nothing like VGA... the VGA code has critical timing sections so I think C might be required for those. I expect in time they will produce MicroPython versions which just call the C code docs.micropython.org/en/latest/develop/cmodules.html
why cant we just use 2x1ohm paraller 2x1ohm series 3x1ohm series 4x1ohm series 8x1ohm series it will be more in scale than try match these and have more than 1% error for 8k thats 8oms LOL 499ohm 1000ohm 2000ohm 4020ohm 8060 ohm
Ah yes, the AVR "can't" produce VGA: th-cam.com/video/sNCqrylNY-0/w-d-xo.html ... this works because VGA doesn't care if you update your values for every "pixel". Unlike DVI/HDMI, the clock isn't an included physical signal; it's reconstructed from the sync signals.
I agree you can create the sync signals, and then not output every pixel. In this case pico is outputting for each pixel. There are a number of different resolutions the pico can support too which is what makes the pico more interesting for VGA in my opinion github.com/raspberrypi/pico-extras/blob/master/src/common/pico_scanvideo/vga_modes.c
we allready had parallax propeller with 8 cores or whatever. its free if allready have no need buy 4buck more lol xD. pico v2 coming.. or someone else do
I used a parallax Propeller (2 actually one in the screen for VGA and one as the IO interface) for my Apple 1 clone project 6 years ago.. th-cam.com/video/Wl_xDE11_0A/w-d-xo.html. The propeller is cool with its 8 cogs but it had to be overclocked to get to USB 2.0 speeds and the programming model with Spin is kinda specialized. I do have some propeller chips lying around but even a bare propeller chip not on a board is $8. Makes you wonder how Raspberry Pi can do it for $4. Not for profit I guess.
You realize you keep saying ‘8.1 ohm’ ... not K....and even your notes say that, when the PI doc has it at 8k and 4k .... makes the ladder all over the place. All you have to do is read their doc right.
Yup. TH-cam does not allow you to re-upload videos. So there is a card in the video at that point which takes you through to the video with the correction. th-cam.com/video/i1AwtqPtfrQ/w-d-xo.html Also the description describes the correct resistor values.
Yeah ... but no matter what, it is good that you took the time to give visibility to that pico capability.. many people do not read the docs and will only find out about it via videos like yours.
Thanks for your comment I did think of that but either way requires 2 resistors and both approaches get you within a few percent of the desired value once you consider the manufacturing tolerances. The other thing is 1K are generally more useful than 470 ohm and 33 ohm particularly if you are making R2R DACs (which this is not) but it is why I did not want to use all my 1K resistors, your suggestion would require 9 1K resistors mine uses 3 which is why I chose it. I also have folks who suggested it would be easier/better to make an R2R DAC but I did not have enough 1K and 2K to create all 3 of the 5bit dacs. It would require 15 of each. Which Arduino did you use to do VGA? I’d be interested in what pixel clock you were able to achieve, video link if you have one.
Oh wait I found one th-cam.com/video/jUoR5ICCepA/w-d-xo.html that is cool. Monochrome and require an extra IC, but still pretty cool. The nice thing about Pico VGA is you have up to HD resolution with 15 bit colour and entirely another core running at ~300 mhz to do other things which is how you can build a BBC model B or Spectrum emulators with it.
Instead of trying to trow yours words out , dude take breath think about what you want to say to limit the ahh , hmm ,agh , aahh. Its is impossible to listen
1% resistor value seem odd compared to your old standard 470, 1K etc, here is a list of them, slight logarithmic and repeats values by just moving decimal point www.electronicsplanet.ch/en/resistor/e96-series.php
Ok good weve learnt how to blink the led now lets try building a VGA driver
Using standard resistor values:
two 1k in parallel = 500 ohms
two 1k in series = 2k
1.8k + 2.2k in series = 4k
3.3k + 4.7k in series = 8k
I'm thinking just some trimmer pots.
@@larrybudyou’re gonna need a lot of them
Good to see a RP Pico project that is more than a blinking LED. Thanks for making this one. I hope we will see more complex projects like this from you!! :) Plus it is great to see a C++ project too.
Glad you like it! Let me know if have any ideas for content you want to see.
@@robingrosset6941 an idea, i still want someone to Actually Try to add the original (everspin now) MR10Q010, 1Mb QSPI MRAM chip and bench it against the generic slower psram, it should be good for vga buffers running in it's QSPI Read and Write at 52MB/sec mode, it even has real original 'run in place' mode. i dont know if the Pico has the 4 QSPI useable spare pins though !
Hi Paul, the Pico already has an on-board 2MByte (16M bit) QSPI Flash which is speed matched to the CPU so it can do 66MB/s. I can try benching that if you are interested to see if its running full speed but I think this is likely to be faster than adding an additional external QSPI flash. The data sheet I found for the onboard flash is here www.mouser.ca/datasheet/2/949/w25q16jv_spi_revg_03222018_plus-1489727.pdf
@@robingrosset6941 www.mouser.co.uk/datasheet/2/144/MR10Q010_Datasheet-1218962.pdf
...The Write Data Bytes (WRITE) command allows data bytes to be written starting at an address specified by
the 24-bit address. The data bytes are written sequentially in memory until the write operation is terminated by bringing CS high. The entire memory can be written in a single command. The address counter will
roll over to 0000h when the address reaches the top of memory.
MRAM is a random access memory rather than a page, sector, or block organized memory so it is ideal for
both program and data storage. Unlike EEPROM or Flash Memory, MRAM can write data bytes continuously
at its maximum rated clock speed without write delays or data polling. Back to back WRITE commands to
any random location in memory can be executed without write delay. ...
@@paulmaydaynight9925 I get it now. Let me figure that out. The use case is something like fast buffering of video data?
Oh wow, I was just watching Ben Eater's video on building a graphic's card and was thinking wow that's alot of IC's I bet the pico can handle that.... then I see this... Well done!
Pico is amazing. Power + Price is great.
@@robingrosset6941 Almost as good as ESP32 with dual core 240mhz
You can do everything in software, its called bit banging. Eventually your processor wont be able to do anything because it's costly.
@@eanerickson8915 well.... the obvious progression is (to me) pick an old well documented pci card found in every old pc/draw/dump reclaim all the components then do a Ben Eater to build it back up on a small breadboard/diy pcway pcb in different simple configurations where you use its bits as you wish...
@@haakonness It's actually better for display interfaces thanks to its PIO. Note that the RP2040 can also overclock to as much as 420MHz.
You can use a R2R resistor ladder as the voltage divider for the 5 bit DAC just as well
If you're wondering why you can only get certain resistor values, electronic components are standardized to a logarithmic scale of values known as E series.
thank you much,
Although if you might have any thoughts on the following:
I am having issues where despite wiring 1 pin of each R,G,B
So 1 on GP0, 1 on GP6, etc
And the only color I get is red, any thoughts?
Im thinking its triggering every other pin but the ones I have wired up, but not even the test pattern shows more than just Red (and black)
Although I wouldn't build such a circuit, but your explanation were great and right to the point. I truly enjoyed watching this informative clip very much. Keep up the good work.
Thanks for that. The circuit design is not mine its from the Hardware Design Guide for RP2040. datasheets.raspberrypi.org/rp2040/hardware-design-with-rp2040.pdf
One piece thats maybe not clear in the diagram is the 75 ohm impedance inside the VGA monitor going to ground which is what makes the DAC produce the right-ish voltage levels.
Nicely done. I can see (from the amazon link) your display's native resolution is 1024x600 pixels. Could you tell me what screen resolution and refresh rate were the demos driving the VGA signal at ? Do the display controllers auto-scale up/down the incoming signal's resolution to fit the display or throws error out (like flicker/blank screen) when there is a mismatch ?
2x 1k Ohm in parallel make 500 Ohm. 2x 1k in serial make 2k. 2x 8,1k parallel make 4k
For 2 parallel resistors R=(R1*R2)/(R1+R2), so your last calculation is wrong. It is 4.05k
For n parallel resistors 1/R = 1/R1 + 1/R2 + 1/R3 ... + 1/Rn
@@dieSpinnt But if R1=R2=…=Rn you just reduce the resistance by n. It’s just Kirchhoff’s laws.
@@derekjc777 Sure, Captain Obvious.
And LOL, wtf do you think the "special case" formula (the first one I posted) means? The second one is the general Kirchhoff formula for a parallel resistor network. This is your 2n case.
P.S.: Your gibberish isn't even a formula ... besides your "reduce" gave me a good laugh, thank you. Very mathematic ... and scientific! :o)
P.S.S: It is very boring to repeat basics that are written on page two of every electronics formula collection ...
P.S.S.S: And it is all my fault. I should've written: LOOKUP Resistor Networks and Kirchhoff's Law in WIKIPEDIA! This is just a waste of time, here on TH-cam, don't you think derekjc? :) Anyway, thanks for your comment.
it's a shame they didn't build it against the M4 but still a useful board.
fun fact: the original (integer) 25Hz/50Hz "SVGA" was a UK Inmos invented chip/pcb for the transputer that IBM licenced (along with the other inmos IP, japan got the original sram and related IP as you might expect today) for the x86 and never quite used it to it's fullest potential.
Agree, M4 would also have floating point unit... I think perhaps this was a price decision. Its still a good board for $4 in my opinion.
@3:52 please correct your notes, the last two lines have 4.02k and 8.06k resistors.
TH-cam does not allow videos to be modified once published. The video description contains updated values highlighting the error and there is also an updated video here with the full schematic with correct resistor values. The updated video is linked with a card into the this video at the right timecode th-cam.com/video/i1AwtqPtfrQ/w-d-xo.html. if you click the information button at the timecode you indicate it takes you there.
Great project! A cool feature of the Pico are the fast 12 bit ADCs. Gonna build an USB oscilloscope for audio circuit debugging.
Cool idea!
In theory can a circuit be made with two 12 bit ADC such that you effectivly have a 24 ADC?
a fair LC meter would be cool too.
@@kreynolds1123 you could for shure hack around to gain some extra bits. But the circuit would be way more complicated (and slower) than an extra ADC IC. But as 12 bit is already beyond mV accuracy, why would you need it anyways 😉
I'm impressed ! Great ingenuity !
It would have been good to see some detail on how you designed and coded this
I bet bitluni is happy right now
Was he mentioned?
I recall a long time ago there was a computer that's CPU spent its entire resource running the video and program code was only executed during the blanking time. I forget the brand/model but 1MHZ was a common speed in those days
I remember the ZX81 which was my first computer. In had fast and slow modes. In fast mode it would not bother updating the screen at all so it would go blank until it finished.
@@robingrosset6941 yes that’s right the ZX80/81, your got a good memory
@@robingrosset6941 ^_~ perhaps someone will add something pico to this kit for fun.
Can You Build A Brand New ZX Spectrum From 100% New Parts?
th-cam.com/video/VFLJLxDTEkQ/w-d-xo.html
@@paulmaydaynight9925 I admit I had an eBay accident and have 4 ZX spectrums in my basement and quite a few ZX81s. I am pretty sure a Pico could emulate a ZX81. :-)
1K is wide available resistor. For 500 ohms you just put two in paralel, tolerance increases, but hey... :-)
It is also easy to make 2K, and 4k as 2.2k+1.8k or 2x 2k or just 4x 1k...
1ohm resistor exists you can make MATCH! lol and bcoz 1% from 1ohm is less than 1% 4k you going get real MATCH
I need this but then 2+2+2 bit for 64 colours, and the 7th bit for SYNC, and then 320x240 on PAL 50i.
Isn't it possible to use a R/2R ladder for the DAC?
Yeah, I been wondering the same.
Yes
Then only need 1k and 2k resistors.
Great, thanks a lot for sharing this!!
4:34 Put two 1KΩ resistors in parallel? Similar 2 or 4 2KΩ resistors in series to make 4KΩ and 8KΩ?
Nice Project, subscribed.
The ATmega32U4 comparison is not meant to be serious, is it? 32 against 8-bit. Apples and pears:) Better choose another ARM M0 like STM32F0xx. Oh wait, Dual Core and 133MHz. So better choose something like STM32F446 for the comparison. For me you don't need a comparison at all. The right tool for the right job ... what actually translates to experience and RTFM many, many times.
Keep up the good work:)
there are a few microcontrollers like ESP32, STM32 and Teensy 4.0 which are more comparable. I wanted to make the point about the pixel clock and the price comparison MSRP for the Arduino vs Pico. Arduino are coming out with an RP2040 based board soon so I think we will see a lot more RP2040 boards.
well, yes, nice job.
maybe it would have been easier if you had used an R2R digital-to-analog converter for the circuit. In this case, only 2 resistance types would have been needed
Really neat demo, thanks for making this video. Question, I've been working on an EINK type writer project and found that SPI to a parital refresh eink display is slower than advertised. There are some Eink displays that support the I80 protocol (which appears to be a 24 pin interface), can the pico support this?
So Pico has 26 usable I/Os (actually more if you use all RP2040 pins) but using all them is likely not great for a project as you usually need to use pins for other things too.
I looked up I80 protocol, I've never used it but its basically a parallel interface typically 8 or 16 bits wide sometimes 18 bits wide. It has 3 or 5 pins for control lines.
I think I would try using a 8 bit or 16 bit interface, the pico should be good for that depending on how many other pins you need. I can't think of a reason it would not work but I don't know of a library for I80.
That gender changer idea is brilliant! 😳👍👍
luckiliy i have several vga to hdmi convertors, still waiting for the pico though
Seems they sold out quickly. At the price it's not surprising but hopefully more will be available soon.
Converters? Go native digital, the Pico can handle it (pico hdmi sock)
So thanks for the VGA resiter ladder information. Where did you get the horizontal and vertical timing signals?
the timing information is in the pico-extras scanline project here
github.com/raspberrypi/pico-extras/blob/master/src/common/pico_scanvideo/vga_modes.c
This tells you the supported modes. Is this what you were asking?
@@robingrosset6941 Yah I think so. Back in the "Cheap Video Cookbook" days, getting the h and v timing right was always "a matter of great nicety".
How high do you think you could push the pixel clock with this? I am thinking that the Pico might be just the thing to use as a test pattern generator for CRT televisions, which ties into another project of mine. I'd be using NTSC timings instead of VGA, and I'd be looking at making a single luminance signal with sync instead of RGBHV (no chroma necessary), but what I'd really like is to be able to use a wide variety of pixel clocks as the basis for a TVL generator. Any thoughts would be appreciated!
CRT TV luminance is under 6MHz, so a Pico that can achieve 25MHz VGA could easily do TV.
Well done!
Thanks!
Thank you so much excelente video felicitaciones
Thank you so much for this video
What part of Canada are you from? Your accent sounds like you're from the UK.
I’m from Scotland originally but I live in Ottawa, Ontario now.
Excellent video. I have a question: ¿What is the ide, you using for programing the raspberry pi pico board?
Its a text editor called VSCode. code.visualstudio.com/
It is really good. Works with lots of different languages and will run on Linux, MacOS and Windows.
good video, is there any way to turn old VGA monitors into a digital clock display using picopi, i know it will consume more power but just for a school project
How can we program the Rpi Pico directly via the terminal without pressing the button always?
Hey, I don't suppose you managed to get this running on a modern LCD monitor through D-Sub? I just got the official VGA demo board and can't seem to get any of the demos to run on it.
I did, see this video th-cam.com/video/yjW6tPw4anw/w-d-xo.html I connected it to a new Asus 28" 2K monitor via D-Sub and it worked really well. I have just ordered a VGA demo board myself from Pimoroni. (just came back in stock) so I was going to try that out. Which board do you have?
You reckon you could handle an HD video signal?
A few folks have got 1080i to work for vga and 720p video. Here is an example twitter.com/mdb036/status/1374496642112495619?s=21
Here is 720p video on a pico twitter.com/mdb036/status/1366102403632742404?s=21
Hi, it would be great to dig a little deeper into how the Pico code generates those sync signals, which I'm guessing uses the new programmable i/o, and puts out a bitmap...
5-bit DAC with 5% resistors?
3% is required for 5-bit!
The DAC is built from the R-2R ladder!
Soooo Pico could be used as a stub for a VGA card. Got it.
Great content!
Just what I was looking for.
Some can't summon the minimal courage to use their real adult name.
Also note zx spectrum and BBC micro Pico emulators exist
hi, vsynk and Hsynk resistor?
use an r2-r network fot the dac.
Gracias por compartir. ¡Suscrito! ☺️
so far i have been able to change the color on the example minimal scanvideo example to give a blue screen instead of different colors each scanline. The code is easy to follow but damn there is alot happening. I want to change the sprite on the sprite example and change positions based on a pin input. I gotta get better with my C knowledge. Embedded systems is as deep as i go with software.
decreasing the number of heads on the floating head example got rid of the distortion !!!!
Good intro ... you seem excited about the pico. I appreciate your effort. Probably I'll buy a pico at some point, though I'm not quite so convinced.
Everyone forgets to add shipping when they speak of price. I'm about 100 km east of Ottawa, which is significant because Buyapi.ca wants $11 for shipping outside of Ottawa ($6 within Ottawa.) This is the cheapest shipping option. CanaKit.com charges $13 for shipping. One way or the other, the final price is a lot more than the implied $5.25. (Both places currently out of stock.)
Compare this for example, with the 38 pin esp32s board running at 240 MHz, which has built in wifi, and typically sells on AliExpress for about $5 CAD plus $1.40 shipping. (Roughly 1/3 the real cost of a pico.) This board can also handle vga, micropython, and almost everything the pico does. I've tried these things successfully on several esp32 boards.
Bottom line, the pico seems like a good first attempt at a micro-controller for the 'Raspberry Pi Foundation' and I wish them well, but it is not reasonable to compare the pico to 8 bit Atmels and the pico is already up against some serious competition.
It is true. You can't ship anything in Canada or US for the shipping costs from places like AliExpress. This perhaps reflect postal service rather than the product though. I agree shipping is an issue when comparing prices. It is true for places like DigiKey that small purchases make no sense as shipping is always the killer. I figure I have to buy at least $60 worth of components at a time to make it worth the $15 delivery but it does come very quickly.
I do like the documentation for the Pico. It is good and the momentum of new projects being built right now is growing. Also note the Pico clock speed is configurable and Pico has been clocked up to 270 MHz on its 2 cores.
Raspberry Pi foundation has also started shipping bare RP2040 chips to places like AdaFruit so I think you will see variants of the RP2040 boards coming soon. Like AdaFruit's HUZZAH32 for ESP32 based boards
twitter.com/EbenUpton/status/1362171557469179907
The difference where I think the Pico may be really interesting is the support and community that builds around these products to make it easier for makers to get started and create new things.
On the comparison to 8 bit Atmels or ESP32s; I have lost count of how many Arduinos and ESP32s I have. Arduino started something important, they made their products very accessible to everyone. The whole market for clones of Arduino boards exists because of the demand created by the community. ESP32s can be programmed inside Arduino IDE and before Arduino there were very few choices for makers without getting into expensive SDKs and prototype systems.
If you take shipping out of the picture and buy a branded Arduino, ESP32 (AdaFruit branded HUZZAH32) and Pico from BuyAPi.ca, they sell all three, you can get many Picos for the price of an Arduino or the ESP32. And this is why I think the comparison is fair.
If the Raspberry Pi foundation can build the same community support that Arduino has built then I think the Pico could become something special. Time will tell but it's looking very promising.
@@robingrosset6941 I totally agree with you on most points, especially that this is mostly about community. This is why 8 bit Arduinos and their awful IDE are still hugely popular.
Though I have a few observations:
The shipping costs on AliExpress need to be taken with a grain of salt, and simply calculated into the total price. As you suggest, I am convinced that Canada has just about the worst postal 'service' in the world. What I often do is spend a lot of time looking for a reliable seller who can provide multiple items of interest, and doesn't gouge on shipping. Then I'll place a large order, for a dozen or so different items, and pay for the expensive (more reliable) shipping.
Still, I can't help noticing that it is possible to purchase the pi pico on AliExpress (in stock.) However the best price is about $16 CND + $4 shipping, (compared with ESP32 at around $5 + $2), which sort of implies that picos are intended to sell for about this price.
Years ago, I bought a Raspberry pi (within an hour of when they first became available), because I was totally sold on the concept. I showed it to the guy at our local computer store. He just scoffed and suggested that it would never catch on. I'm tempted to go back again to see if he's perhaps changed his tune. So, I'm not down on the pico. Really, I hope they do well; probably they will. It's always good to have choices. I just like to keep things in perspective.
5:50 Meter says 8.14K not 8.1R
6:15 8 Ohm or 8k Ohm?
and yes 1k two parallel = 500 Ohm
8k ohm see this update video th-cam.com/video/i1AwtqPtfrQ/w-d-xo.html
Nice video! What would happen if you ran the vga signal using only one resistor ladder (bridged into R, G and B)?
You can do this... you would end up with a grey scale if you put into all RGB lines. Or you could pick a colour with some resistors and end up with a graduated shade of that colour. This project uses 15 GPIO pins for 32768 colours but using say 6 pins would get you 64 colours and lots more free pins for other things. Or simply 3 pins for red, green , blue and mixture of the 3 pin colours which would give magenta, cyan, yellow and white.
@@robingrosset6941 using 1 bit per color will bring something between the CGA and EGA, with 8 colors.
@@DmitryKandiner true this would be enough to emulate retro computers which had 8 bit graphics. Lots of 70s and 80s home computers and video arcade games used 8 bit colour like this.
@@robingrosset6941 8 colors are not 8 bits, it's much simpler. Eight bits will bring some 256 colors, a true VGA.
@@DmitryKandiner very true, 8 bit computers like the ZX Spectrum only had 1 bits per colour, so 3 bits = 8 colours … 2^3 :-)
An easier to built and more accurate resistor ladder would be an R2R-Ladder for which you only need two resistor values which basically have to be R and double that value which is more accurate and linear especial when using more bits per pixels for higher color depth but requires some more resistors. Here you can find an example and some theory behind it hackaday.com/2015/11/05/logic-noise-digital-to-analog-with-an-r-2r-dac/
Totally, yup. I used an 2R2 ladder in a project for a sound board DAC a few months ago here is the link th-cam.com/video/TBFA2xbCjZ4/w-d-xo.html
It uses a 10K and 20K R2R for an Audio DAC.
In the Pico VGA video I was copying the hardware design guide as this is what is being used in boards like those on this link
www.cnx-software.com/2021/02/03/open-hardware-raspberry-pi-pico-vga-sd-card-and-audio-demo-board-to-support-qvga-video-playback/
I chose this also because it supports the demo code from Raspberry Pi Foundation for VGA.
Impressive.
Thanks!
How To Debug uisng ST Link and SWD pins
So porting Second Reality to it isn't a stupid idea.. If lookup tables are good enough for the Future Crew then they're good enough for me! Now where did I put my VGA monitor from 1993...
What would happen if I used no resistors? Would the video just be unstable?
Mnn interesting. The colour is an analog signal on each of R,G and B lines. 0 volts is black and 0.7 volts is bright red or green or blue. If all RGB lines are 0.7 v then the screen pixel is white, each signal at full brightness. You at least need something like a resistor to scale the voltages down from 3.3v of the Pico’s I/O line to 0.7 otherwise you might damage your VGA display.
Minimally you need one resistor per colour line for each of RGB and you could just use one Pico I/O per colour. This actually gets you 8 colours (including black and white) which is a very retro 80’s computer colour palette. The HSYNC and VSYNC lines are the ones that make the picture stable, these are TTL logic so 5v is what is expected, there is no need for scaling the voltage on these lines, no resistors needed. The pico’s 3.3v is enough to drive most VGA displays (CMOS logic level rather than TTL but most monitors like CMOS levels anyway)
Hope this helps
@@robingrosset6941 Thanks for replying, I have driven a VGA monitor with an Arduino Uno and no resistors. So maybe it'll work fine with the the Pico but I probably won't take any risks. Good to know
@@goatmeal5779 What resolution can an Uno do? I calculated that for 320x240 on PAL/NTSC you need a 6MHz pixel clock. Can the UNO output a different 8-bit value from a buffer in RAM on every clock pulse?
10:32 I think those are Eben Upton’s head.
Any way to make a crude PCI graphics card for a motherboard?
Thats an interesting idea.... mmmnnn...
Very nice video! Do you think it would be possible to add a w5500 to the pico and receive an image(480px * 480px) over the network to output to to vga? Is the Pico under powered for that?
What about screen resolution achieved, can indicate?
This setup will go to 1080p resolution that’s the maximum I have seen with a pico overclocked. I think this is also the highest VGA can really do.
What pen do you use?
It's a random pen from a pot of pens in my house. I think it's a BIC pen, says "Grip Roller ".
@@robingrosset6941 I think every household has one. Sometimes we do "spring cleaning" and have to check them all to make sure they're still working. Nobody needs that many pens, but as is usually the case, you'll always have too many, or you simply can't find even one. Never in between.
what about composite?
Why does every YT compare with old Arduino boards, at least compare with e.g. the Blue Pill (very much same cost), based on STM32F103 (Arm M1-core), whereas Pico use two Arm M0+ cores.
I was not benchmarking original Arduino vs Pico in the video. The point of explaining the clock differences relative to Arduino is to talk about pixel clock which is what limits the resolutions you can generate and what puts real VGA out of range of something like an Arduino. I have a Blue Pill I can do a benchmark but Andreas already covered it. th-cam.com/video/cVHCllbN3bQ/w-d-xo.html&vl=en
Of course, that "tray" is called a "cut tape" in the industry.
Can this be done with MicroPython?
Hi Larry, so I have seen MicroPython projects for the Pico but only the simple examples like Blink and SPI, PWM ... nothing like VGA... the VGA code has critical timing sections so I think C might be required for those. I expect in time they will produce MicroPython versions which just call the C code docs.micropython.org/en/latest/develop/cmodules.html
@@robingrosset6941 Thank you. I’ll try it in C (as soon as I get my hands on a Pico!). Great video.
10:02 ah yes, normal speed. I too run at normal speed.
hi would it be possible to send a 640x480 linux desktop + audio to the pico + monitor (adding a wifi module to the pico)?
why cant we just use
2x1ohm paraller
2x1ohm series
3x1ohm series
4x1ohm series
8x1ohm series
it will be more in scale than
try match these and have more than 1% error for 8k thats 8oms LOL
499ohm
1000ohm
2000ohm
4020ohm
8060 ohm
Ah yes, the AVR "can't" produce VGA: th-cam.com/video/sNCqrylNY-0/w-d-xo.html ... this works because VGA doesn't care if you update your values for every "pixel". Unlike DVI/HDMI, the clock isn't an included physical signal; it's reconstructed from the sync signals.
I agree you can create the sync signals, and then not output every pixel. In this case pico is outputting for each pixel. There are a number of different resolutions the pico can support too which is what makes the pico more interesting for VGA in my opinion
github.com/raspberrypi/pico-extras/blob/master/src/common/pico_scanvideo/vga_modes.c
2x 1k resistors in parallel will give you 500 ohms.
build a c64 emulator with the pico :)
Lol you sound almost British? But you live in USA? Neutral accent lol
I am British actually born in Scotland but I live in Canada now.
@@robingrosset6941 Proof that Canadians are cool, eh!
please try to play doom ;)
we allready had parallax propeller with 8 cores or whatever. its free if allready have no need buy 4buck more lol xD. pico v2 coming.. or someone else do
I used a parallax Propeller (2 actually one in the screen for VGA and one as the IO interface) for my Apple 1 clone project 6 years ago.. th-cam.com/video/Wl_xDE11_0A/w-d-xo.html. The propeller is cool with its 8 cogs but it had to be overclocked to get to USB 2.0 speeds and the programming model with Spin is kinda specialized. I do have some propeller chips lying around but even a bare propeller chip not on a board is $8. Makes you wonder how Raspberry Pi can do it for $4. Not for profit I guess.
You realize you keep saying ‘8.1 ohm’ ... not K....and even your notes say that, when the PI doc has it at 8k and 4k .... makes the ladder all over the place. All you have to do is read their doc right.
Yup. TH-cam does not allow you to re-upload videos. So there is a card in the video at that point which takes you through to the video with the correction. th-cam.com/video/i1AwtqPtfrQ/w-d-xo.html
Also the description describes the correct resistor values.
Yeah ... but no matter what, it is good that you took the time to give visibility to that pico capability.. many people do not read the docs and will only find out about it via videos like yours.
I was wondering if he'd ever realise that 2x 1k is 500, but nope... btw, doing vga on an arduino is much cooler
Thanks for your comment I did think of that but either way requires 2 resistors and both approaches get you within a few percent of the desired value once you consider the manufacturing tolerances. The other thing is 1K are generally more useful than 470 ohm and 33 ohm particularly if you are making R2R DACs (which this is not) but it is why I did not want to use all my 1K resistors, your suggestion would require 9 1K resistors mine uses 3 which is why I chose it. I also have folks who suggested it would be easier/better to make an R2R DAC but I did not have enough 1K and 2K to create all 3 of the 5bit dacs. It would require 15 of each. Which Arduino did you use to do VGA? I’d be interested in what pixel clock you were able to achieve, video link if you have one.
Oh wait I found one th-cam.com/video/jUoR5ICCepA/w-d-xo.html that is cool. Monochrome and require an extra IC, but still pretty cool. The nice thing about Pico VGA is you have up to HD resolution with 15 bit colour and entirely another core running at ~300 mhz to do other things which is how you can build a BBC model B or Spectrum emulators with it.
lol dude, pick an os! /s
But arduino nano is cloned in china and sold for less than $2
I was using the MRRP and current list prices. Pico has only been out for a few weeks.
I find you uh's and um's very distracting. The rest is, uh, very, um, interesting.
Instead of trying to trow yours words out , dude take breath think about what you want to say to limit the ahh , hmm ,agh , aahh. Its is impossible to listen
1% resistor value seem odd compared to your old standard 470, 1K etc, here is a list of them, slight logarithmic and repeats values by just moving decimal point
www.electronicsplanet.ch/en/resistor/e96-series.php