Pages: 1 2 3 [4]   Go Down
Author Topic: Generating Composite Video  (Read 13933 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 40
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Its much more precise using ASM or C but you can generate a valid video signal using arduino. The PAL standard for example allows +-0.3 microseconds for its timing pulses. By using some asm nops you can tune your code to work ok. The main problem people seem to be having is they aren't generating proper signals....not using eq pulses and field sync pulses for example in their code. Also it is important to disable the interrupts. If you get hold of the specifications for TV signals, and follow them, you can generate something that will work ok on most modern tv's.

If you don't have an oscilloscope then you can use a timing trick mentioned in this thread http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1174587934/10#10

to measure timing precisely. I'm gonna get hold of a DSO in a few weeks and I'll write a better video gen example then.
Logged

Ponferrada, León (Spain)
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Its much more precise using ASM or C but you can generate a valid video signal using arduino.

Yes. I agree with you but when I tried Processing transient pulses appeared and they corrupted my tv signal. See this picture in which I show you the transient pulses (in a red circle) due to slowly digitalWrite() calls, the signal timing using delayMicroseconds() is very bad also.



I don't know yet AVR assembly so I decided to use C

Regads,
Javi
« Last Edit: July 23, 2007, 10:31:46 pm by javg » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 40
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I got the same signal when I first tried it. The solution is don't use digitalwrite, you can only change one pin at a time using that function(so it takes some time to change once and then again so you get step). Just output directly to the port

e.g portb=00000011;

instead of calling digitalwrite() twice. Once I did that I got a clean signal without the steps as shown in your oscilloscope. Also make sure interrupts are disabled. Cheers. Maybe that will help.
Logged

Ponferrada, León (Spain)
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Just output directly to the port
e.g portb=00000011;
instead of calling digitalwrite() twice.

Good idea!
With this trick, now, there is not a thin white border in the gray bars caused for micro-transient pulses.
Thanks.
Logged

Pages: 1 2 3 [4]   Go Up
Jump to: