1

I was thinking about building a video circuit that uses two Arduinos (maybe more) to generate video using NTSC and the AD725. Although, VGA might be nice if possible.

Anyway, the idea is to use one Arduino as the background layer and the other one as the sprite layer (overlay).

Then, instead of masking the sprite data and having more cpu time, I was thinking of running the signals through a mux. So that when drawing background data and no sprites (per scanline) then pipe the signal to the AD725. But when there is a sprite mid-line, then the >0v signal of the sprite Arduino would cause the mux to pipe its contents through to the AD725.

Or, something similar.

I believe many arcade boards from the 80's did this. Many of them had entire "sprite boards" attached and the signals would mix. Each layer would have it's own RAM and not be aware of the other layer.

But to do this, I would have to keep the Arduinos sync'd perfectly.

So that's my question. How I can do this?

Oh, my Arduino of choice in the beginning would be the UNO but I have others (DUE, Teensy3.1, etc.) if that would be a better fit.

Thanks.

2
  • I would discourage using arduino for anything with video. A raspberry Pi comes with a built-on HDMI-out aswell as GPIO pins.
    – aaa
    May 26, 2015 at 11:51
  • Not really interested in using the RPi for this. But thanks anyway.
    – cbmeeks
    May 27, 2015 at 11:48

4 Answers 4

1

Arduinos are great for many things, and I think the idea of synchronizing two or more Arduinos might have several applications. However, if I wanted to generated VGA or NTSC video, I would look at the Parallax Propeller as another option.

Many people use the Parallax Propeller to produce VGA video, keeping its 8 processors working in parallel.

1
  • 1
    I decided on the Propeller. It's almost like it was made for this task. :-)
    – cbmeeks
    May 27, 2015 at 11:49
1

I would take a look at MREtv which seems to promise all that you want to do, with just one arduino. This might not be the answer you're looking for, but getting threads to sync is a pain in the rear end, see this for explanation of why threads are a pain.

Now back on topic, it seems like MRETV might off what you want to do, and it can do some pretty impressive things from what I read in the arduino. You might need to modify the library a bit, but it offers already implemented encoding, so that is a plus.

http://www.instructables.com/id/MRETV-Video-Stereo-Sound-and-much-more-from-a-s/

3
  • I tried to get that MRETV to work. Followed the instructions to the letter and it wouldn't even compile. This is on a fresh install of the Arduino IDE (newest version).
    – cbmeeks
    Mar 26, 2015 at 23:31
  • @cbmeeks Could you give me details of what the IDE spat out when it failed to compile? Are you on windows? What was the actual error, the ide couldn't find a file?
    – HSchmale
    Mar 27, 2015 at 0:08
  • I don't have the exact error in front of me at the moment. But I'm on a Mac and the error was something along the lines of "must define const sound" or something like that.
    – cbmeeks
    Mar 27, 2015 at 14:37
0

You would need to use interrupts on the "sprite arduinos" to get the timing very exact - the "background" arduino would need to send signals sync signals (horizontal and vertical) to the sprite arduinos. The sprite arduinos would then need to keep track of which line it is on, and time exactly how far along the line it is. You will need a circuit to either allow the incoming signal through (I believe the arduino will be too slow to pass it read it, then write it);

alternatively, have multiple (still synchronized) sources, each indicating if they want to be on the screen; then one that takes the "I want to be on the screen" signals, make a decision, and connect the appropriate one (via a transistor).

A basic tutorial on TV out is found at: http://playground.arduino.cc/Main/TVout

0

Just a thought, you could try synchronizing micros() / millis() between Arduinos... [ https://aaka.sh/patel/2013/12/23/synchronizing-micros-millis-arduino/ ]

Over time you could set instructions/commands to execute at certain time intervals on target arduinos using something as simple as a 2 wire serial setup [ http://arduino.cc/en/Tutorial/MasterReader ]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.