Shop OBEX P1 Docs P2 Docs Learn Events
TV Display Basics — Parallax Forums

TV Display Basics

PhilldapillPhilldapill Posts: 1,283
edited 2008-01-03 23:00 in Propeller 1
Hey, I've read the Propeller Cookbook and I love the DIY alternatives to the items that can be purchased commercially. One of these was the TV adapter consisting of 3 resistors and an RCA plug. I want to be able to use my prop to display information on the tv screen for debug purposes and possible a real solution later on. However, I know virtually nothing of how to begin. Is this design of 1.1k, .560k, 270k and an RCA plug the correct way to go? If so, how do I impliment this into software? i.e. how do I tell the software what pins to use? Thanks!

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-01-03 20:14
    The Propeller Tool comes with a TV driver (tv.spin) and both a text (tv_text.spin) and a graphics driver (graphics.spin) for use with it. Each of these comes with one or more demo programs that illustrate their use (tv.spin is used internally by the others).

    When the driver is initialized, you provide the first I/O pin number (always a multiple of 4) of the pins being used. The resistors are used to implement a 3 bit video DAC. The 4th resistor is optional and is used to mix in audio when using broadcast mode.

    Have a look at the demo programs and the text / graphics drivers.
  • LeonLeon Posts: 7,620
    edited 2008-01-03 20:19
    It works OK, but it's a bit tricky getting the correct pins identified in the code. Have a look at TV.spin, there are plenty of comments explaining how to set it up. If you use the same pins as in TV_text you shouldn't have too many problems.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle

    Post Edited (Leon) : 1/3/2008 8:24:29 PM GMT
  • deSilvadeSilva Posts: 2,967
    edited 2008-01-03 20:24
    You can also use my MPE_TEXT_013 which decodes the pins itself and is tuned to a 320x240 display, just to be able getting started in the first place. It already contains its own demo part. You just have to select the crystal and the (lowest) pin.

    Don't get absurd with the resistor values: 220, 470, 1k will do fine!
  • PhilldapillPhilldapill Posts: 1,283
    edited 2008-01-03 20:29
    Guys, thank you so much. I'm very much a beginner with the Prop and microcontrollers in general. This forum is such a GREAT resource. Looking at the timestamps of these posts, I started the topic at 12:06, and 18 minutes later, I have 3 great replies. Thanks!
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-01-03 20:36
    Yes, you really can get your TV display up and running on three resistors and an RCA connection..
    (Don't forget the ground connection.. [noparse]:)[/noparse]

    Use the graphics demo that comes with the Propeller Tool to check your work, IIRC, it should
    already be configured for the same pins as specified by the Cookbook, used on the demoboard as well.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook
    Got an SD card? - PropDOS
    A Living Propeller FAQ - The Propeller Wiki
    (Got the Knowledge? Got a Moment? Add something today!)

  • LeonLeon Posts: 7,620
    edited 2008-01-03 20:57
    I just dug out a PCB of mine which has the circuit and connector on it, and checked that it worked using the (Ch3-Ex11)-Display.spin example. I've got pins 17 (P12), 18 (P13) and 19 (P14) of a DIL Prop connected to a 1k1, 560R and 270R resistor, respectively.

    The pins in TV_terminal.spin are defined as follows:

    · tvparams_pins := (basepin & $38) << 1 | (basepin & 4 == 4) & %0101

    basepin is set in the top level (Ch3-Ex11)-Display.spin file with

    · TV.Start(12)·

    If you wire your board up like that and use·those statements·in your code·it should work.

    If you have a choice with your monitor, use NTSC. You will get a steadier and clearer image as the PAL frequencies are slightly wrong due to the 5 MHz oscillator.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle

    Post Edited (Leon) : 1/3/2008 9:10:16 PM GMT
  • deSilvadeSilva Posts: 2,967
    edited 2008-01-03 21:11
    A rare situation: Leon writes more than one line smile.gif
  • PhilldapillPhilldapill Posts: 1,283
    edited 2008-01-03 23:00
    Thanks again guys for all the input! I got it up and running and made a spiffy little adapter with the ability to expand it for stereo sound! I used a small piece of perfboard, some male headers, and a male RCA cable that I chopped one end off of. It works great and it displays fine! I'll be sure to reply if I have anymore questions. Thanks again!
Sign In or Register to comment.