zeljko.ciric
New Member
Hi,
I trying to use Picaxe 20x2 and SimpleLan as web interface for my RS485 network. (Internet <-> SimpleLan <-> Picaxe 20x2 <-> DS485 <-> rs485 devices)
I have problem receiving from SimpleLan with serin command. Serout is working fine.
Recieving with hserin also works but I already use hserin for listenning in backgroung on RS485 line.
This code allways timeout. I already try to change calibfreq from -16 to 16 with no luck.
I remember that I read bout problem with SimpleLan and recieving true output (idle high) but now I can't find that post.
Does someone know how to solve this or what to try next?
I trying to use Picaxe 20x2 and SimpleLan as web interface for my RS485 network. (Internet <-> SimpleLan <-> Picaxe 20x2 <-> DS485 <-> rs485 devices)
I have problem receiving from SimpleLan with serin command. Serout is working fine.
Recieving with hserin also works but I already use hserin for listenning in backgroung on RS485 line.
Code:
#picaxe 20x2
#terminal 38400
#revision 5
#no_table
#no_data
setfreq m32
'calibfreq -1
let dirsB = %11111111
let adcsetup = %00000001
symbol SimpleLan_Out = c.2
symbol SimpleLan_In = c.3
symbol SimpleLan_Baud =T9600_32
symbol SimpleLan_Status = b0
symbol SimpleLan_Link = bit0
symbol SimpleLan_Form = bit1
symbol SimpleLan_Email = bit2
symbol SimpleLan_Em_err = bit3
symbol SimpleLan_UDP = bit4
main:
serout SimpleLan_Out,SimpleLan_Baud,("!AT0W01:ABCDEFGH",CR)
pause 1000
serout SimpleLan_Out,SimpleLan_Baud,("!AT0ST",CR)
serin [2000,error], SimpleLan_In, SimpleLan_Baud, SimpleLan_Status
if SimpleLan_Link = 0 then
sertxd ("Error! No connection!",CR,LF)
else
sertxd ("Link is OK",CR,LF)
end if
pause 3000
goto main
'#############################################################################################################################################
error:
sertxd ("Error! Timeout!",CR,LF)
goto main
return
I remember that I read bout problem with SimpleLan and recieving true output (idle high) but now I can't find that post.
Does someone know how to solve this or what to try next?