does serin reset?
Archiver
Posts: 46,084
hi!
what is wrong with this program?
when i start it it reads the temp(tc) etc.
but when i want to tell the stamp to light a led it start flashing..
i want the led to light until when i press light button and turned
of as i tell and the same time read the tc,ljus etc.
here is a part of the program
SEROUT
16,16780,tc.HIGHBYTE,tc.LOWBYTE,rct.HIGHBYTE,rct.LOWBYTE,ljus.HIGHBYT
E,ljus.LOWBYTE,temp.HIGHBYTE,temp.LOWBYTE]
SERIN 16,16780,1000,starta, [noparse][[/noparse]WAIT(255), PinState]
starta:
pinstate=pinstate
IF pinstate=1 THEN gohigh
IF pinstate=0 THEN golow
PAUSE 1000
GOTO start
gohigh:
HIGH 8
GOTO start
golow:
LOW 8
GOTO start
what is wrong with this program?
when i start it it reads the temp(tc) etc.
but when i want to tell the stamp to light a led it start flashing..
i want the led to light until when i press light button and turned
of as i tell and the same time read the tc,ljus etc.
here is a part of the program
SEROUT
16,16780,tc.HIGHBYTE,tc.LOWBYTE,rct.HIGHBYTE,rct.LOWBYTE,ljus.HIGHBYT
E,ljus.LOWBYTE,temp.HIGHBYTE,temp.LOWBYTE]
SERIN 16,16780,1000,starta, [noparse][[/noparse]WAIT(255), PinState]
starta:
pinstate=pinstate
IF pinstate=1 THEN gohigh
IF pinstate=0 THEN golow
PAUSE 1000
GOTO start
gohigh:
HIGH 8
GOTO start
golow:
LOW 8
GOTO start