Partially Solved Picaxe 40x1 GSP VDIP1
Hi,
I have 2 problem for serial com (picaxe40x1):
1) gps[EM406A] txd connected directly to 40x1
if I use serin command on input pin0[leg 19] it works:
serin[10000,nodata],GPSRX,T4800,("$GPRMC,"),b1,b2,b3,b4,b5,b6,b0,b7,b8,b9,b0,b10,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b11,b0,b12,b13,b0,b14,b15,b16,b0,b17,b18,b0,b19,b20,b21,b22,b23,b24
if I use Hserin on pin7 [leg 26] read every byte 0. Also when the read routine is finish the picaxe reset
the code
#picaxe 40x1
SetFreq m8
#terminal 9600
HSERSETUP B9600_8, %00
main:
sertxd("start",cr,lf)
HSERIN [10000,leggi],b0,10,("$")
sertxd("fine",cr,lf)
goto main
Leggi:
FOR b0 = 0 to 5
read b0, b1
bintoascii b1,b2,b3,b4
SERTXD ("dato:",#B1,"_bintoascii:",b2,b3,b4)
NEXT b0
SERTXD (cr,lf)
pause 10000
return
2)VDIP1 (Vincuulum) connected directly to 40x1
'porta pin2 RX da Vdip1--I tried also pin7
'portb pin6 TX verso Vdip1
'porta pin3 RTS (verso) Vdip1 (not essential, can tie to 0V)
'portb pin5 CTS (verso) Vdip1 (not used)
doesn't read correctly because read ascii(141) ascii(182) ascii(140) instead "E"
if I use picaxe 18x input pin 6 (RXD) and output pin7(Txd) Vdip1 work correctly
the code
sertxd ("<Sent> E",CR,LF)
serout 6,T4800,("E",CR)
sertxd ("serin",CR,LF)
serin [30000,nodata1],7,T4800,b0,b1,b2'RxVdip1
sertxd ("serin fine_",b0,"_",b1,"_",b2,"_",CR,LF)
pause 100
if b0 <> "E" then init '"E"
Hi,
I have 2 problem for serial com (picaxe40x1):
1) gps[EM406A] txd connected directly to 40x1
if I use serin command on input pin0[leg 19] it works:
serin[10000,nodata],GPSRX,T4800,("$GPRMC,"),b1,b2,b3,b4,b5,b6,b0,b7,b8,b9,b0,b10,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b0,b11,b0,b12,b13,b0,b14,b15,b16,b0,b17,b18,b0,b19,b20,b21,b22,b23,b24
if I use Hserin on pin7 [leg 26] read every byte 0. Also when the read routine is finish the picaxe reset
the code
#picaxe 40x1
SetFreq m8
#terminal 9600
HSERSETUP B9600_8, %00
main:
sertxd("start",cr,lf)
HSERIN [10000,leggi],b0,10,("$")
sertxd("fine",cr,lf)
goto main
Leggi:
FOR b0 = 0 to 5
read b0, b1
bintoascii b1,b2,b3,b4
SERTXD ("dato:",#B1,"_bintoascii:",b2,b3,b4)
NEXT b0
SERTXD (cr,lf)
pause 10000
return
2)VDIP1 (Vincuulum) connected directly to 40x1
'porta pin2 RX da Vdip1--I tried also pin7
'portb pin6 TX verso Vdip1
'porta pin3 RTS (verso) Vdip1 (not essential, can tie to 0V)
'portb pin5 CTS (verso) Vdip1 (not used)
doesn't read correctly because read ascii(141) ascii(182) ascii(140) instead "E"
if I use picaxe 18x input pin 6 (RXD) and output pin7(Txd) Vdip1 work correctly
the code
sertxd ("<Sent> E",CR,LF)
serout 6,T4800,("E",CR)
sertxd ("serin",CR,LF)
serin [30000,nodata1],7,T4800,b0,b1,b2'RxVdip1
sertxd ("serin fine_",b0,"_",b1,"_",b2,"_",CR,LF)
pause 100
if b0 <> "E" then init '"E"
Last edited: