Thanks,
the code used is
RXTX=1
pause 2
CREN=0
hserout [bs0,bs1,bs2,bs3,bs4,10]
pause 2
cren=1
RXTX=0
pause 2
RXTX is DE in MAX485 and CREN is RCSTA1.4.
I think the problem is in the input, i dont know the lenght of the string the master send me. When he send the string
02 03 02 e3 00 01 74 77
I read
hserin 15,PasoSerie,[b0,b1,b2,b3]
then I send
bs0=b0
bs1=b1+$80
bs2=$01
bs3=CRC.lowbyte
bs4=CRC.highbyte
RXTX=1
pause 2
CREN=0
hserout [bs0,bs1,bs2,bs3,bs4,10]
pause 2
cren=1
RXTX=0
pause 2
The master received next string:
0f 12 83 01 70 f0 0a
what's happening??




Bookmarks