serout to serin 2 Chips


New Member
I am trying to use the serout on one picaxe-18M2 to the serin on a picaxe-28X2.
On the TX side:-
Pause 2000 ;Let things settle down
main: if pinB.1 = 1 then ;If pin 7 is high ie button is pressed
goto TX:
end if

pause 50 ;Wait awhile
goto main: ;Still looking for a button press.

TX: serout b.0,T2400_4,(1) ; send a '1'
pause 5000 ;pause 1 second
goto main: ;loop

On the RX side.
pause 400 ;Let things settle down
high A.1 ; Switch the LED on
Pause 500 ;wait 1 second
Low A.1 ;switch the LED off thus proving that if the pin A.1 Goes high
; the led works;
serin B.7,T2400_4,b2 ;Put the received data in b2
high A.3 ;green LED on. To prove the serin function works.
pause 1000 ;Pause 1 second
low A.3 ;green LED off
if b2 = 1 then high A.1 ;Puts Led on via pin 2
Else low A.1 ;if anything other than a 1 is sent then switch the LED off
goto main: ;go back to receive another input.

The problem is, although the serout pin on he 18M2 is directly connected to the serin pin on the 28X2 and a signal is detected on this connection (Storage CRO) The RX side dose not get past the serin command. Both sequences simulate correctly
What am I doing wrong?


Technical Support
Staff member
The problem is most likely mismatched baud rates; both specify T2400_4. That's fine for the 18M2 which runs at 4MHz by default, but the 28X2 runs at 8MHz by default, so that should be T2400_8.

Or just use T2400 on both, with no frequency specifier.