Stamp PLC questions
I have a Stamp PLC controller with a BS2 chip. What I am trying to do is make a simple program to get the basics down first.
This is what I have:
Main:
DO
LOW 15
PAUSE 250
HIGH 15
PAUSE 250
LOOP UNTIL (Din1 = 1) ‘I want the flashing LED to stop when Din1 is pressed
The biggest problem I have is figuring out what Din1 thru Din10 is called. Obviously Din1 is not the correct name, because it hasn’t stopped flashing… What am I missing?
Post Edited By Moderator (Chris Savage (Parallax)) : 5/30/2007 10:40:01 PM GMT
This is what I have:
Main:
DO
LOW 15
PAUSE 250
HIGH 15
PAUSE 250
LOOP UNTIL (Din1 = 1) ‘I want the flashing LED to stop when Din1 is pressed
The biggest problem I have is figuring out what Din1 thru Din10 is called. Obviously Din1 is not the correct name, because it hasn’t stopped flashing… What am I missing?
Post Edited By Moderator (Chris Savage (Parallax)) : 5/30/2007 10:40:01 PM GMT
Comments
Eight of the inputs go to a shift register, not directly to an I/O pin, so to read these you must first SHIFTIN the data. Two inputs do go directly so if you connect to those, you could use the following code to detect a signal going into Din9 or Din10…
LOOP UNTIL IN6 = 0
Or
LOOP UNTIL IN7 = 0
Note: The inputs are active LOW, so by default they should be HIGH. I hope this helps. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support