BS2 OEM & DIRL command reverse circuit polarity, does anybody now why?
Sasha
Posts: 35
For BS2 OEM module power supply I use 9v battery (+ on Vin, - to Vss), hookup 7 LED diodes with 470 ohms resistor from pin0 to pin6, LED positive side (and resistors) attach to pins and negative side to Vss.
In Stamp Editor in main routine I put simply command like this:
DIRL = %1111111
PAUSE 500
DIRL = %0000000
PAUSE 500
DIRL = %1111111
Etc…
But nothing happens, this doesn’t work. With command like this:
PIN1 = 1PIN2 = 1PIN3 = 1PIN4 = 1….
Or
DIR1 = 1DIR2 = 1DIR3 = 1DIR4 = 1….·
·ts works fine, but this is not a way to control 7 LEDs.
Then I switches LEDs positive to Vdd and negative sides to Stamp pins enter again simply command:
DIRL = %1111111
PAUSE 500
DIRL = %0000000
PAUSE 500
DIRL = %1111111
LEDs start blinking. What happens here?
I read from manual that Vdd is +5v input for Stamp supply. In this case pins are negative part of the circuit and where to put resistors if this situation is normal?
Please help me to resolve this!!
In Stamp Editor in main routine I put simply command like this:
DIRL = %1111111
PAUSE 500
DIRL = %0000000
PAUSE 500
DIRL = %1111111
Etc…
But nothing happens, this doesn’t work. With command like this:
PIN1 = 1PIN2 = 1PIN3 = 1PIN4 = 1….
Or
DIR1 = 1DIR2 = 1DIR3 = 1DIR4 = 1….·
·ts works fine, but this is not a way to control 7 LEDs.
Then I switches LEDs positive to Vdd and negative sides to Stamp pins enter again simply command:
DIRL = %1111111
PAUSE 500
DIRL = %0000000
PAUSE 500
DIRL = %1111111
LEDs start blinking. What happens here?
I read from manual that Vdd is +5v input for Stamp supply. In this case pins are negative part of the circuit and where to put resistors if this situation is normal?
Please help me to resolve this!!
Comments
DIRL=%11111111
OUTL = %00111111
PAUSE 500
OUTL = %00000000
PAUSE 500
OUTL = %00111111
Jeff T.
Post Edited (Unsoundcode) : 11/23/2007 1:58:09 AM GMT
OUTL controls the state of·all 8 outputs with one instruction, the previous state of the outputs has no bearing on what their new states will be, that is determined by the next OUT instruction.
hope this helps
Jeff T.
EDIT for future reference if it makes it easier you could use decimal notation,· eg: OUTL·6 is the same as typing·OUTL %00000110
Post Edited (Unsoundcode) : 11/23/2007 2:49:00 AM GMT
Jeff T.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support