Hi all.
Happy New Year!
I was wondering if someone could shed a little light on the PINS command.
I am running a 14M with a few LEDs among other things. I want to be able to control 3 LEDs at the same time and have one LED that gets controlled at different times.
I thought I could use LET PINS=%1110 or some combination of this to control LEDs on outputs 1-3 and then just use HIGH and LOW when needed to control an LED on output 4. However, this didn't work. The LED on output 4 would not stay on when HIGH 4 was issued. So I then ran this test program:
DO
LET PINS = %0100
PAUSE 100
LET PINS = %10000
PAUSE 100
LOOP
What I thought this program should do was the LED on output 2 would blink on and off and the LED on output 4 would come on after the first PAUSE statement then stay on because there was no statement telling output 4 to go LOW.
What this program actually did was alternately blink the 2 LEDs.
So the question is:
Why does output 4 go LOW in the program above?
As always, any input would be appreciated.
Dave E
Happy New Year!
I was wondering if someone could shed a little light on the PINS command.
I am running a 14M with a few LEDs among other things. I want to be able to control 3 LEDs at the same time and have one LED that gets controlled at different times.
I thought I could use LET PINS=%1110 or some combination of this to control LEDs on outputs 1-3 and then just use HIGH and LOW when needed to control an LED on output 4. However, this didn't work. The LED on output 4 would not stay on when HIGH 4 was issued. So I then ran this test program:
DO
LET PINS = %0100
PAUSE 100
LET PINS = %10000
PAUSE 100
LOOP
What I thought this program should do was the LED on output 2 would blink on and off and the LED on output 4 would come on after the first PAUSE statement then stay on because there was no statement telling output 4 to go LOW.
What this program actually did was alternately blink the 2 LEDs.
So the question is:
Why does output 4 go LOW in the program above?
As always, any input would be appreciated.
Dave E