Shop OBEX P1 Docs P2 Docs Learn Events
Erratic Behavior With SX-48 Proto Board — Parallax Forums

Erratic Behavior With SX-48 Proto Board

Dick WhippleDick Whipple Posts: 6
edited 2008-11-08 13:07 in General Discussion
I've been running code on a Parallax·SX-28 proto board for some time without problems.· I purchased the SX-48 proto board from Parallax and started converting programs.· I made the appropriate changes to the code.· Even with the simplest LED blinker, I ran into erratic behavior.· It would blink a few times then go yaya, blinking erratically or not at all.· Nothing seems repeatable.· The debugger would lock up so it proved useless.· At 50MHz it hardly worked at all; at 4MHz internal it was better behaved.· Removing the SX-Key Tool seemed to help so I moved to a UART program.· At 4 MHz it appeared to work, but at 50 MHz it would print a few lines and go yaya.· Attached is the code for both programs.· If anyone has any ideas, I would appreciate their insight.

Comments

  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-11-01 14:43
    You need to set M properly before using mov !rb,w
    To write the SX special registers:
    mov w,#$1F ;write to TRIS registers
    mov m,w
    Then you can use mov !rb,w

    Also, for the led program,
    insert reti at address 0 (just to be safe)
    and initialize the option register.

    regards peter

    Post Edited (Peter Verkaik) : 11/1/2008 2:50:28 PM GMT
  • Dick WhippleDick Whipple Posts: 6
    edited 2008-11-02 12:34
    Thanks for the suggestion. I made the changes, but without success.· At 50 MHz, it eventually fails.· Without the SX-Key Tool it blinks longer (25 or more times) but still dies.· Strangely, from power up reset it goes longer.· After it fails, a reset won't last as long.· I'm beginning to suspect a hardware issue.· I have a second SX-48 proto board.· Think I will hook an LED up to it and see if I get the same results.· Attached is the modified code.

    By the way, after making changes to the UART code, it behaves pretty much the same way.· Attached is a jpeg of typical results.· It's never repeatable, which makes all this very frustrating.· Again, thanks for your suggestion.
    575 x 385 - 23K
  • BeanBean Posts: 8,129
    edited 2008-11-02 14:17
    Try using OSCHS2 instead of OSCHS3 for 50MHz.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    "The welfare of the people in particular has always been the alibi of tyrants." ~ Camus
    www.iElectronicDesigns.com

    ·
  • Dick WhippleDick Whipple Posts: 6
    edited 2008-11-08 00:20
    Sorry to take so long, but I've been away from the work bench a few days.· I tried the HS2 and a new proto 48 board and results are identical.· Blinks a while the goes in to lala land.· Has anyone used the proto 48 board at 50 MHz?· I'm beginning to wonder.· From my old micro days I would suspect power supply noise, maybe inadequate bypassing.· It seems to run OK at 4MHz internal and at 20Mhz HS2.

    FYI I am the original author of Tiny BASIC - Dr. Dobb's Journal from way back when.· As a "fun" exercise I have Tiny BASIC running on the SX-28 with a UART interface to Hyper Terminal.· I squeezed it into the 2k program memory with 256 bytes to spare for the Tiny BASIC program (not in RAM as originally).· Works fine and lots of fun.· My idea was to move to the SX-48 platform and gain both program and data memory, but·its erratic behavior has stalled the project.· I know this all sounds like an academic exercise, but I figured some people might be interested, even for purely nostalgic reasons.· Anyway, thanks for you help.
  • BeanBean Posts: 8,129
    edited 2008-11-08 01:07
    Dick,
    I love tiny BASIC. Very cool to have it running on the SX.

    Keep trying different things. Try OSCHS1, try a different resonator, different proto board, etc.

    The most common problem is the OSC setting that causes the SX to stop after a short time. I'm not sure if it is because it overheats or if the resonator stops, but usually changing the setting fixes it.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    "The welfare of the people in particular has always been the alibi of tyrants." ~ Camus
    www.iElectronicDesigns.com

    ·
  • Mike CookMike Cook Posts: 829
    edited 2008-11-08 01:24
    I too have has a few issues running at 50 MHz on the SX48 ProtoBoard. If you have not yet tried, put a 1M resistor across the resonator, this usually fixes the 'flaky' behavior that I have had.

    Would like to see a Tiny Basic for the SX! Please Post the code when you get it going.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike
  • william chanwilliam chan Posts: 1,326
    edited 2008-11-08 01:42
    Putting a 1M ohm resistor across 50Mhz resonators also stabilizes things for me.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.fd.com.my
    www.mercedes.com.my
  • BeanBean Posts: 8,129
    edited 2008-11-08 01:43
    Oh yeah I forgot about the resistor across the resonator. Try that too.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    "The welfare of the people in particular has always been the alibi of tyrants." ~ Camus
    www.iElectronicDesigns.com

    ·
  • Dick WhippleDick Whipple Posts: 6
    edited 2008-11-08 13:07
    The 1 Mohm resistor appeared to work like a charm.· Thanks everyone.· Now I can get back to the task at hand, getting SX Tiny BASIC ready to release.· I am documenting and testing, but will be finished soon.· I hope its release will bring some interest and fun back into the software side of·our hobby.· Stay tuned.

    Dick·
Sign In or Register to comment.