Shop OBEX P1 Docs P2 Docs Learn Events
SX crash — Parallax Forums

SX crash

AmitAmit Posts: 27
edited 2006-07-17 21:48 in General Discussion
I'm running an SX48 and everytime I try to run code with the 50MHz resonator everything crashes after about a minute. The code will run fine if I generate the clock signal from the SX key and have the resonator disconnected. I've checked the resonator circuit many times but I think that's hooked up right. When I try a new resonator it will crash after a different amount of time. I'm pretty sure the resonator itself is fine because it works fine on a development board. The code I'm running is simple. I've included a schematic of my resonator cuicuit and the code i'm running for reference. Has anyone experienced anything like this before? Any help would be greatly appreciated.







DEVICE SX48, OSCHS3
IRC_CAL IRC_FAST
FREQ 50_000_000


'
' IO Pins
'

Rx var RC.7
Cts var RC.6
Tx var RC.5
Rts var RC.4
GLED var RC.0


'
' Variables
'
DataOut var byte
DataIn var byte

' =========================================================================
PROGRAM Start
' =========================================================================

'
' Program Code
'

Start:
' initialization code here
DataOut = 137

Main:
' main code here
Serout Tx, N57600, Dataout
toggle GLED
pause 100

GOTO Main
500 x 553 - 41K

Comments

  • BeanBean Posts: 8,129
    edited 2006-07-17 20:39
    Try·changing OSCHS3·to·OSCHS2 in the device line.

    Bean

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com

    "Remember, you are unique, just like everyone else." Unknown.


    Post Edited (Bean (Hitt Consulting)) : 7/17/2006 8:56:45 PM GMT
  • AmitAmit Posts: 27
    edited 2006-07-17 21:26
    That worked perfectly. Thanks a lot! I don't really understand why this is the case though. All the examples seem to use OSCHS3 with 50MHz.

    Amit
  • BeanBean Posts: 8,129
    edited 2006-07-17 21:48
    I guess the HS3 setting is driving the resonator too hard.
    HS3 seems to work for the SX28, but for the SX48 you need to use HS2.
    I had the exact same problem as you, that's how I knew what to do.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com

    "Remember, you are unique, just like everyone else." Unknown.
    ·
Sign In or Register to comment.