Shop OBEX P1 Docs P2 Docs Learn Events
Prof. Dev. Board to a real PCB — Parallax Forums

Prof. Dev. Board to a real PCB

basicstampedebasicstampede Posts: 214
edited 2008-08-31 01:08 in General Discussion
Hello.··I have a project that I've developed on the professional development board.· The project works using the SX-Key using internal oscillator.·

Say my program is:

DEVICE SX28, OSC4MHZ, TURBO, STACKX, OPTIONX
FREQ· 4_000_000

led PIN RA.0

PROGRAM Start

Start:
· Do
· TOGGLE led
· PAUSE 30
· LOOP

How should I change the DEVICE and FREQ statement if I want the SX to run on external 50 MHz resonator?

Thanks.

Comments

  • ZootZoot Posts: 2,227
    edited 2008-08-30 22:58
    DEVICE SX28, OSCHS1, TURBO, STACKX, OPTIONX
    FREQ 50_000_000

    or

    DEVICE SX28, OSCHS2, TURBO, STACKX, OPTIONX
    FREQ 50_000_000

    And make sure you've got a 10k resistor right across OSC1 and OSC2 at the resonator (outer two pins of the resonator).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
  • basicstampedebasicstampede Posts: 214
    edited 2008-08-31 00:58
    Thanks Zoot.· What is the difference between OSCHS1 and OSCHS2?

    And what happens if I forget the 10K across OSC?
  • ZootZoot Posts: 2,227
    edited 2008-08-31 01:08
    The whole OSCHS1/OSCHS2/OSCHS3 thing seems to be a vague -- I've never gotten a clearer guideline than "use whichever one starts up your resonator". If you check the SX datasheet, all are rated for a pretty wide frequency range. My understanding is that the lower the setting that works the better, as each higher setting uses more current. Others may chime in with more accurate explanations. In my own (home-brew) boards generally OSCHS2 is solid for 50mhz and OSCHS1 is solid for 20mhz.

    Again, if you check the datasheet, you will find that caps and a parallel resistor are *required* for proper resonator startup (and values are given for different resonator/freq. combinations). The DIP resonators include the capacitors, but not the resistor. Again, I've generally seen (and Guenther Daubach and JonnyMac have concurred) that while some resonators will startup fine without the resistor, sometimes they won't. But they always will with the resistor. Jon usually seems to use 10k for both his 20mhz and 50mhz projects, though the spec shows slightly different "official" required values. I forget what the 4mhz value is (but my 4mhz projects have all used the internal RC clock).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
Sign In or Register to comment.