Pages: [1] 2 3 ... 5   Go Down
Author Topic: TVout Colors  (Read 5476 times)
0 Members and 1 Guest are viewing this topic.
Connecticut
Offline Offline
Edison Member
*
Karma: 16
Posts: 1216
RTFD (Datasheet in our case)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

TVout is great, but two colors at 128x96 gets a bit small after a while. Through other posts, I realize that it is impossible with the arduino's current speed and memory to get full 8-bit color (RGB). But using a DAC such as this one and the helpful breakdown of the NTSC protocol here, would it be possible to get 8-bit B+W (256 colors from white to gray?) At a the resolution mentioned above (128*96), we would need a total of 12288 bytes for the frame buffer, so if my code is not too long, could it work? I may not even need TVout...


baum
Logged

Connecticut
Offline Offline
Edison Member
*
Karma: 16
Posts: 1216
RTFD (Datasheet in our case)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What if I used a smaller resolution, i.e. 30*40? How long is a "pixel time"?
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 238
Posts: 24348
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Assuming a visible line length of about 52us, and 720 pixels to the line, about 72ns, or just a little longer than one instruction cycle at 16MHz.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Minneapolis, MN USA
Offline Offline
Full Member
***
Karma: 2
Posts: 162
Never catch a falling soldering iron...
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The Arduino only has 2K of SRAM, so you don't have nearly enough memory to store 8 bits per pixel.  Remember, the memory usage reported by the IDE when you upload is the flash memory for storing your program, not SRAM.

And as AWOL said, there's only so much time to read the pixel information and write to the DAC.  At 128 pixels horizontal, there are only 5 instruction cycles available to do this work, and the current 1-bit output uses 3 cycles (then does a NOP for 2 cycles).  In other words, there's not enough time to even do 2-bit video.
Logged

Connecticut
Offline Offline
Edison Member
*
Karma: 16
Posts: 1216
RTFD (Datasheet in our case)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So decrease the output resolution and store the frame buffer in Flash.
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 238
Posts: 24348
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Are you planning on using an external encoder for the colour information?
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Connecticut
Offline Offline
Edison Member
*
Karma: 16
Posts: 1216
RTFD (Datasheet in our case)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Probably a DAC of some sort so I needn't deal with the pseudo-DAC resistor network.
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 238
Posts: 24348
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Probably a DAC of some sort
But how are you going to get the phasing of the sub-carrier correct?
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Minneapolis, MN USA
Offline Offline
Full Member
***
Karma: 2
Posts: 162
Never catch a falling soldering iron...
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You can't store the frame buffer in flash memory -- it's read-only.
baum, generating color composite video is just not going to happen on a $3 microcontroller. 
Logged

Connecticut
Offline Offline
Edison Member
*
Karma: 16
Posts: 1216
RTFD (Datasheet in our case)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Alright.

But how did those cheap plug-n-play pacman units do it?
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 238
Posts: 24348
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Custom hardware
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Connecticut
Offline Offline
Edison Member
*
Karma: 16
Posts: 1216
RTFD (Datasheet in our case)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So something like an FPGA would be the way to go if I really wanted to do it?
Logged

Minneapolis, MN USA
Offline Offline
Full Member
***
Karma: 2
Posts: 162
Never catch a falling soldering iron...
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Custom hardware

Yes, hardware designed for the purpose of generating video signals.  The ATmega328 is not designed for that.  It's a simple general purpose microcontroller.
Logged

gedrop
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

there is this:

http://www.linusakesson.net/scene/phasor/index.php
Logged

Connecticut
Offline Offline
Edison Member
*
Karma: 16
Posts: 1216
RTFD (Datasheet in our case)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OMG. That is awesome. Would any one who told me it was impossible like to comment on Linus' phasor?


smiley
Logged

Pages: [1] 2 3 ... 5   Go Up
Jump to: