I think this issue is with the PIN 12 YTRAP... But I'm not sure..
I think this issue is with the PIN 12 YTRAP... But I'm not sure..
I don't think it will be the YTRAP because there shouldn't be much 3.5MHz in the colour bar's luma anyway. I'd give it a try just leaving pin 12 open. All the long leads around the AD725 won't help much.
I removed the inductance and the ceramic capacitor... It doesn't change anything. Same problem.
Your MCU should be powerful enough to do NTSC output directly; this is PAL, but a similar idea:
http://www.linusakesson.net/scene/phasor/
I suppose you could try one colour at a time, just disconnecting and grounding the other inputs, the link I posted shows what the separate shapes of the RGB signals should be.
Sorry, but trying to do this on a breadboard is simply utopic. Try a stripboard with short interconnects.
Why are you using:
#01ff00 instead of #00ff00?
#fb0102 instead of #ff0000?
#0301ff instead of #0000ff?
I agree it shouldn't make much difference in result, but if you're going to call them pure colors use the pure input values. And if those colors suddenly work better, you will have discovered a mixing problem!
I have to repeat myself:Sorry, but trying to do this on a breadboard is simply utopic. Try a stripboard with short interconnects.
Got it?
Not sure if anyone has already suggested it, but everyone seems to be stuck on the hardware side of things...
Are you certain this is not a software issue there? The colors are one thing, but the shifted lines towards the bottom of the screen suggest there is likely a software issue.
Dear friends.
I repost here what I posted on the Arduino forum...
https://forum.arduino.cc/index.php?topic=637290.0
Why I do that? Because this problem I have dosen't looks to be a pure Arduino problem but an electronics problem with the RGB->COMPOSITE video converter AD725...
So... Here we go!
I'm trying to make an NTSC color pattern generator based on Arduino UNO full stock with stock 16mhz oscilator.
The TVout Library looks great and works with interrupts, but the problem I tried to understant it, there is a lot of assembler code, and I don't understand nothing at the assembler code... It is very difficult for me to mod the library to get a colour output... due to my lack of assembler language...
So I made a RGB + Sincro generator with a "raw method" and more easy to understand code based on this thread:
https://forum.arduino.cc/index.php?topic=43085.0
I modded it a little bit to have R, G and B channels.
With some modifications to have an RGB output here is the code:
You can download the code in the attachment.
If you want this code run, please upload and compile with Arduino IDE 1.0.6. With the more recents one like 1.8, it will not work, another problem I have to FIX later... This should be due to the NOP; asm instruction... I don't know...
I use this diagram to connect the AD725:
The problem are the colours.
Instead of THIS,
I have this:
The problem is not with pure R pur G or pure B, the problem is when I mix for example blue and red, as you can see instead of pink, I have a full-red...
The red looks pale red.
The yellow looks pale green.
The green doesn't look... green but light blue...
The white is not white but like gray...
I loaded the game toorum quest 2.
http://petenpaja.blogspot.com/2013/11/toorums-quest-ii-retro-video-game.html
I have the same problems...
So I think this is an issue with the AD725 RGB to PAL/NTSC encoder... I tried to change the resistors from the arduino to the AD725... No results.
I think this issue is with the PIN 12 YTRAP... But I'm not sure...
If someone had experience with the AD725 chip it can be great for hepling me there!
Best regards...
However, this still means a proper 525i or 263p reference source lines. Also, the COMPOSITE sync you are sending out requires all the proper stabilization pulses as they encoder may use these to know when to stop placing color bursts when the vertical sync is about to begin.
How about a normal scope shot of the NTSC output waveform.
Also, what happens when you adjust the 'TINT' control on your monitor?
Random thoughts...
For the RGB inputs the AD725 data sheet says 0mV to 714mV AC-Coupled, and the 470R->75R dividers should give about 680mVpp, so close enough. I think more than enough has been tried to eliminate the RGB input levels. From the data sheet I don't think 0 to 5V DC would harm the RGB inputs, but I don't think there's any point either.
The RGB inputs clamp the AC coupled side to 0mV themselves. Is the HSYSNC connected? Just in case.
I don't agree that this can't be made to work on a breadboard even on a carrier, because the 3.5MHz colour and it's critical phase are all done inside the AD725 from the 14MHz clock, By the time the 3.5MHz appears in the composite video output it's critical timing has already been done, - in theory.
The video output wire's GND should be very close to the AD725's GND, even if it is just 2 bits wire. If the video output ground is just connected to a breadboard ground somewhere the phase of the 3.5MHz colour could well be off a bit, due to the breadboard GND noise and inductance.
Is there any power decoupling on the AD725's carrier? 100n would do.
Around the AD725 and carrier I'd definitely be using short lengths of single core instead of the long breadboard wires.
A scope would be useful.