Picaxe to Picaxe Serial communications withe hsersetup

zs6wbt

New Member
E have to send data from Pic-A to Pic-B and then from Pic-B to the PC terminal. when i look at the output of Pic-A withe the terminal it is fine but when i look at the output of Pic-B it is not OK Peace help me to fix this code it is a urgent matter.

Pic-A code:

'----------------- Disply to PC and Pic-B ------------------------

PC_Disply:
hsersetup B9600_8,%10 'For pc conection

sertxd (cr,lf,"MSG in MEMMORY= ")
high B.6 'Turn Radio on
pause 2000 'Wate 2seconds for radio to stabalise
hserout 0,(cr,lf)

for w2=1 to Last_Ram
'on startup (symbol Char1=b16)
readi2c w2,(Char1)
pause 10
sertxd (Char1)
pause 10
hserout 0,(Char1)
next w2
hserout 0,(cr,lf)
hsersetup B9600_8,%00

sertxd (cr,lf)
Low B.6 'Turn Radio off

return

The output:

Pic_A out.jpg

Pic-B code:

main:
hsersetup B9600_8,%00
hserin [10000],0,65

b1 = hserptr - 1 'the hserptr holds the number of bytes rcved

sertxd (cr,lf,#b1,cr,lf)
if b1=52 then
for b2 = 0 to b1 'iterate through the data
get b2,b3
sertxd (#b3) ' re-transmit the item ro PC
next b2
end if

goto main ; loop

The output:

Pic_B out.jpg
 

techElder

Well-known member
Your code mentions the word "radio." Your text does not mention how your PICAXE parts are connected; just that there is "serial communication."

Sending data over an RF link is not exactly trivial. Many things could be going on here.

Please explain more, including a schematic and photos would be nice.
 
Top