Lprs er400
Kenneth_85
Posts: 7
I have purchased a Basic Stamp 2p40 and i have purchased LPRS receiver ER400RS and tranceiver ER400TRS. Can anyone provide me a simple code to test these th. I am blur and need help for my project. Thanks.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
Thanks for your fast reply. I appriciate it a lot.
Here is the workable simple pbasic programming for the ER400 if anyone need it as reference in the future.
The Transmitter Part:
' {$STAMP BS2p}
' {$PBASIC 2.5}
x VAR Byte
y VAR Word
TX PIN 0
BSY PIN 1
But1 PIN 2
L1 PIN 3
n48 CON 188
Main:
x=00
HIGH L1
LOW BSY
SEROUT TX,n48, [noparse][[/noparse]x,CR]
PAUSE 500
HIGH BSY
x=11
LOW L1
LOW BSY
SEROUT TX,n48, [noparse][[/noparse]x,CR]
PAUSE 500
HIGH BSY
GOTO Main
The receiver part:
' {$STAMP BS2p}
' {$PBASIC 2.5}
RX PIN 0
RDY PIN 1
L1 PIN 2
L2 PIN 3
L3 PIN 4
n48 CON 188
x VAR Byte
Main:
LOW L2
LOW L3
HIGH L1
LOW RDY
SERIN RX,n48, [noparse][[/noparse]x]
HIGH RDY
IF x = 00 THEN
HIGH L2
PAUSE 1000
ENDIF
IF x = 11 THEN
HIGH L3
PAUSE 1000
ENDIF
GOTO Main