Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 22:02 05 May 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Raspberry Pi enters microcontrer game with a $4 Pico

     Page 4 of 7    
Author Message
ceptimus
Senior Member

Joined: 05/07/2019
Location: United Kingdom
Posts: 130
Posted: 02:31pm 24 Jan 2021
Copy link to clipboard 
Print this post

Someone's done bit-banged DVI on the Pi Pico.  https://github.com/Wren6991/picodvi

He says there's room in RAM for a QVGA framebuffer, and it can drive DVI with just resistors and an HDMI connector.

But it looks like he's also made a board with some expansion video RAM.

In the photo, the (expanded) PI Pico is driving two monitors via HDMI at the same time!

 
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1702
Posted: 02:45pm 24 Jan 2021
Copy link to clipboard 
Print this post

full description here

  Quote  RP2040 was designed to run at 133 MHz, but we found (without too much surprise) that typical silicon can be pushed further. In fact, there was overlap between the maximum system clock, and the TMDS bit clocks of slower DVI video modes. We had done great stuff with VGA on the FPGA platform, which ran at 48 MHz, but wouldn't it be absurd and wonderful to connect your microcontroller straight to an HD TV with no other electronics in between? This seemed unlikely to work out, but I stayed up at night playing around with assembly loops, and I could not convince myself that DVI was out of reach. Everything seemed to fit:

With some of the core-local hardware on RP2040, and a neat encoding trick, I could do pixel-doubled TMDS encode on-the-fly using around 60% of an M0+ (running at 252 MHz, for 640x480p 60 Hz DVI)
PIO can yeet out data streams at system clock frequency, and drive a 1/10th rate clock on the side, with pretty minimal programming
Some of the DMA features are help with putting together the sync/blanking patterns on the fly, rather than having the patterns flat in memory
With the second processor utterly unencumbered, you can render some pretty graphics to put on your DVI display. There is even enough RAM for a QVGA framebuffer!




Edited 2021-01-25 00:47 by lew247
 
Cyber

Senior Member

Joined: 13/01/2019
Location: Ukraine
Posts: 161
Posted: 06:26am 25 Jan 2021
Copy link to clipboard 
Print this post

Here is a nice comparison. Some gaps still need to be filled in (anyone can fill in).
https://socialcompare.com/en/comparison/rp2040-vs-stm32-vs-esp32-vs-esp8266
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3990
Posted: 09:08am 25 Jan 2021
Copy link to clipboard 
Print this post

  RetroJoe said  A cheap and cheerful $20 "standard gadget" like the TTGO, preflashed with MMBasic, could be a great on-ramp to the MM community for people unwilling to spend $100+.

I don't get why you say $20 and $100.  Seems you ought to be comparing with the bare waveshare board at about $30.

I'm not sure what other hardware costs are "forced" to make either board usable beyond the bare price... depends what you want to do with the device I suppose.

John
 
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1702
Posted: 10:15am 25 Jan 2021
Copy link to clipboard 
Print this post

Although I started this topic with the hopes the RP2400 would be a good candidate for mm it's obvious from Peters comments that it is missing several features necessary to make it viable
Until they bring out an updated chip with the missing functions we have to respect Matherp's choice that it's not worth the time and trouble to port mm to this unit.
He along with Geoff are the masters in mm basic and we have to respect what they say.

What we need is a chip that can run the CMM2 commands but with Wifi and Bluetooth in a board small enough to be embedded, ideally with vga,dvi capability as well so it can use any monitor.
it's cheap enough to get a hdmi converter from vga or dvi so it's not essential it was onboard
 
Cyber

Senior Member

Joined: 13/01/2019
Location: Ukraine
Posts: 161
Posted: 10:50am 25 Jan 2021
Copy link to clipboard 
Print this post

Even updated version of the RP2400 might be more in line with Micromite rather than Maximite. It would all depend on chip functions and capabilities.
 
jirsoft

Guru

Joined: 18/09/2020
Location: Czech Republic
Posts: 533
Posted: 11:09am 25 Jan 2021
Copy link to clipboard 
Print this post

  lew247 said  
What we need is a chip that can run the CMM2 commands but with Wifi and Bluetooth in a board small enough to be embedded, ideally with vga,dvi capability as well so it can use any monitor.
it's cheap enough to get a hdmi converter from vga or dvi so it's not essential it was onboard


