Go Down

Topic: TVout: NTSC and PAL Composite Video Output. (Read 13 times) previous topic - next topic


pocketscience, could you try running the sketch I've attached to this post and tell me if it syncs? The circuit is similar to TVOut but the sync is on pin 9 and the video is on pin 7. I think my sync code is more correct than TVout, so if it works it might be possible to hack my sync timing into the TVout library.

(The code actually does 4 bit greyscale so if it syncs you can try connecting pins 7,6,5, and 4 through 1k, 2k, 4k and 8k resistors.)

Also sometimes TVout syncs better if you put diodes in series with the resistors. And you may need to experiment with the values of the resistors too.


@stimmer - thanks - will try that this weekend! I did try putting various pots in (1K static plus 20ohm pot, 500 static plus 500 ohm pot) and twiddling that but it really made no difference. Didn't try the diodes though.
@Michael - good to hear!

Karma for you both! :)

Is life really that serious...??!


Wow, frustrating evening! Tried stimmer's code - no difference, tried 1N4148 diodes - no difference, tried re-working the breadboard - no difference, tried direct jumper connections to composite cable instead of my soldered connector - no difference. Then I realised that removing the sync jumper from pin D9 on my Arduino board made NO DIFFERENCE... huh strange. What if I bang the jumper against D9 on the Atmega328 - bingo!!!! Solid, stable image from TVout demos, and also stimmers ntsc demo (nice pic!)!!

@Michael - I now have zero concerns about the Hackvision working, but thanks for the awesome post-sale, pre-delivery support!! :-)

Thanks guys, you all rock!! On to the next part of the project!

Is life really that serious...??!


Is life really that serious...??!


@mdmetzle, Thanks!

I am looking for a way to get the tvout lib to let one pin go HIGH when there is a white pixel, and another pin go HIGH when there is a black pixel..

it should probably be done close to here, but i don't understand this..:

__asm__ __volatile__ (
   "ADD   r26,r28\n\t"
   "ADC   r27,r29\n\t"
   //save PORTB
   "IN      r16,%[port]\n\t"
   "ANDI   r16,0xFD\n\t"
(the above is from version 3 of the tvout lib, video_gen.ccp).

Go Up