Assembly program does not run at power on
I'm just starting to learn assembly and I'm puzzled by an apparent difference between SX/B and assembly.
I'm using the PDB ans SX-Key.
With a SX/B program, after downloading/running, it stays in the SX chip's memory and will start running if the power is turned off and then turned back on.
When I run the attached program, it runs as expected until the power is turned off and then turned on. After the power is turned back on, it does not run.
Is this normal?
How would I get it to start running at power-on?
The program is a simple program that increments RB.
Thanks in advance!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
This post is a work of art. Variations in spelling and grammar are intentional, artistic endeavors that add value to all of mankind.
I'm using the PDB ans SX-Key.
With a SX/B program, after downloading/running, it stays in the SX chip's memory and will start running if the power is turned off and then turned back on.
When I run the attached program, it runs as expected until the power is turned off and then turned on. After the power is turned back on, it does not run.
Is this normal?
How would I get it to start running at power-on?
The program is a simple program that increments RB.
Thanks in advance!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
This post is a work of art. Variations in spelling and grammar are intentional, artistic endeavors that add value to all of mankind.
Comments
Do you still have the SX-Key plug in when you reboot it? You must remove the SX-Key if you want to run on it own from a reboot.
Mark
I tried unplugging the SX-Key and it still will not run at power on. Any other ideas?
SX/B programs will run at power-on with or without the SX-Key being plugged in.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
This post is a work of art. Variations in spelling and grammar are intentional, artistic endeavors that add value to all of mankind.
I don't have a 4 MHz XTAL, but I just went to the device selection (under the run header) and changed the Oscillator to "4 MHz internal" and loaded the program; that seems to fix the problem, so your thought about the resonator appears to be correct.
I have all RB pins connected to LEDs; it runs way to fast to see the individual LEDs blink on/off, but since the program loops continually, all LEDs appear on.
Thanks again, I appreciate your suggestions
B-
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
This post is a work of art. Variations in spelling and grammar are intentional, artistic endeavors that add value to all of mankind.
The run->device menus will do the same thing (change the fuse bits), but here is what you would do to run your .src program without the Key and without an external clock:
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php
Post Edited (Zoot) : 1/25/2009 10:59:40 PM GMT
As always I'm thankful for the help!
B-
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
This post is a work of art. Variations in spelling and grammar are intentional, artistic endeavors that add value to all of mankind.