Microcontroller Considerations

A project log for µGame Turbo

Python game console like µGame, only faster, bigger and with more memory.

ðeshipuðeshipu 7 days ago0 Comments

The µGame uses a SAMD21 microcontroller, with 32kB of RAM, running at 48MHz, and uses 24MHz SPI to send data to the screen. What we need is more RAM and faster screen communication.

There are several possibilities for that:


The new SAMD51 microcontroller is a big brother of the SAMD21. It still runs at the same 48MHz, but is faster due to richer architecture (floating point support, etc.). More importantly, it has up to 256kB of RAM and can do at least the same speed of SPI communication, possibly better (the display stops working above 40MHz anyways). Adafruit is working hard on a port of CircuitPython for it — it will have at least the same features, if not more. It is about twice as expensive.


The good old ESP8266 actually packs quite a punch. Running at 80MHz, it can do 80MHz SPI communication — more than the limit of the display. It has ~90kB of RAM, but the layout is a bit strange and not all of that is usable for the programs. It also has WiFi, which is an interesting thing for multiplayer games. There is a port of CircuitPython for it, but it's not as stable and finished as the SAMD21 one — it lacks some love. The main problem, however, is lack of audio support in CircuitPython, and lack of USB access to the filesystem. The latter can be fixed with something like #ESP8266 with True USB, the former would need some development, possibly porting NodeMCU's PCM suport.


Two cores at 240MHz, 520kB of RAM, very fast SPI, WiFi and BLE, and not very expensive. Has the same problems as ESP8266, though, with the additional complication that there is no CircuitPython for it as of yet, and the two MicroPython ports are still in beta.


I'm sure there are tons of other microcontrollers that could be used for this. However, they would all require considerable effort in porting CircuitPython, getting USB to work, etc. — so they are out of consideration for now.

The SPI speed is also not a very important parameter, as at this point it would make much more sense to use the display in parallel communication mode — of course that requires new special drivers and more research.