I am using an 08M2 and serout to send AT commands to another device. My hope is to be able to send an AT command from Pin C.4 to the external device, and then use serin on Pin C.2 to capture the OK response from the external device. I have sertxd setup to send the contents of the two registers to terminal. Here's the code. (baud = T2400_4)
In addition, I have a separate USB UART monitoring Pin C.2, and I can see the AT command and the OK response from the external device, but the OK is not being stored at b14 and b15, based on the terminal screen showing blanks. If I don't include "AT" as a qualifier, AT is stored in b14 and b15.
What am I doing wrong? Thanks.
Thanks.
Code:
serout C.4,baud,("AT",13,10) 'Send attention command+CR+LF to ESP-01.
serin [1000],C.2,baud,("AT"),b14,b15 'Discard AT and store OK at b14 and b15.
sertxd(b14,b15,13,10) 'Sends contents of b14,b15 to terminal, followed by CR,LF)
What am I doing wrong? Thanks.
Thanks.
Last edited: