I am trying to sent a pattern of 3 bytes via serial, i have the following code written:
master files:
receiving file:
however, the receiver only gets b7 = $00, b8 = $80, b9 = $01 when it should have the transmitter pattern.
The question really is, does the code look right, if so i take it it is the circuit, i never used serout to send multiple bytes so i am concerned its my programming.
master files:
Code:
#picaxe 40X1
serout 7, N2400, ($01, $80, $01) 'send message
Code:
#picaxe 28X1
setint 0,%00000100 'interrupt on pin2 when low
main:
goto main
interrupt:
serin 2, N2400, b7, b8, b9
pause 500
sertxd("byte b7 = ", #b7, CR, LF)
sertxd("byte b8 = ", #b8,CR, LF)
sertxd("byte b9 = ", #b9, CR, LF)
if b0 = $01 then 'they are talking to us!
high portc 3
pause 500
low portc 3
pause 500
end if
setint 0,%00000100
return
The question really is, does the code look right, if so i take it it is the circuit, i never used serout to send multiple bytes so i am concerned its my programming.