Beginners Question...Major Beginner
DEVICE SX28, OSCHS3, TURBO, STACKX, OPTIONX FREQ 50_000_000 PROGRAM Start Start: \Mov !RB,#0 \Mov RB,#1 Main: ASM Mov W,#$FF XOR RB,W EndASM Pause 25 Goto Main
·As you can see I am a major beginner.. I want to know why this program runs when I'm in Debug and does not in normal mode.
What simple thing am I missing.
·
Comments
What is "normal" mode ?
Is that with the SX-Key connected ? Or trying to run from a resonator ?
If from a resonator, try OSCHS2, and/or add BOR42 to the device line.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
There are only two guaranteed ways to become weathy.
Spend less than you make.
Make more than you spend.
·
See if that works. If it does, the problem is the age-old "Read-Modify-Write" issue.
Or better yet, put the "PAUSE 25" at the front of the loop, just after the "Main:" label.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
There are only two guaranteed ways to become weathy.
Spend less than you make.
Make more than you spend.
·
If I change to This....
DEVICE SX28, OSC4MHZ, TURBO, STACKX, OPTIONX,BOR42
FREQ 4_000_000
It seems to work
Do the LEDs say dark ? Are both lit ? What happens ?
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
Don't mistake experience for intelligence. And vis-vera.
·
Have you tried a different SX28 chip ?
What value resistor do you have on your LEDs ?
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
Don't mistake experience for intelligence. And vis-vera.
·
I played around with the Device Screen and it didn't change a thing for me.
You still never mentioned what you are using to run the SX chip when the SX-Key is not attached. You say the program works when you have the OSC4MHZ directive, and not when you have the OSCHS3 directive. This implies that you don't have a clock source running when the key is not attached. The OSC4MHZ directive uses the internal oscillator built into the chip itself.
Also, are you clear about the difference between programming a chip using "program" (Ctrl-P) versus "debug" (Ctrl-D) ? This is something that trips up a lot of people when they first use the SX chip and the SX-Key.
Thanks, PeterM
What should I know... I'm just trying to get this small program to run in any instance.
WIth or without the Key.
Anyhelp would be greatly appreciated.
Eric
You shouldn't be having such a painful start with the SX. Call us at Parallax and we'll walk you through the setup and programming of an SX. Ask for myself or Chris Savage 916 624 8333. We'll both be there in about an hour.
Ken Gracey
Parallax, Inc.
I just tried your original program on my SX-Tech board and it seems to work fine.
I have two LEDs connected to ground, then through 220 ohm resistors to pin RB.0 and RB.1
When I run the program, they alternate back and forth.
I just left the SX-Key attached, and did Ctrl-R (RUN).
Then I increased the pause to 100, just to be sure. It works fine.
There must be something odd with your setup or something. Hopefully Ken or Chris can get you going.
Would it be possible to take a picture of your setup ?
Your not using an SX-Blitz are you ?
Also I only have the older SX-Key, I don't know if the new design SX-Key would work differently ?
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
Don't mistake experience for intelligence. And vis-vera.
Post Edited (Bean (Hitt Consulting)) : 10/3/2006 1:46:59 PM GMT
Regarding Peter's question - is there a clock source in the project? Did you plug a 4 MHz resonator into the 3-pin socket near the SX chip? If it works with DEBUG, then the SX-Key is generating the clock source. I think the issue lies with the clock.
Ken Gracey
Parallax, Inc.
I really appoligize for wasting everyones time.
you might also download the SX FAQ document, and refer to the "The SX-Key "Run" Menu Option" section in this document. You can find the FAQ document for download in the "sticky" post at the beginning of this forum section.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
· No problem. I guess Ken gets the credit for figuring out this one. Kudos Ken !
· Don't let this "put you off" from using the SX.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
Don't mistake experience for intelligence. And vis-vera.
·