Best TV/HDMI shield for building Modern 8 bit ATMega Computer

Hi, I want to build a modern 8 bit computer using mainly ATMega chips (and develop it using Arduino boards). Specs I currently have are:

  • colour video output (resolution > 200x200, colours >15)
  • cost < $50
  • build with commonly available components
  • buildable by beginner electronic/microcontroller enthousiasts (so smd components are out)
  • functions like cpu/gpu/sound should be recognizable and therefore have to be seperate components

For video output, HDMI would be nice since it being the standard of monitors/tv's nowadays. However ATMega chips don't have the horsepower to generate HDMI. .

For the GPU I see several options:

  • ATMega generating Composite signal: involves changing the crystal (Pal/NTSC specific MHz)
  • ATMega generating VGA signal: involves changing crystal (20 MHz)
  • NanoPi DUO ($8): has composite out, serial comm. can be used to call draw commands
  • Raspberry Pi Zero ($5): has HDMI out, serial comm. can be used to call draw commands
  • Propellor boards/shields: however these are expensive

As I understand changing crystals is a hassle to debug since reprogramming needs the original 16MHz crystal and not something for the beginner. Please tell if I am wrong here!

On the other hand, using a NanoPi or Raspberry Pi feels like cheating since these board are capable of running an 8-bit emulator.

Do you have suggestions and what are your thoughts about this project?

NardJ:

  • cost < $50

I think that is rather fanciful.

The only reason Pi is so cheap and does so much is mass production.

For PAL or NTSC generation you are better off using a custom chip.

In the past i have worked with video codecs and they are not trivial or cheap to build from scratch.

NardJ:
chips don't have the horsepower to generate HDMI. .

Thet cannot generate PAL/NTSC either.
You will need a video generator for your display.
A bit like the graphics card on a PC.

As I understand changing crystals is a hassle to debug since reprogramming needs the original 16MHz crystal and not something for the beginner. Please tell if I am wrong here!