CMM2 with ESP32 module inside or on back?
Jiri
Napoleon Commander and SimplEd for CMM2 (GitHub),  CMM2.fun
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3990
Posted: 11:19am 25 Jan 2021
Copy link to clipboard 
Print this post

  lew247 said  What we need is a chip that can run the CMM2 commands but with Wifi and Bluetooth in a board small enough to be embedded, ideally with vga,dvi capability as well so it can use any monitor.


I'd change that "What we need" to "What some need" (there's plenty of times I don't need WiFi and Bluetooth and DVI - or even any of them).

If it's what some do need (seems plausible), couldn't a cheap board do it (whether using a Waveshare or all-in)?

edit: isn't an ESP32 about all that's needed?

It's a LOT easier and faster to ADD hardware to the existing CMM2 base than the vast amount of effort to port MMBasic to yet another device.

John
Edited 2021-01-25 22:04 by JohnS
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3990
Posted: 02:49pm 25 Jan 2021
Copy link to clipboard 
Print this post

  RetroJoe said  I guess lew247's original thesis was that because the Pico is ARM based like the STM32, it would be "easy" to port MMBasic to it.

Except the pico has only a rather crippling subset of the STM32 and small RAM, so think of it as a Micromite not a CMM2.  (If you will, a microcontroller not a microcomputer.)  All the I/O is unlike the CMM2 chip's I/O.

So, it would take months of effort.

May as well use a Micromite :)

John
Edited 2021-01-26 00:50 by JohnS
 
Cyber

Senior Member

Joined: 13/01/2019
Location: Ukraine
Posts: 161
Posted: 02:55pm 25 Jan 2021
Copy link to clipboard 
Print this post

  JohnS said  Except the pico has only a rather crippling subset of the STM32 and small RAM, so think of it as a Micromite not a CMM2.  (If you will, a microcontroller not a microcomputer.)
. . .
May as well use a Micromite :)

Same as my point. Even if you manage to port MMBasic to Pi Pico it might turn out very similar to Micromite, which is already an existing product. And PIC32 chips for Micromite are also pretty cheap.
 
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1702
Posted: 04:15pm 25 Jan 2021
Copy link to clipboard 
Print this post

arghh ignore sorry posted in error
Edited 2021-01-26 02:16 by lew247
 
RetroJoe

Senior Member

Joined: 06/08/2020
Location: Canada
Posts: 290
Posted: 04:26pm 25 Jan 2021
Copy link to clipboard 
Print this post

Wow, love the passion people are bringing to this thread (as Graham Parker told us, passion ain't no ordinary word - obviously, my retro tastes apply to both computers and music :)

A few "closing arguments":

* JohnS, the $30 Waveshare module needs a bunch of parts and labor to turn it into a CMM2, bringing the TCO into the $100 range. For many people here, that DIY dimension is part of the fun, including the entrepreneurial folks fabricating blank PCBs and fully assembled CMM2s, as well as the hobbyists modding their CMM2s with mouse ports and wifi adapters.

* My thesis is there is a segment of the retro computing market that would be interested in playing around with a contemporary machine that reminds them of their "first love" 8-bit computer, but are not necessarily interested in picking up a soldering iron. Call this segment the "Nostalgia Seekers". Remember, the mass appeal of the second and third wave of 8-bit computers was that they were packaged and marketed as affordable, non-threatening consumer appliances - "Sinclair vs Altair", if you like :)

* Piggybacking an ESPx onto a CMM2 (ideally in a "standard" way...) is certainly an intriguing option, but it is moving even farther away from the Nostalgia Seeker in terms of cost and complexity.

* Conversely, MMBasic running directly on a $20 fully-assembled TTGO VGA32 would, IMHO, fit that Nostalgia Seeker segment very nicely. The device would theoretically be fast and feature-rich enough to be fun and useable, inexpensive enough to make purchasing one a no-brainer, and its hardware limitations would not be a major consideration for this segment (i.e. if you need more raw compute power and/or industrial control capabilities, there are dozens of other options, including "trading up" to a STM32-based CMM2).

Next steps for me are to further research the TTGO VGA32 projects, tool chains, specs/performance et al, and report on my findings via a dedicated thread. Top of my list is a Sinclair Spectrum emulator that should be a good proof of concept for what a "Color MiniMite" could look like.
Edited 2021-01-26 02:30 by RetroJoe
Enjoy Every Sandwich / Joe P.
 
Nimue

Guru

