Shop OBEX P1 Docs P2 Docs Learn Events
1-pin black and white TV? — Parallax Forums

1-pin black and white TV?

Dennis FerronDennis Ferron Posts: 480
edited 2007-07-13 16:55 in Propeller 1
With a high enough frequency and a small integrator cap, could the propeller generate black and white NTSC with just one pin? I have friend who was asked about the possibility of animating multiple screens for a mock-up of a 1960's NASA control board, with many monitors. I told him the simplest thing to do would probably to get five or six $20 black and white TV's, and use the Propeller to control it all. People have said that you cannot really use all 8 of the video hardware that comes on the cogs due to a lack of pins. With 1-pin black and white output, you really could get use of all of the video on all of the cogs (8 monitors). (I realize there are four groups of four, but you can also mask out bits and use the lowest bit for four and the second lowest for the others.)

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-07-13 05:29
    You can easily use 7 out of 8 of the cogs for video at 3 out of 4 pins per cog. The 4th pin of each group of 4 could be used for serial I/O or a keyboard or for inter-Prop communications. The 40 x 13 character text buffer would be about 512 bytes per monitor or about 3600 bytes for all 7.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-07-13 05:29
    You would need at least 2 pins because you need a sync level, so you would have black white and 1 grey level.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • deSilvadeSilva Posts: 2,967
    edited 2007-07-13 08:22
    Paul Baker (Parallax) said...
    You would need at least 2 pins because you need a sync level, so you would have black white and 1 grey level.
    Paul, what exactly comes out of PIn1 , 2 and 3? The function of the highest Pin (4) seems to be the only documented one smile.gif
    One could of course make deductions along the value of the resistors...
  • BeanBean Posts: 8,129
    edited 2007-07-13 11:30
    You need at least three different voltage levels.

    Sync, Black, White.

    With two resistors you would also get Gray.

    The third pin (with the highest value resistor) is used to create color.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Teacher: What is the difference between ignorance and apathy ?
    Student: I don't know and I don't care
    Teacher: Correct !
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.hittconsulting.com
    ·
  • ciw1973ciw1973 Posts: 64
    edited 2007-07-13 15:33
    Below is an example of an NTSC signal generated by a PIC using just one pin. I stumbled upon this a while ago and thought it was quite a neat solution.

    There's a brief description of how it works here.

    pongschem.gif

    Post Edited (ciw1973) : 7/13/2007 3:39:36 PM GMT
  • BeanBean Posts: 8,129
    edited 2007-07-13 15:43
    Yes, but they are cheating by using a diode and a transistor [noparse];)[/noparse]

    Clever though...

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Teacher: What is the difference between ignorance and apathy ?
    Student: I don't know and I don't care
    Teacher: Correct !
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.hittconsulting.com
    ·
  • HarleyHarley Posts: 997
    edited 2007-07-13 15:47
    ciw1973,

    You didn't explain that circuit, but my guess is Pic pin 13 would be exercised
    between outputs HI, LO and input (=essentially tri-state), given the diode and
    transistor biasing. Am I close?

    I didn't study the levels, but might be usable at 3.3v drive.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Harley Shanko
    h.a.s. designn
  • ciw1973ciw1973 Posts: 64
    edited 2007-07-13 15:48
    Agreed, but it does achieve the goal of generating an NTSC TV signal using just one pin.
  • BeanBean Posts: 8,129
    edited 2007-07-13 15:49
    Yes, but the propeller video hardware does not have the ability to change the direction of a pin (input/output) for black/white. So it wouldn't work for the propeller anyway.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Teacher: What is the difference between ignorance and apathy ?
    Student: I don't know and I don't care
    Teacher: Correct !
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.hittconsulting.com
    ·
  • ciw1973ciw1973 Posts: 64
    edited 2007-07-13 15:50
    Harley:

    It's not my circuit, just one I found a while ago.

    You're spot on with how it works though, and if you follow the link I provided (click the word "here" in my post above) there's a brief description of how it works from the guy who designed it.
  • HarleyHarley Posts: 997
    edited 2007-07-13 15:50
    Bean,

    Are WE cheating using any resistors?

    Yes, would be neat if NO external components were required. (Man, am I lazy?) yeah.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Harley Shanko
    h.a.s. designn
  • ciw1973ciw1973 Posts: 64
    edited 2007-07-13 15:56
    Bean:

    Again, agreed, but the COGs run fast enough for you to comfortably create the signal in code. In fact, I'd bet you could manage a couple of simultaneous TV outputs from a single COG using this circuit and some fiddly timing sensitive coding.

    Now that'd be fun - 16 TVs running from a single PropChip!
  • Mike GreenMike Green Posts: 23,101
    edited 2007-07-13 15:57
    Bean,
    This scheme would still work with just a voltage divider to set the black level when the I/O pin is open. The values in the voltage divider would have to be high enough to limit the maximum I/O pin current. A minimum resistor value of 1K would be more than adequate. The sync level would be a logic low output while white would be a logic high output.
  • Dennis FerronDennis Ferron Posts: 480
    edited 2007-07-13 16:03
    ciw1973: Hey that's an idea. If you drive all the TV's in unison, you could have all the frame syncs and horizontal syncs the same, and only send different luminosity to each TV.

    With the video config register in VGA mode you could maybe generate your syncs from two pins and the luminosity for 6 different TV's off of each of the R, G, and B outputs. You could do all 6 TV's from one cog, and each bit of RGB in the bitmap would actually correspond to a black or white pixel on one of the 6 different televisions.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-07-13 16:12
    Since there would just be toggling between input and output high during the actual scan line, this could certainly be done for up to 24 video outputs, perhaps 28. If you used a crystal faster than 5MHz, you could use the hub cycle time to be about the same as the pixel time for the NTSC signal so the following would work:
    '         Set up the output pins for white level,
    '         but leave in input mode for black level
              MOV        DIRA,#0
              MOV        OUTA,videoOut
    :loop   RDLONG  DIRA,counter   ' Hub timing sets pixel rate
              ADD        counter,#1
              DJNZ       pixelCnt,#:loop
    '         At this point, you'd output a horizontal sync pulse
    '         and get ready for the next scan line
    
    
  • BeanBean Posts: 8,129
    edited 2007-07-13 16:14
    Dennis, that would probably work. But you'd only need one pin to generate the sync (plus 1 diode per output to keep the video feeds from conflicting).
    Then you could generate 7 tv outputs with the video hardware in VGA mode.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Teacher: What is the difference between ignorance and apathy ?
    Student: I don't know and I don't care
    Teacher: Correct !
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.hittconsulting.com
    ·
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-07-13 16:55
    Dennis,

    Based on my own experience with the PropCAM grayscale output, I think you can do what you want -- with one pin and no extra semiconductors. To get grayscale, I use a counter's DUTY mode, which gets applied to (i.e. internally ORed with) one of the video output pins. What you need is a voltage divider that divides 3.3V down to 1V with an overall 75-ohm impedance (i.e. R1||R2 = 75 ohms). Between the tap (video output) and ground, install a 220pF ceramic cap. (Since there's no color, you might get by with a higher value than this.) For black-and-white (no grayscale) you will use the DUTY mode to set your backporch level, and it will be on all the time, except during syncs, so you have to bit-bang the DUTY for those. Within the displayed portion of a line, you can then use the video circuitry to output a 1 for light, and a 0 for dark. The ones will get ORed with the DUTY output, thus masking it, so the output will be 1V. When a 0 is output, the DUTY level takes over, and the output will be at the blanking (backporch) level. Don't worry about the difference between "black" and "blacker-than-black"; the TV monitor won't care.

    If you want grayscale, you'll have to bit-bang it, instead of using the Propeller's video circuitry. But you should still be able to get resolution that's limited only by the memory available for the image.

    Good luck!
    -Phil
Sign In or Register to comment.