Page 3 of 4

Re: Composite TV out adapter

PostPosted: Wed Jul 08, 2015 1:04 pm
by BurningSushi
That looks great, awesome to see it on the big screen!

Re: Composite TV out adapter

PostPosted: Mon Jul 13, 2015 4:55 am
by Myndale
Awesomemario128 wrote:How big is the program? Will it fit on this?www.amazon.com/gp/aw/d/B00NLAMS9C/ref=mp_s_a_1_3?qid=1434937386&sr=8-3&pi=AC_SY200_QL40&keywords=arduino+mini&dpPl=1&dpID=51PlS70kajL&ref=plSrch


Yes, comfortably. It's only 4,030 bytes. It would also fit easily on a 168 Pro Mini, you can buy those on Ebay at the moment for less than $2.

Re: Composite TV out adapter

PostPosted: Mon May 01, 2017 11:11 am
by Awot
Hello,
i d like to make this TV OUT Adapter but i not very good at electronics :
So i ask Myndale to confirm some points and i share the conclusion with you here :

- The diagram below is confirmed ok
- The Composite TV out adapter was made with an ARDUINO UNO

This is the text i interpreted for this diagram:

Code: Select all
== Gamebuino Hardware Interface ==
 Arduino Gnd            - Gamebuino ICSP GND
 Arduino Pin D11 (PB3)  - Gamebuino ICSP MOSI
 Arduino Pin D13 (PB5)  - Gamebuino ICSP SCLK
 
 == Video Hardware Interface ==
 Arduino Pin A0 --------> 1k resistor  (sync)  -----------+-------> Composite PAL Out
 Arduino Pin A1 --------> 470 ohm resistor (video) -------^


ICSPportGamebuino2.gif
ICSPportGamebuino2.gif (118.77 KiB) Viewed 11887 times


Please find here the .ino
TVOUT.zip
(5.19 KiB) Downloaded 834 times

this code was made by Myndale

Re: Composite TV out adapter

PostPosted: Fri May 05, 2017 1:30 pm
by Awot
Hello,
I just updated my post below with the code of the Coposite TV out adapter. (thanks to Myndale)
we may have everything here to make the adapter.
i ll try as soon as i receive my Arduino UNO..

Re: Composite TV out adapter

PostPosted: Thu May 18, 2017 3:51 pm
by Awot
Hello,
i have just updated my post below with the TVOUT.zip > .ino and HEX of this TV OUT adapter
++

Re: Composite TV out adapter

PostPosted: Sat May 20, 2017 1:34 pm
by Awot
I have just done it !
working fine :)

i didn't have 470 ohm resistor, so i did this :
2 serial 220 ohm : 220 ohm + 220 ohm = 440 ohm
and 2 100 ohm in parallel = 50 ohm
so 440 + 50 = 490 ohm ( it s not 470 ohm but it s ok i guess.. )

setupSMALL.gif
setupSMALL.gif (69 KiB) Viewed 11789 times


Here is what it s look likes with Thunder Shoot (it has grey scales and frame rate is set at 60 fps)


there is still a sync bug as shown on pic below :
when this bug appears just press the RESET button on Arduino until it s fine.
BUGGY2.gif
BUGGY2.gif (100.59 KiB) Viewed 11789 times

Re: Composite TV out adapter

PostPosted: Mon May 22, 2017 12:45 am
by ry755
This is so cool! Just wondering, is this NTSC or PAL?

Re: Composite TV out adapter

PostPosted: Mon May 22, 2017 1:41 am
by Myndale
ry755 wrote:This is so cool! Just wondering, is this NTSC or PAL?


PAL, there's a lot of good info on using microcontrollers to generate TV signals at Rickard Gunee's web site.

Congrats on a successful build Awot! As far as the resistor values go you can use any values that generate 0.3V (black) to 1.0V (white), if you're a bit off then the levels will be off as well but you won't notice it. The resistors in combination with the TV internal resistance of 75 ohms form a resistor ladder, so the formulas to calculate the voltages they can generate are:

Black voltage = 5 * 75 / (75 + R1)
White voltage = 5 * 75 / (75 + 1/(1/R1 + 1/R2))

So with R1=470 and R2 =1000 you get black=0.35V and white=0.95V...not perfect, but close enough. With the values you used (1000 and 490) the black level would be the same but the white would be 0.93V, so probably not enough to notice any difference. You could have just used a couple of 220 ohm resistors in series to create a white level of 0.98V. This is all academic of course, the tolerance of resistors makes this whole thing a crap-shoot anyway!

The synchronization bug occurs when the Uno's SPI shift register starts reading a byte when the Gamebuino is half-way through shifting one out. The two get out of sync and so the image corrupts. I was reading through the 328p datasheet the other day and spotted this:

The SS pin is useful for packet/byte synchronization to keep the slave bit counter synchronous
with the master clock generator. When the SS pin is driven high, the SPI slave will immediately
reset the send and receive logic, and drop any partially received data in the Shift Register.


So in theory all I should need to do is figure out where in my original code I've detected the end of the screen packet and then drive the SS pin high for a cycle to reset the shift register and keep the adapter in sync with the Gamebuino.

Re: Composite TV out adapter

PostPosted: Tue Jul 11, 2017 12:46 pm
by Awot
Hello,
It would be so great if you could fix the synchronization bug..
(this is too complexe for me to do)

i plan to make a integrated arduino in a box, with composite out, maybe a led ect something clean.
It is nice to be able to show your gamebuino program on a big tv screen.

Re: Composite TV out adapter

PostPosted: Mon Aug 07, 2017 1:20 pm
by Awot
Hello,

juste a little update of the diagram with the idea of :
"just used a couple of 220 ohm resistors in series to create a white level of 0.98V"

CompositeTVOUT_Gamebuino_v3.png
CompositeTVOUT_Gamebuino_v3.png (253.45 KiB) Viewed 11462 times