Picaxe to Picaxe problem

MervBlood

New Member
Hi could anyone help me out with this problem.
I have linked a picaxe 28x1 and a 28x2 together via a serial link. As a test I linked the 28x1 to a seven segment display and wrote a couple of short programes to send the numbers 1,2 and 8 from the 28x2 to the 28x1. What should happen is the receiver will get one of the numbers and display it,then wait and look again. It should pick up one of the three and display that etc. What happens is it picks up a number (could be any of the three so I know they are being transmitted) but will only display this and will not move onto the next. If I disconect the receiver it will pick up one of the numbers and display. I figure that my programing is at fault and wonder if some kind sole would look at it for me. I have read the manual to the point of brain shutdown!

Transmitter
main:
serout 3, t2400, (1)
pause 50
serout 3, t2400, (2)
pause 50
serout 3, t2400, (8)
pause 50
goto main

receiver
subroutine to clear seven segment display and return
one: goes to the clear subroutine then make 1 on the seven segment.Ends in return
Two: goes to the clear subroutine then make 2 on the seven segment.Ends in return
Eight: goes to the clear subroutine then make 8 on the seven segment.Ends in return
main:
looping:
symbol serdata = b0
serin 3, t2400, serdata
if serdata = 1 then gosub one
if serdata = 2 then gosub two
if serdata = 8 then gosub eight
goto looping.

I have just described the subroutines to save space.
Thanks
Merv
 

Janne

Senior Member
Posting the whole code in here would certainly help troubleshoot it. If you use the [ CODE ] - tags around the code, it won't take much space.

The simplified program you posted looks like it should be ok ( in concept, not looking at the syntax), if the receiving axe can do the display update in the 50mS allowed.
 

MervBlood

New Member
Janne you are a genius. I gave it a little longer and it works a treat.
I hope you have a great weekend. Thank you for your time
Merv
 
Top