For one of my projects, I would like to use an Arduino Nano (ATmega328 based) to generate a composite (PAL) video signal that outputs 40x24 characters to a display.
I have spent a good number of hours on this so far, but it's proven to be more difficult that I expected and I'm kind of stuck at the moment.
Hopefully someone here can help me get further.
What I have tried / figured out so far:
First thing I tried was using the TVOut library.
It seems easy enough to display text characters, but it won't generate 40x24 characters for one screen.
The library will first generate pixels for the characters and store that in RAM, before rendering all the pixels on screen.
That means with a character set of 8x8 pixels per character, you would need 8 Kb RAM and the Arduino Nano only has 2 Kb.
Even if I used the smallest character set that is included (4x6 pixels per character), it would still require more RAM than available.
My next idea was that I needed more RAM and I found a project that does PAL signal generation from external SRAM (using an 23LVC512).
He is generating 32x24 characters using an 8x8 pixel font.
When I tried to change this to 40x24, it seems that the bits can't be banged out fast enough for the signal to sync properly.
The data bits are going directly from the SRAM serial output to the PAL signal line, but it's still not fast enough to clock 320 bits out before the hsync occurs (using hardware SPI at fastest possible rate).
I'm also having trouble getting the sync times exactly right so the picture doesn't look very stable.
Although, if that is something that can be fixed, then this solution might work if I implement a 5x8 pixel font.
I also looked into this Monitor and Keyboard controller that is completely written in assembly.
Haven't managed to get it to work though and it would require some modification which is beyond my capabilities at this point.
It seems that I have to be able to clock out bits at a faster rate than the Nano will allow me in order to get the correct resolution to fit all character pixels.
The questions I have are:
Has anyone managed to solve this before me? I would love to find something that just works out of the box
Is it even possible to get this to work on an Arduino Nano without using pure assembly?
arduarn:
Maybe something like the VS23S010D is an option?
That looks very interesting!
Any idea if there exists similar chips that are through-hole?
I'm planning to use this in a DIY kit and am trying to avoid surface mount components.
AWOL:
You're going to struggle to generate a PAL signal in software - maybe settle for CCIR?
Not sure if I get this right, but isn't CCIR just PAL without colour?
In that case, that's what I have been working on so far (and yes, it's been a big struggle
DutchMaker:
That looks very interesting!
Any idea if there exists similar chips that are through-hole?
No idea. I just did a search for what I thought should exist and that chip came up. I have a feeling there may not be a massive choice of alternatives, but you can take a look. Surface mount should not be a blocking point either, it's all do-able, but I think you'd have to get the board itself made professionally with those fine traces.
I do have a feeling that the VS23S010D may be difficult to source however. Maybe you could blag a sample from the manufacturer.
BTW, do let us know how this turns out. I'm curious.
You should check out the TellyMate
They get 38x25 and have an excellent write-up. You might get the extra 2 characters with a faster clock, but that might throw off the sync timing...
arduarn:
No idea. I just did a search for what I thought should exist and that chip came up. I have a feeling there may not be a massive choice of alternatives, but you can take a look. Surface mount should not be a blocking point either, it's all do-able, but I think you'd have to get the board itself made professionally with those fine traces.
I do have a feeling that the VS23S010D may be difficult to source however. Maybe you could blag a sample from the manufacturer.
BTW, do let us know how this turns out. I'm curious.
Seems like you can order them per piece on the site of the manufacturer: https://webstore.vlsi.fi/
So it's definitely an option.
Thanks!
westfw:
You should check out the TellyMate
They get 38x25 and have an excellent write-up. You might get the extra 2 characters with a faster clock, but that might throw off the sync timing...
Oh wow, that looks very interesting.
It's basically exactly what I am looking for as I was planning to send serial data to my Arduino that then had to be displayed on screen, so this covers it all.
I'll have a chat with the creator to discuss the possibility of 40x24 characters.
Thanks!