thomasfoltz
New Member
I am trying to use a 14M2 to send two bytes to an 08M2 using the hardware serial commands. I have B.0 of the 14M2 connected to C.1 of the 08M2. My goal is to make the 14M2 a controller for 4-08M2's, so the 14M2 will send an id number, followed by a command to turn an LED on or off, for now. The LED is connect to C.4 of the 08M2. I cannot seem to get it to work. Any help would be appreciated. Here's my code
14M2:
08M2:
14M2:
Code:
init:
hsersetup b2400_4,0 'non-inverted data
main:
do
hserout 0,(1,2) 'command 2 turns on the LED
pause 100
loop
Code:
symbol chipid=1 'we give this chip number 1
'receiving commands from
'the main controller
symbol LED = c.4
symbol serid=b0
symbol sercmd=b1
init:
hsersetup b2400_4,0 'non-invert data
low LED
main:
do
pause 50
do:hserin b0:loop while b0!=1
hserin b1
if b1=2 then
high LED
else
low LED
endif
b0=0:b1=0
loop
Last edited by a moderator: