Shop OBEX P1 Docs P2 Docs Learn Events
TV_Text Demo with external resonator — Parallax Forums

TV_Text Demo with external resonator

tatatomtatatom Posts: 16
edited 2007-03-12 17:57 in Propeller 1
Hi

Firstly greetings to all. I just signed up after getting my Prop working on a home-made board. Looks like lots of fun learning ahead.

So my board has a 20 mhz external resonator hooked up and does work with the simple blink LED program. So feeling supremely confident I jumped right to the TV_Demo program , wired up the video out and ... nothing. I think I need to change the
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
at the top of the program to accommodate the 20 mhx resonator. If this is true how do I determine the correct value? I tried various settings but nothing made any difference. If I need to do something else , then I'd appreciate a nudge in the correct direction.

Thanks

Tom

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-03-06 23:09
    Tom,
    You have to use just XTAL2. This is for an external crystal/resonator in the range 8 - 32MHz without using the PLL (which won't work at 20MHz). _xinfreq is 20_000_000. The minimum system clock for NTSC TV is about 15MHz so you're ok there.
  • tatatomtatatom Posts: 16
    edited 2007-03-07 13:09
    Thanks for the quick reply Mike

    Still having problems though. The TV display is totally garbled and no amount of adjusting the TV will stabilize it. have tried several different TVs with the same results. I put in a new resonator and no difference either. Also tried a different Prop chip.
    All connections checked with Digital meter.
    The resistance at P12 is 1.095K as oppose to the 1.1K called for
    The resistance at P13 is 557 as oppose to the 560 called for
    The resistance at P12 is 276 as oppose to the 270 called for
    Do I need trim pots or something? Is there some adjustment somewhere that I could do and as a last resort is it possible to do this without an external resonator?

    The first lines of the TV_Text_Demo have been changed to:
    CON

    _clkmode = xtal2
    _xinfreq = 20_000_000


    thanks again

    Tom
  • Mike GreenMike Green Posts: 23,101
    edited 2007-03-07 14:04
    Don't sweat the resistors. They just need to be in an approximately 1:2 ratio (1.1K:560, 560:270). I suspect the problem really is your clock. Either it's not stable or the TV stuff just won't work well at 20MHz. Try modifying the TV parameters in tv_text.spin to disable color (see the comments at the end of TV.spin).
  • tatatomtatatom Posts: 16
    edited 2007-03-07 16:08
    Seems like the simplest solution would be to buy some 5 mhz crystals!
    I'm going to order some today and move on to discovering more about the prop chip in the meantime.
    Thanks for the help.

    Tom
  • Stan671Stan671 Posts: 103
    edited 2007-03-07 16:35
    Yea, Tom.· I would say that for the cost of a 5 MHz crystal, you can run a much more stable timebase and your Prop at 4 times the speed you are·running it·now.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Stan Dobrowski
  • Don DDon D Posts: 27
    edited 2007-03-07 21:22
    mike green said...
    You have to use just XTAL2. This is for an external crystal/resonator in the range 8 - 32MHz without using the PLL (which won't work at 20MHz).

    Mike, I am·missing something...

    1) Can you not use 20Mhz·XTAL2 + PLL4X per table 4-4 'Valid clock Mode Expressions'· for 80MHz operation? I also don't see anything in the TV object preventing·the use of this mode... Post Edit: Oops, just found the PLL·XIN range of 4-8Mhz (Table 1-7 PLLENA)

    2) Could this problem be that the 20MHz resonator is not actually close enough to 20MHz and feeding·the·actual frequency into the code may stabilize the display?

    Post Edited (Don D) : 3/7/2007 9:29:57 PM GMT
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-03-07 21:45
    The issue is that the object has a minimum operational speed it can work at, when using a 20MHz clock source you cannot use the PLL to wind up the frequency, and 20MHz is too slow for the tv objects to run (it think the minimum is around 60MHz).

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

    Parallax, Inc.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-03-07 21:59
    Paul,
    The comments in the source for TV.spin say that the minimum clock is 4 x color burst frequency = about 15MHz for NTSC, 18MHz for PAL.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-03-07 22:18
    Ok I was off by a factor of 4, sorry. The color generation is very sensitive to frequency, I have used a function generator as a clock source and a 1-2% variation is enough to mess up the display. 3-4% and nothing appears.

    If you have an oscilloscope or frequency counter, you can write some code using the couter to output the frequency the propeller is operating at and meaure it's actual value.

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

    Parallax, Inc.

    Post Edited (Paul Baker (Parallax)) : 3/7/2007 10:25:56 PM GMT
  • tatatomtatatom Posts: 16
    edited 2007-03-09 16:09
    I tried with a 4mhz external resonator an:
    _clkmode = xtal1 + pll16x
    _xinfreq = 4_000_000
    and it worked perfectly.
    I will leave it to those who know more than I do to draw whatever conclusions.
    I'm just happy to see it work this way until my 5mhz crystals arrive.

    Tom
  • Mike GreenMike Green Posts: 23,101
    edited 2007-03-09 16:23
    The PLL adds some stability and the x16 multiplication ups the system clock to 64MHz which helps the TV driver code get "the job done" in a timely way. Maybe the minimum clock of about 15MHz is just a bit too optimistic. I'm glad its working.
  • DogPDogP Posts: 168
    edited 2007-03-12 17:57
    Not sure if it's really related to this discussion or not, but when I used a 5MHz "series" crystal, the video worked, but the colors were all rainbow multicolored. I popped in a 20pf crystal and everything worked great.

    Pat
Sign In or Register to comment.