I’ve created a branch of CircuitPython with the board and pin definitions for the Pimoroni PICO dv board.
I’ve built CircuitPython using this update and the DVI output, SD Card and I2S audio all seem to work well.
I’m not sure what Adafruit’s policy will be with respect to adding a “demo base” like this as a board since my update will only work if an RP2040 based board is installed as apposed to something like an ESP32-S2 board with a Pico form factor.
But before I submitted the PR asking Adafruit if this approach was appropriate, I thought I should run it by someone at Pimoroni and see if you had any objections to me submitting the PR or perhaps you would prefer to look over/update my attempt at the PR and submit it yourselves.
Here is the test script I ran which mounts an SD card from which you can play a .WAV file by entering “/sd/filename.wav” when prompted.
Using the “absolute newest” version of CircuitPython (8.1.0 Beta 1) and the board updates from above plugging in an HDMI monitor results in REPL output being displayed. The board.DISPLAY object can be used normally with the displayio, adafruit_turtle, gifio, etc… libraries.
I haven’t looked at the problem any further. Trying to build CircuitPython with both the Wifi and DV features enabled ends up using a lot of the memory space and I suspect the problem I was seeing is somehow connected to memory management.
There has been some memory management work done in CP recently so it may be worth trying to rebuild with the latest version but it will be a few days before I’m able to give it a try.
If you load the released UF2 for the Pico dv from circuitpython.org it should work on the Pico W as well as it does on a standard Pico, you obviously won’t have access to any WiFi capabilities.
it’d be great to get pico W wifi working at some point. but, I guess it would also be possible to use an esp32 co-processor for wifi? would it be possible, with the PICO dv, for the rp2040 to use SPI to communicate with an adafruit airlift type device for wifi?
looking forward to hearing about your adventures in CP memory ;-)
I don’t think a version for the normal Pico will work for the Pico W. E.G. CP for the latter will always try to drive the on-board LED differently than the CP for the normal PIco. And this is for good reason, since the GP is in use for other things.
Regarding a co-processor: I am successfully using an ESP-01S controlled via UART as a co-processor for Wifi. Works like a charm and it is very efficient. But if you need HTTPS, you might be better of with an esp32.
I finally had a chance to build with the latest CP bits and unfortunately the issue appears to be worse, the build with the latest bits doesn’t even start. I’ll have to block off some time to dig into it again.
In the mean time, if you want to play around with a Pico W on the DV Demo Base, in my earlier attempts I did find a messy work around which was to remove the DV initialization during CP startup. This hack still seems to work but that means you need to initialize the output using python code. I’ve uploaded a build with CP 8.2 on my github site here: cp-8.2-PICOdv-w.uf2
and the code to initialize the DV output is:
I just took another look to see what Adafruit was doing with the PiCowbell DVI board and it looks like they are using the standard Pico/Pico W circuitpython builds. So I guess that’s another option, you can just grab the latest build from circuitpython.org and used the GPn pin names for the DVI output.
The PiCowbell DVI learning guide should apply to the Pimoroni Pico DV Demo Base pretty well, it just won’t address all the additional features of the Pimoroni board (SD Card, I2C audio, buttons…). Those features should all work though, you just have to use the GPn pin names in your code.
awesome! thanks so much. that all makes perfect sense and is exactly what I need to be able to dig into it.
I have that adafruit board as well, I’m really enjoying all the video DVI video out stuff, it’s really amazing what you and the whole community have done.
It looks like an update to the display system changed how the framebuffer processes the display dimensions. If you’re using CircuitPython 8.2.0 or later you need to set the screen width to 320, height to 240 and the color depth to 8 not the 640,480,1 used in the examples above.
I’ve posted a PR to Circuitpython for using the Pico W on the PICO dv Demo Base. It turns out that if WiFi and the DVI output are enabled on the Pico W, there isn’t enough memory remaining to really use the board.
I’ve suggested essentially using the Pico W like a standard Pico (disabling the WiFi) but asked for suggestions from the Circuitpython Devs/Community.
Regardless of what happens with the Pico W version Circuitpython for the dv Demo Base, I did test that loading the current (8.2.4) version of the dv Demo Base firmware for the Pico (no networking) onto the Pico W works fine. You obviously lose any networking capablities and the LED can’t be accessed but all the Pimoroni Pico dv Demo Base features work including the DVI output.
Circuit Python changed how it handled the dimensions and color depth of DVI framebuffers which broke the dv Demo Base firmware for a couple 8.x.x releases before @brandonthetinkerer noticed and reported the problem so be sure you grab at least 8.2.4 from circuitpython.org.
I just tried with CircuitPython 8.2.9 and 9.0.0 Alpha 6 and was able to mount an SD card fine.
If you’re trying to run the test script listed above (Apr 20, 2023), the CircuitPython I2S pin names were renamed to be more standard. You will need to replace the audiobusio line with the following:
a = audiobusio.I2SOut(board.I2S_I2S_BIT_CLOCK, board.I2S_DATA, board.I2S_WORD_SELECT)
EDIT: Successfully mounting SD cards can depend on the SD card being used. If you’re having trouble try a different card and make sure it’s been formatted FAT16/FAT32.