Shop OBEX P1 Docs P2 Docs Learn Events
TV Term Setup ? - Page 2 — Parallax Forums

TV Term Setup ?

2»

Comments

  • squidxsquidx Posts: 33
    edited 2007-01-17 17:07
    Oops, Mike, you're right. I had to add the (12) into the original code to make it work, but I pasted it into the wrong place. it should be just PUB start, and the (12) goes into VideoDisplay.start(12). Good proofreading!

    Here it is in a version I just tried, which works:

    ' UPDATE (Includes VideoDisplay.start(12) to indicate pin 12 etc. ouput 
    ' 
    ' EXAMPLE04 
    ' 
    ' DISPLAYS TEXT ON A VIDEO MONITOR 
    '***************************************************************************** 
    'IMPORTANT: This example requires an understanding of examples 01, 02, and 03. 
    '***************************************************************************** 
    'DIFFICULTY LEVEL: Easy 
    '***************************************************************************** 
    'CORRECT OUTPUT: A text string and an incrementing decimal number will 
    ' be displayed five times. 
    'Submitted by Dave Scanlan, March 15, 2006 
    'File: Example04_VideoOutput.spin 
    '***************************************************************************** 
    ' 
    CON 
    _clkmode = xtal1 + pll16x 
    _xinfreq = 5_000_000 
    NewLine = 13 
    ClearScreen = 0 
    ' 
    OBJ 
    VideoDisplay: "TV_Terminal" 
    ' 
    PUB Start 
    DisplayTextOnMonitor 
    ' 
    PRI DisplayTextOnMonitor | Count 
    VideoDisplay.start(12) 
    SetScreenToWhiteOnDarkBlue 
    ' 
    Repeat Count From 1 To 5 
    WaitCnt(40_000_000 + Cnt) 
    VideoDisplay.str(string("THE COUNT IS: ")) 
    VideoDisplay.dec(Count) 
    VideoDisplay.out(NewLine) 
    WaitCnt(40_000_000 + Cnt) 
    ' 
    'VideoDisplay.out(ClearScreen) 
    ' 
    PRI SetScreenToWhiteOnDarkBlue 
    VideoDisplay.out(3) 
    VideoDisplay.out(5) 
    ' 
    'INDENTION IS IMPORTANT IN SPIN 
    'Be sure to use the latest version of Tv_Terminal
    
  • Mike GreenMike Green Posts: 23,101
    edited 2007-01-17 17:29
    What you've posted should work with the right indenting. It's really impossible to tell without the indenting visible. Include the code as an attachment rather than in-line in your message. That's usually better when it's more than a few lines. You can also use the "code tags" where you put "code" in square brackets at the beginning and "/code" in square brackets at the end.
  • squidxsquidx Posts: 33
    edited 2007-01-17 17:38
    Sorry about that -- posting it removed the indents, even though I used the code (#) button - maybe because I did it after the fact. In this case, only the stuff in the repeat loop needs to be indented.

    However, my problem really isn't the code anyway, in the sense that the output "seems" correct - all of the colors, text, etc are correct, but the video keeps flipping back and forth from this "reflected" mode. I'm thinking maybe something's wrong with the monitor, but it does seem to have something to do with the other output pins as well. Maybe I need to shield the RCA jack on the board. I'll get some tinfoil...

    Thanks for any other thoughts you might have.

    Alex
  • Mike GreenMike Green Posts: 23,101
    edited 2007-01-17 18:15
    I have a Demo Board with the 2.5" display that Parallax sells. I use it most of the time and it's got a nice crisp display that doesn't flicker. I can't imagine why you need to shield the RCA jack. Maybe your cable is bad? I have a Zip-Linq little retractable cable with a stereo 1/8" phone plug on one end and two RCA plugs on the other end. Radio Shack sells similar cables without the retracting bit. If switching cables doesn't fix it, maybe there's a bad solder connection on the Demo Board. Normally, it shouldn't make any difference whether the accessible pins (0-7) are connected or not (for the TV output).
  • squidxsquidx Posts: 33
    edited 2007-01-17 19:14
    OK, good info. Thanks.
  • rokickirokicki Posts: 1,000
    edited 2007-01-17 19:39
    Yeah, I have used my demo board with many different displays (the 2.5" LCD that Parallax sells, a much nicer "portable" video screen intended for
    some sort of game console, and several different TVs) with no problems. Are you sure your video screen is good? Does it work with other video
    sources, like a VCR or Tivo? To me this really really sounds like a bad monitor. Also, try just hooking it up to your TV.
Sign In or Register to comment.