I think that would only be a problem with the Arduino bootloader/IDE, and probably don't want to use those. I'm not sure if the existing bootloader will work for you, but you will need a different (or heavily modified) compiler/IDE. (Just for example, the Arduino compiler doesn't have functions for keyboard/mouse input, text/graphics display, or file system access.)

What are you going to use for an operating system & compiler? That'll have to be modified to match your particular/unique hardware.

  • cost < $50

Every Arduino project I've built has cost more than that... But I'm including the cost of a case, power supply, switches, connectors, LEDs, and whatever other little electronic parts I've needed.

I think this may be what you need

EDIT

Sorry that is not colour.
Colour VGA shields are available though , if your telly has a VGA input.

Thx for your replies!

For PAL or NTSC generation you are better off using a custom chip.

Any suggestions which don't need many extra components? (A few resistors/diodes is ok.)

Every Arduino project I've built has cost more than that... But I'm including the cost of a case, power supply, switches, connectors, LEDs, and whatever other little electronic parts I've needed.

The $50 is indeed without the case, psu, keyboard, mouse, monitor/tv etc. I am in fact counting on people having a keyboard, phone charger, tv available. Do you think it's still unachievable within this price range?

I'm not sure if the existing bootloader will work for you, but you will need a different (or heavily modified) compiler/IDE.

You are right. As I understand, the bootloader depends on 16MHz crystal to work. This speaks for using a Pi Zero. However I still find the VGA solution by Lucidscience quite attractive.

(Just for example, the Arduino compiler doesn't have functions for keyboard/mouse input, text/graphics display, or file system access.)

I am aware I have to write libraries to make a real keyboard/mouse work and may be limited to a ps2 keyboard. Looking forward to this part :slight_smile:

What are you going to use for an operating system & compiler?

I am not sure if I want a compiler on the Arduino itself. (Note sure how to implement this at the moment.) An interpretive language like TinyBasic is a good starting point (Tiny BASIC | Hackaday) for the OS and internal basis functionality.
Making compiled programs specific for the build is something users can do in the Arduino IDE itself, if I provide a framework specific for the build.

NardJ:
Thx for your replies!

Any suggestions which don't need many extra components? (A few resistors/diodes is ok.)

The generation of a PAL/NTSC video signal requires a specific relationship between the phase of the colour sub carrier and the frame/line synchronising signals (measured in nanoseconds).

It is hopeless to do that with a micro controller.

Custom chips deal with all that for you if they are still around.

As it seems you have little understanding of this i would suggest that a board similar to the link i gave would be the best solution.

Chip solution possibly.

http://uk.farnell.com/analog-devices/ad723aruz/video-encoder-rgb-ntsc-pal-tssop/dp/2312995

Decoders are much more available encoders it seems these days.

Buying a custom shield i would suggest would be a faster and cheaper option.

NardJ:
This speaks for using a Pi Zero.

If you need a Pi Zero for any part of it why not use if for all of it? Why bother with Atmega chips and a very slow 16MHz?

Or am I missing something?

...R

The generation of a PAL/NTSC video signal requires a specific relationship between the phase of the colour sub carrier and the frame/line synchronising signals (measured in nanoseconds).
It is hopeless to do that with a micro controller.

I don't think I understand what you mean. There are several tutorials available showing how to achieve this . (I agree the resolution and color depth is somewhat lacking.) Is there something I'm missing?

If you need a Pi Zero for any part of it why not use if for all of it? Why bother with Atmega chips and a very slow 16MHz?

Indeed, I couldn't agree more. I'd rather use only ATMega(-like) chips.
On the other hand the low cost of a Pi Zero ($5) is not achievable with several ATMega chips, voltage regulator, resistor etc. So from this perspective, making the system I propose, is pointless.

So why do I want to make this? For fun and learning about the interaction between chips with different functions. The limitations of a (16MHz) 8-bit system can also be more fun to program than a (1GHz) 32/64-bit system.

NardJ:
I don't think I understand what you mean. There are several tutorials available showing how to achieve this . (I agree the resolution and color depth is somewhat lacking.) Is there something I'm missing?

Can you provide links to what you have seen ?

The generation of a PAL/NTSC video signal requires a specific relationship between the phase of the colour sub carrier and the frame/line synchronising signals (measured in nanoseconds).
It is hopeless to do that with a micro controller.

Can you provide links to what you have seen ?

For instance:

Nabe_RMC NTSC

AVR Videoblaster

Both nice projects.

For PAL or NTSC generation you are better off using a custom chip.

If I decide to use custom chips, the setup of Toorum's Quest II looks simple enough, uses a AD725 chip, 14.31818Mhz Crystal and produces 104x80 with 256 colors. (So the resolution is a bit to be desired.)

(resolution > 200x200, colours >15)

The explanation of Nick Gammon for VGA shows that with a standard 16MHz clock the max nr. of horizontal pixels for 60Hz VGA is about 160. As said before for CVBS using the AD725 chip (and 14.31818MHz) we have a max of 104 horizontal pixels. However NIck Gammon shows the number of pixels depends on the refresh rate of the video mode. I am wondering if there are refresh rates far below 60Hz... have searched, cannot find them.

So options I see are:

  • Solution to buffer writing pixels like a Pi Zero or a chip like the VLSI VS23s010C-L which does this
  • Lowering my specs from 200x200 to below 160x160
  • Higher crystal to drive the ATMega chip

The VLSI VS23s010C-LVLSI VS23s010C-L is (as expensive as the Pi Zero and) very difficult to get. European distributors don't have it in stock.With my limited knowledge, I am not able to find a suitable alternative on the web or on ebay. Suggestions are more than welcome!

EDIT: There is another option and that is the use of an Arduino Due with the DueVGA library. An Arduino Due is not that expensive on ebay (about $13). Advantages this has:

  • same Arduino programming IDE (as opposed to Pi Zero)
  • high res 320x240 in 255 colors
  • VGA and Composite possible
  • easily available
  • feels not like cheating with an overpower board like the Pi Zero which also could emulate the other chips of the 8 bit system.
    SIDENOTE: I examined whether VGA or Composite is more future-proof and found that with tv-monitors above $500 most have composite but no VGA.

The videoblaster uses the 1248, other components you mention are not cheap either.
So there goes your 50 budget.

You seem keen to experiment so do not let me put you off.

NardJ:
. I am wondering if there are refresh rates far below 60Hz... have searched, cannot find them.

There are but the display rapidly becomes objectionable (flickering), monitor would have to be adjusted also.
EDIT
You might also consider the effect on a person with epilepsy also

PAL uses a 50 HZ signal but the generation of colour is more complex, it is possible to get a usable monochrome signal though.