Erratic Behavior With SX-48 Proto Board
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.
SRC
![](/plugins/FileUpload/images/file.png)
4K
Comments
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
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.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"The welfare of the people in particular has always been the alibi of tyrants." ~ Camus
www.iElectronicDesigns.com
·
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.
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
·
Would like to see a Tiny Basic for the SX! Please Post the code when you get it going.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"The welfare of the people in particular has always been the alibi of tyrants." ~ Camus
www.iElectronicDesigns.com
·
Dick·