Hi,
I'm trying to get the PCB to program the HC12s using AT COMMANDs
First testing with a terminal SEND "AT+C010" HC12 returns OK C010. OK.
ON PCB.
Hseropen 9600
Hserout "Ready!", CrLf
'SET UP HC12
'PRESS BUTTON (OR EXTERNAL)
PORTE.0 = 0 'SET HC-12 COMMAND ON
Hserout "AT+C010", CrLf
PORTE.0 = 1 'SET HC-12 RUN OFF
main:
If button = 1 Then 'BUTTON NOT PRESSED
rled = 0
yled = 1
Hserout "$0", CrLf
Endif
If button = 0 Then 'BUTTON PRESSED
rled = 1
yled = 0
Hserout "$1", CrLf
Endif
Goto main
End
As can bee seen from the images, it is SENDing, see right hand side of image.
The READout at the top of the image shows the top line is some time from the start. The bottom line took me ages to decipher, and the result is shown on the second image.
Why the error?
C