Joined: 06/08/2020
Location: United Kingdom
Posts: 369
Posted: 04:38pm 25 Jan 2021
Copy link to clipboard 
Print this post

@RetroJoe - to chip in....

I use / try to use the CMM2 in education.  The idea of a fully functional, plug in and go development device is a massive draw.

What education needs is almost a cut down CMM2, which you describe as "Conversely, MMBasic running directly on a $20 fully-assembled TTGO VGA32"   << that would be a killer educational device.  A couple if I/Os would be all that needed.  I can "see" a form factor that looks like a "fat" USB stick - key board on one end, VGA and power on the other.

Nim
Entropy is not what it used to be
 
mclout999
Guru

Joined: 05/07/2020
Location: United States
Posts: 482
Posted: 04:57pm 25 Jan 2021
Copy link to clipboard 
Print this post

  Quote  Next steps for me are to further research the TTGO VGA32 projects, tool chains, specs/performance et al, and report on my findings via a dedicated thread. Top of my list is a Sinclair Spectrum emulator that should be a good proof of concept for what a "Color MiniMite" could look like.
Edited 2021-01-26 02:30 by RetroJoe


See my post above.  I have been tinkering with these for a while.  One of the ZX developers has emailed me and told me he is just now getting the 1.4 version with the SD card for the first time and plans to targe for it to fully support the SD.  Right now none of the ZX projects have SD card support. I think the VGA32 is a promising device for a bare mettle solution for MMB. It is so cheap and so small but has so many features, mouse, KB, WIFI, Bluetooth, and 8 GPIOs. there are free case designs on Thingiverse for it but for the first ones.  They would have to be updated for the 1.4s SD card.  I am hoping for a 1.5 with more GPIOs.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3990
Posted: 05:55pm 25 Jan 2021
Copy link to clipboard 
Print this post

  RetroJoe said  JohnS, the $30 Waveshare module needs a bunch of parts and labor to turn it into a CMM2, bringing the TCO into the $100 range.

It just doesn't.

You're adding the box (which you don't get with the VGA32) and a profit margin for low quantity production then comparing against a barebones thing with no box.

All you need is


The board on the right is about $30 and the mobo (the one on the left) a lot less than $70.

You end up with something vastly more use & far faster than the VGA32.  And it has MMBasic now.

Sure, I'd want a box but I don't NEED one.  The hobbyists probably prefer to make the mobo.

Either way, getting MMBasic onto something like a Micromite but much cheaper needs someone with lots of time to write the low-level C code.  Who???

John
 
mclout999
Guru

Joined: 05/07/2020
Location: United States
Posts: 482
Posted: 06:36pm 25 Jan 2021
Copy link to clipboard 
Print this post

  Quote  The board on the right is about $30 and the mobo (the one on the left) a lot less than $70.


To be fair I costed out all the parts and shipping to get them and it was quite a bit more than the $130 shipped I got from micromite.org. That is why I got the premade one.  Your points are good and I prefer the CMM2 for myself but there is that segment of educators that the VGA32 would be a very nice use case and maybe hobbyist that would love pushing the limits of that tiny little board.  This is mostly a thought experiment here and you are right who indeed? I just wish that the CMM2 had the WIFI and BlueTooth build into its DNA as the ESP32 does. I am sitting here today playing ZX games on a device the size of a matchbox and that is kind of cool.  I made a crude case for it with a folded acetate sheet that took me all of 5 min at zero cost. The one thing left out of the cost equation though is the PS/2 KB & Mouse.  Not everyone has those lying around as I do.
 
RetroJoe

Senior Member

Joined: 06/08/2020
Location: Canada
Posts: 290
Posted: 06:56pm 25 Jan 2021
Copy link to clipboard 
Print this post

Who, indeed - I wish I had the time and low-level technical skills to give it a go, but realistically that's not in the cards.

All I can say is I believe the project is technically feasible and would materially expand the MMBasic ecosystem and user community, including deeper into the "Educator" segment, per Nimue's comments. If that is not the point of all this (and to have fun doing it...) I don't know what is :) Arguably, no one "needs" a CMM2 at all, at any price point, when you can buy a full-blown Windows laptop for a few hundred bucks, or a Raspberry Pi for a fraction of that.

I also don't know if Geoff & Peter are inclined to endorse or support such an effort (the MMBasic source code license is very clear on this...), but the fact that Peter has had a few kicks at the cat on a Raspberry Pi port indicates that a low-cost / high-performance / readily-available HW platform to host MMBasic remains an important goal, as a means of exposing as many people as possible to the joys of learning and coding in BASIC.

According to Eben Upton, the Raspberry Pi was designed to serve as this "First Computer Experience", but despite it's enormous popularity and success, it doesn't really hit that mark. The RPi reminds me of the Honda Element, which was targeted at the image-conscious "youth" / new car buyer demographic, but instead was snapped up in droves by retired empty-nesters, as an awesomely practical compact utility vehicle at a very attractive price point.

None of the above is intended to detract from the CMM2, which is an awesome technical achievement and a very elegant design with compute power to spare. But, even in this niche market, I don't think "one size fits all" is the correct philosophy.
Enjoy Every Sandwich / Joe P.
 
RetroJoe

Senior Member

Joined: 06/08/2020
Location: Canada
Posts: 290
Posted: 09:50pm 25 Jan 2021
Copy link to clipboard 
Print this post

  mclout999 said   See my post above.  I have been tinkering with these for a while.  One of the ZX developers has emailed me and told me he is just now getting the 1.4 version with the SD card for the first time and plans to targe for it to fully support the SD.  Right now none of the ZX projects have SD card support. I think the VGA32 is a promising device for a bare mettle solution for MMB. It is so cheap and so small but has so many features, mouse, KB, WIFI, Bluetooth, and 8 GPIOs. there are free case designs on Thingiverse for it but for the first ones.  They would have to be updated for the 1.4s SD card.  I am hoping for a 1.5 with more GPIOs.


mclout999, thanks for the update and info!

As mentioned, I will start a new "ESP32 SIG" (Special Interest Group) thread - I sense there's a few folks here who would like to dive a little deeper into this MCU, as well as explore the TTGO VGA32 implementation and it's "Maximite-esque" potential.
Enjoy Every Sandwich / Joe P.
 
hitsware2

Guru

Joined: 03/08/2019
Location: United States
Posts: 715
Posted: 12:24am 26 Jan 2021
Copy link to clipboard 
Print this post

**************** So Far So Good   ***********************

MicroPython v1.13-290-g556ae7914 on 2021-01-21; Raspberry Pi Pico with RP2040
Type "help()" for more information.
>>> help
<function>
>>> help()
Welcome to MicroPython!

For online help please visit https://micropython.org/help/.

For access to the hardware use the 'machine' module.  RP2 specific commands
are in the 'rp2' module.

Quick overview of some objects:
 machine.Pin(pin) -- get a pin, eg machine.Pin(0)
 machine.Pin(pin, m, [p]) -- get a pin and configure it for IO mode m, pull mode p
   methods: init(..), value([v]), high(), low(), irq(handler)
 machine.ADC(pin) -- make an analog object from a pin
   methods: read_u16()
 machine.PWM(pin) -- make a PWM object from a pin
   methods: deinit(), freq([f]), duty_u16([d]), duty_ns([d])
 machine.I2C(id) -- create an I2C object (id=0,1)
   methods: readfrom(addr, buf, stop=True), writeto(addr, buf, stop=True)
            readfrom_mem(addr, memaddr, arg), writeto_mem(addr, memaddr, arg)
 machine.SPI(id, baudrate=1000000) -- create an SPI object (id=0,1)
   methods: read(nbytes, write=0x00), write(buf), write_readinto(wr_buf, rd_buf)
 machine.Timer(freq, callback) -- create a software timer object
   eg: machine.Timer(freq=1, callback=lambda t:print(t))

Pins are numbered 0-29, and 26-29 have ADC capabilities
Pin IO modes are: Pin.IN, Pin.OUT, Pin.ALT
Pin pull modes are: Pin.PULL_UP, Pin.PULL_DOWN

Useful control commands:
 CTRL-C -- interrupt a running program
 CTRL-D -- on a blank line, do a soft reset of the board
 CTRL-E -- on a blank line, enter paste mode

For further help on a specific object, type help(obj)
For a list of available modules, type help('modules')
>>>
my site
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3990
Posted: 12:35pm 26 Jan 2021
Copy link to clipboard 
Print this post

  RetroJoe said  the Honda Element, which was targeted at the image-conscious "youth" / new car buyer demographic

It was???? One of the ugliest cars I've seen!!

Wow.

John
 
     Page 4 of 7    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025