Shop OBEX P1 Docs P2 Docs Learn Events
trouble with 6.25 crystal? — Parallax Forums

trouble with 6.25 crystal?

ksamksam Posts: 19
edited 2009-08-18 13:36 in Propeller 1
I'm working on a little project trying to make a small video game. I'm using the game Planetary defense from Michael Park:

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

I'm trying out the 6.25 crystal instead of the 5 Mhz one.· I've changed the xinfreq to 6_250_000, but this doesn't work.· It works fine with the other crystal?· Any suggestions?

Comments

  • RaymanRayman Posts: 14,845
    edited 2009-08-18 12:45
    If by "doesn't work", you mean you don't get video out... You may need to tweak the video drivers for the higher clock freq...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
  • Bill HenningBill Henning Posts: 6,445
    edited 2009-08-18 13:36
    Hi,

    Rayman is right - you have to change _xinfreq not only in your top-level object, but in every object it includes.

    Worse, some of the drivers build in hidden assumptions about 5MHz (video drivers are worst at this). Look for lines like:

                            movi    frqa,#(pr / 5) << 3     'set pixel rate                                      
                            movi    ctra,#%00001_101        'enable PLL in ctra (VCO runs at 4x)
    
    



    See that (pr / 5)?

    That assumes 5MHz.

    Replace that with

                            movi    frqa,#((pr*1000) / 6250) << 3     'set pixel rate                                      
                            movi    ctra,#%00001_101        'enable PLL in ctra (VCO runs at 4x)
    
    



    Best,

    Bill
    ksam said...
    I'm working on a little project trying to make a small video game. I'm using the game Planetary defense from Michael Park:[noparse][[/noparse]color=#0000ff]
    http://forums.parallax.com/showthread.php?p=770719

    I'm trying out the 6.25 crystal instead of the 5 Mhz one. I've changed the xinfreq to 6_250_000, but this doesn't work. It works fine with the other crystal? Any suggestions?
    [noparse][[/noparse]/color]
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
    Morpheus & Mem+dual Prop SBC w/ 512KB kit $119.95, 2MB memory IO board kit $89.95, both kits $189.95
    www.mikronauts.com - my site 6.250MHz custom Crystals for running Propellers at 100MHz
    Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller
Sign In or Register to comment.