Changes between Version 3 and Version 4 of Lichee Pi Baseboard


Ignore:
Timestamp:
Aug 3, 2023, 9:41:16 PM (10 months ago)
Author:
pulkomandy
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Lichee Pi Baseboard

    v3 v4  
     1= What it is
     2
     3This is a project I had for a long time, but the technology became available (again?) only recently.
     4
     5The goal is to make a reasonably simple computer that would be reasonably "fully" understood by a single person. This does not mean anything, as everyone has and wants a different level of understanding. The general idea is I had great fun programming some 8bit microcomputers from the 1980s, but they are not manufactured anymore, and the old architecture makes them strange an quirky by today standards, and also some of the chips used in them are not manufactured anymore.
     6
     7There are more modern offers trying to replicate that general idea, but they are usually "cheating" in a way, by including an FPGA or a more powerful CPU used as a coprocessor. If you're going to have a powerful CPU, why not allow the user to run code directly on it? Why make your system more complicated (and thus more costly, larger and needing more electricity)?
     8
     9So, I was looking for some sort of solution based on a microcontroller. The Bitbox console from Makapuf came quite close, but the software was quite complicated (with things like generating a VGA signal by tricky use of DMA channels and timers) and the hardware just a bit too limited. I wanted more RAM and less Flash, to make this more "computer" in the modern sense (a thing where you can easily load and run different programs). On the Bitbox, there is a lot of Flash (relatively, I think it's 512K) and not so much RAM (196K or so).
     10
     11The problem is, there were not many microcontrollers that would allow this combination:
     12- Have "a lot" of RAM (512K or so at least)
     13- Be generally self-contained, with peripherals like a display controller
     14- Be reasonably easy to solder
     15
     16The ESP32 family has some variations with RAM in that range, but usually no display controller (it is possible using the DMA thing like on the Bitbox). The STM32 family has some devices with an LCD controller, but none of them have sufficient RAM, and code running from RAM is slowed down since it's not designed for that.
     17
     18Recently, I came accross the Allwinner V3S. It is almost perfect, having 64MB of DDR RAM (that's more than I planned initially, but why not), it has an LCD controller that can be convinced to output VGA signals, and it is in a QFP package (all pins on the side, none under the device). The on-board RAM means it can have a low pin count, and also that the CPU and RAM can run at a high frequency (1.2GHz in this case!) while not having to do any complex printed circuit routing for high frequency things. The pins are a bit too small and close together for me to solder them with a soldering iron, but it would be doable with solder paste and a hot air gun. I don't know if I will bother to do that, it is also possible to order the boards preassembled. Still, it allows to do a 2 layer PCB, which is simpler and cheaper.
     19
     20For the first version, I used the Lichee Pi system on module. It has a strange form factor (solderpads on the edges, but components on both sides so it can't be stacked on another PCB) but I found a way to make it work (inspired by some other designs using it, such as the COBURA game console).
     21
     22My board includes:
     23
     24- Lichee Zero system on module with Allwinner V3s CPU (1.2GHz single core ARM, 64MB RAM) and MicroSD slot
     25- Ethernet port (100MB)
     26- USB-A host port
     27- VGA port (up to 1024x1024)
     28- Audio output
     29- On board USB to UART and USB-A port for both power supply and serial debug
     30- "keyADC" buttons (4 buttons connected to an ADC, allowing a single-pin keyboard)
     31- Extension port exposing the other pins from the V3s CPU (SPI, I2C, ...)
     32
     33= Software
     34
     35I have an OpenEmbedded minimal build now, using mainline U-Boot and Linux. Some small patches were needed that people previously doing support for the board didn't manage to upstream.
     36
    137= Notes
    238
    3 Currently using some random SD image I found on the web. It does not have audio and ethernet. It is from 2017, so the next step is to build a newer one.
     39The VGA resolution is configured in the device tree. Good enough for U-Boot console, but it would be nice to be able to change it at runtime.
    440
    5 Upstream uboot and Linux should work fine.
     41For doing SCART video output, the hsync/vsync needs to be turned into a composite sync (that's just a XOR of the two signals). I put a +5V line on the VGA output so I can power a chip doing the XOR in the SCART adapter (and also power DDC lines on VGA displays). I have to check if the LCD driver accepts doing such lowres things.
    642
    7 The LCD videomode is currently configured statically with an uboot build option CONFIG_VIDEO_LCD_MODE. This needs to be tweaked to support VGA output using the LCD IO pins, mainly the hsync needs to be a lot wider than it would be for LCDs (about 20% of the horizontal total according to the VESA GTF, but modern VGA can probably get away with less than that).
     43= Future plans
    844
    9 TODO: it would be great if this was settable from uboot environment instead of having to rebuild. It is possible to edit it directly in the SD image with a hex editor however, so that's better than nothing.
     45... maybe someday ...
    1046
    11 For doing SCART, the hsync/vsync needs to be turned into a composite sync (that's just a XOR of the two signals). I put a +5V line on the VGA output so I can power a chip doing the XOR in the SCART adapter (and also power DDC lines on VGA displays). I have to check if the LCD driver accepts doing such lowres things.
     47If I was to do a new version of this hardware:
     48
     49 * Switch to the Allwinner V3x. Twice the RAM, twice the fun, but still single CPU core (keeping things simple here). Also it has a simpler power supply layout with less pins.
     50 * Include an USB hub on-board. It is annoying to have only one USB port that is used by the keyboard
     51 * It is also possible to rewire the keyboard over an I2C or SPI IO expander and wire the keyboard matrix directly to that (or directly to the GPIOs, but I would prefer to keep some of them for later uses).
     52 * Add an on/off switch and maybe a RESET button
     53
     54For now there's a lot of fun to be had with the existing hardware.
     55
     56= If you want one
     57
     58I have 9 PCBs left and components to preassemble some of them (I can solder the SMD resistors/capacitors) and send you the board and connectors as a kit. You'll have to provide your own Lichee Zero.
    1259
    1360= Various links