Hi i hope i do this post at the correct Forum. I am busy building a radio beacon withe a PIXCAXE and a DRA818V radio module. To start up the radio module i have to send a <AT> command to the DRA818 it will Respond withe an <AT> command back that consist of 15 ASCII characters. i use the "hserout" command to send the first string and the "hserin" to read back the reply from the module. Then i want to send the reply back to the PC via the program cable to see if i got the correct response. so fare i have been able to capture the first 2 characters and then i get stuck.
Is there a better way of doing this?
This is my code:
'----------------------- Setup Serial port -----------------------------
hsersetup B9600_4,%00
'----------------------- Setup Radio -----------------------------------
high C.1'Sleep mode Off
high C.0 'PTT = RX
low C.7 'RF power = Low 0.5W
'----------------------- Check if respond -------------
hserout 0,("AT+DMOCONNECT",CR,LF) 'Test Radio Module
sertxd (cr,lf)
for b5=1 to 200
w0 = $FFFF ; set up a non-valid value
hserin w0 ; receive 1 byte into w1
'sertxd (w1)
pause 100
if w0 <> $FFFF then
sertxd (w0)
hserin w0 ; receive 1 byte into w1
sertxd (w0)
b5=200
end if
next b5
Is there a better way of doing this?
This is my code:
'----------------------- Setup Serial port -----------------------------
hsersetup B9600_4,%00
'----------------------- Setup Radio -----------------------------------
high C.1'Sleep mode Off
high C.0 'PTT = RX
low C.7 'RF power = Low 0.5W
'----------------------- Check if respond -------------
hserout 0,("AT+DMOCONNECT",CR,LF) 'Test Radio Module
sertxd (cr,lf)
for b5=1 to 200
w0 = $FFFF ; set up a non-valid value
hserin w0 ; receive 1 byte into w1
'sertxd (w1)
pause 100
if w0 <> $FFFF then
sertxd (w0)
hserin w0 ; receive 1 byte into w1
sertxd (w0)
b5=200
end if
next b5