Shop OBEX P1 Docs P2 Docs Learn Events
single pin video generated output — Parallax Forums

single pin video generated output

Peter VerkaikPeter Verkaik Posts: 3,956
edited 2008-06-16 23:01 in General Discussion
I did some calculations on the following schematic to see if
video level signals could be generated with one pin.

+5V o--[noparse][[/noparse] R1 ]----+
pin o--[noparse][[/noparse] R2 ]----+· level
·················|
···············[noparse]/noparse] 75[color=white]·[/color
················ |
················ V

pin·· signal·· level
·L··· sync·····Vs
·I··· black··· Vb = 0.3 + Vs
·H··· white··· Vw = 1.0 + Vs

white:
···· 75

* 5 = 1.0 + Vs
75 + (R1//R2)

black:
··75
* 5 = 0.3 + Vs
75 + R1

sync:
·· (75//R2)
* 5 = Vs
(75//R2) + R1

If you work this out, the results are (exactly !):
R1 = 175 ohm
R2 = 210 ohm
Vs = 1.2V
Vb = 1.5V
Vw = 2.2V

Has anyone tried this, and does the 1.2V dc offset bother the video input
(I believe not because these are mostly ac coupled).

regards peter

Comments

  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2008-06-16 11:52
    Bean creates NTSC video with 2 pins for his Mere Mortal Video Game Driver (MMVGD) (and probably the SX Video Module too).
     HARDWARE CONNECTIONS:
    '----------------------
    '          1K
    ' RA.0----\/\/\----+
    '          470     |
    ' RC.7----\/\/\----+---------------------------------------- Video Out
    '
    '          1K
    ' GND ----\/\/\----+
    '          22K     |
    ' RA.1----\/\/\--------------------------------------------- Audio Out
    '
    ' RB.0 --- JStk1Up Button --- GND
    ' RB.1 --- JStk1Down Button --- GND
    ' RB.2 --- JStk1Left Button --- GND
    ' RB.3 --- JStk1Right Button --- GND
    ' RA.2 --- JStk1Button Button --- GND
    '
    ' RB.4 --- JStk2Up Button --- GND
    ' RB.5 --- JStk2Down Button --- GND
    ' RB.6 --- JStk2Left Button --- GND
    ' RB.7 --- JStk2Right Button --- GND
    ' RA.3 --- JStk2Button Button --- GND
     
     
    ' -------------------------------------------
    ' Video generation details
    ' -------------------------------------------
    ' NTSC:
    '   Each line = 1/15734 seconds
    '   3 lines of vsync
    '   21 lines of blank lines (wait for retrace)
    '   238 lines of visable video
    

    http://forums.parallax.com/showthread.php?p=598779

    www.sxvm.com
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-06-16 14:01
    I know that. I integrated this two-pin setup in some of
    my own boards. Just wandering if someone did a one-pin
    setup, as the timing code needs to be altered quite a bit due
    to the fact that changing pin direction takes a lot more
    cycles than changing pin output level.

    regards peter
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-06-16 16:45
    Peter,

    That should work. But I'd be more inclined to run it through a transistor driver. The reason is that, by relying on the pin tri-stating, your source impedance is constantly changing. This could have an impact with long cable runs. With a transistor driver, you can get a 75-ohm source impedance, without having to fiddle with the resistor divider values. Higher-valued divider resistors also put less stress on the microcontroller pin, and the transistor isolates it somewhat from transmission line issues.

    Attached is a sample schematic. It's an emitter follower whose source impedance is determined largely by the collector resistor. This circuit will output a 1V p-p signal regardless of whether the monitor it's feeding is properly terminated. Due to the interposed B-E junction, the sync tips will be at 0.6V instead of 1.2V.

    -Phil
    327 x 287 - 2K
  • James NewtonJames Newton Posts: 329
    edited 2008-06-16 16:46
    Peter, that is really interesting, but I'm a little confused...

    What does the [noparse][[/noparse] 75 ] represent?



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ---
    James Newton, Host of SXList.com
    james at sxlist,com 1-619-652-0593 fax:1-208-279-8767
    SX FAQ / Code / Tutorials / Documentation:
    http://www.sxlist.com Pick faster!



  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-06-16 16:53
    James...should be ohms...I have noticed some people use R when the value is in ohms rather than not having any symbol.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-06-16 17:22
    James, it is indeed 75 ohms.

    Phil, thanks for the driver schematic. It made me realise that
    if a video input is indeed ac coupled, without the driver I
    possibly would never get a stable·1.2V dc offset because the cap would
    charge/discharge dependant on video frame content. The driver
    does provide a stable 1.2V sync tip level at the transistor base.
    (I have seen video inputs where the cap is the first component blocking all dc current,
    although most video inputs·have a 75ohm resistor to gnd before the cap that allows dc current
    to flow).

    Still want to know if someone has done such a one-pin setup
    and has some working code in either asm or sxb.

    regards peter
    ·
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-06-16 19:23
    Peter,

    Most devices that receive video signals have a DC-restorer (clamp) after their AC coupling stage, which firmly plants the sync tips at a known level. This is necessary for the very reason you mention: that the average DC level depends on the video content — but regardless of how its driven. The main benefit from the driver is presenting a constant impedance to the transmission line.

    -Phil
  • BeanBean Posts: 8,129
    edited 2008-06-16 23:01
    I think it would be doable at 50Mhz.
    20MHz if you could make a circuit that generated sync when the pin was an input. I don't know how you would do that without a negative voltage though.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Did you know that 111,111,111 multiplied by 111,111,111 equals 12345678987654321 ?

    www.iElectronicDesigns.com

    ·
Sign In or Register to comment.