Random Output on power-up
Posted: Sun Jul 29, 2007 4:33 pm
Hi,
I have been tinkering with the new components. A simple routine I wrote was like this...
Delay 1s
LEDOn 0
WaitForSwitch 1
WriteLEDs = 0
When this is downloaded, I expect that after 1 second, the first LED should light until I press the button.
After programing, after the 1 second, I get a random set of LEDs light up. They all go out when the button is pressed.
If I reset with the reset button, after pressing the button, the routine then behaves correctly, with just 1 LED lit.
If I reset without pressing the button, the randon lights come on after the 1 second.
Switching off, and on again, the random LED pattern re-appears.
examples for each power-up as follows...
00000001 ok
10011111 x
00000011 x
00000001 ok
00000001 ok
10011011 x
10011011 x
00000011 x
10000011 x
10000011 x
00000001 ok
I have been tinkering with the new components. A simple routine I wrote was like this...
Delay 1s
LEDOn 0
WaitForSwitch 1
WriteLEDs = 0
When this is downloaded, I expect that after 1 second, the first LED should light until I press the button.
After programing, after the 1 second, I get a random set of LEDs light up. They all go out when the button is pressed.
If I reset with the reset button, after pressing the button, the routine then behaves correctly, with just 1 LED lit.
If I reset without pressing the button, the randon lights come on after the 1 second.
Switching off, and on again, the random LED pattern re-appears.
examples for each power-up as follows...
00000001 ok
10011111 x
00000011 x
00000001 ok
00000001 ok
10011011 x
10011011 x
00000011 x
10000011 x
10000011 x
00000001 ok