Thanks Richard!
This looks good! I'll give it a try.
Don't know why I did not think of this? Over thinking maybe?
Thanks again.
Thanks Richard!
This looks good! I'll give it a try.
Don't know why I did not think of this? Over thinking maybe?
Thanks again.
Hi Richard.
I don't quite get somehing with HSERIN. Your first example worked great I got "ready" on my 2X16 display. But after that I cant get
any other replys to work They just sit there waiting.
EG.
I am sending out "AT+CWMODE=1" and my reply is:
AT+CWMODE=1
OK
I would like to start the next command after receiving "OK" so I know the first setting was excepted before I go on to the next.
But for some reason the PIC never "sees" "OK".
Test program:
LCDOut $FE,1,"Setting STA mode"
LCDOut $FE,$C0,"Please wait....."
pause 2000
HSerout ["AT+CWMODE=1",13,10]
hserin [WAIT("OK") ,RX0,RX1,RX2,RX3,RX4,RX5]
pause 2000
LCDOut $FE,1,"Set connection "
LCDOut $FE,$C0,"Please wait....."
pause 2000
HSerout ["AT+CIPMUX=1",13,10]
I never get to "Set connection ". Just hangs on WAIT("OK").
I have tried to go back to start of program in case the reply was missed with this
hserin 100,start, [WAIT("OK") ,RX0,RX1,RX2,RX3,RX4,RX5]
but it will go around and around for ever.
I hate to bother you again but I have spent most of the weekend and I just cant get it.
Any help would be appreciated .
Thanks
the device respondsHSerout ["AT+CWMODE=1",13,10]
hserin [WAIT("OK") ,RX0,RX1,RX2,RX3,RX4,RX5]
OK(chr13,chr10) or OK(chr10)
so
RX0=13,RX1=10 and then hserin will wait forever trying to fill rx2-5 because no more serial data is forthcoming
either use a timeout or
hserin [WAIT("OK") ]
Warning I'm not a teacher
With hserin you can receive one byte at a time into a buffer until you see the return character,
and then look at the rest of the command you received.
Bookmarks