manutdfan2004
New Member
I have built two circuits both with PICAXE 18X chips, now I am trying to get them to communicate using an AM transmitter/receiver pair from maplin.
http://www.maplin.co.uk/Media/PDFs/vy48.pdf
However it isn't working as expected, I have the transmitter connected to an output pin (0) on the first PIC, and the receiver connected to the input pin (0) on the other PIC. Both are powered correctly as the programs run, the problem is that the output value of b0 that is transmitted to the PC does not increment from 0 to 100 it seems to hold a random value, I have included both the programs below in case there is something stupid I have done.
Any help would be gratefully received, otherwise its a case of me just messing around and hoping I can get it to work.
EDIT: Also after the transmitter is turned off the receiver carries on receiving data, I have check the grounding and it seems ok.
http://www.maplin.co.uk/Media/PDFs/vy48.pdf
However it isn't working as expected, I have the transmitter connected to an output pin (0) on the first PIC, and the receiver connected to the input pin (0) on the other PIC. Both are powered correctly as the programs run, the problem is that the output value of b0 that is transmitted to the PC does not increment from 0 to 100 it seems to hold a random value, I have included both the programs below in case there is something stupid I have done.
Any help would be gratefully received, otherwise its a case of me just messing around and hoping I can get it to work.
EDIT: Also after the transmitter is turned off the receiver carries on receiving data, I have check the grounding and it seems ok.
Code:
main:
goto reading 'call code to send data to Transmitter
reading: 'reads data from sensors into registers
goto send 'once registers updated send data
send: 'sends data from registers to Transmitter
for b0 = 0 to 100
high 3
serout 0,N4800,(85,85,85,85,b0)
pause 500
low 3
pause 500
next b0
Code:
main:
goto receive 'calls code to receive data from external device
receive:
b0 = -1
high 0
serin 0,N4800,b0
pause 500
low 0
goto send 'after data has been received call send to transfer
'data onto computer
send:
readadc 0,b0
'to send data onto PC
sertxd("The Value of b0 is: ",#b0,13,10) 'sertxd("The Value of b1 is: ",#b1,13,10)
goto main
Last edited: