Peter M
Senior Member
Hi all, I am trying to get comms to work between two picaxes using a crossover programming cable using serrxd and sertxd. one is an 08m2 the other a 28x2.
so the 08m2's default speed is 4800,n,8,1 and the 28x2 default is 9600,n,8,1 using these commands.
The manual says increasing clock speed to 8mhz, on the 08m2 will make its output run at 9600,n,8,1, (same as 28x2) yet when I up it to that freq the following fails??
at 4mhz an LED flashs once every second, and it replies back to the terminal as expected when the 25,25,n is sent from the terminal, so I would expect that to happen every half second at 8 mhz. but nada.?
yes I set the terminal to 9600 to match the new clock speed. no led heart beat, no reply. No doubt I am doing something wrong.
#Picaxe 08M2
#no_data
b4=101
setfreq 8 ;it works without this, but need it for 9600 baud
Start:
if pinc.3=1 then goto here ;test for programming exit
pulsout c.1,50 ;short pulse on Y led
serrxd [950,start],(25,25),b4 ;wait for data with qualifier Nos of 25,25,data
high c.2 ;light Green LED
sertxd("the value sent was ",#b4,13,10) ;send data back to terminal
pause 1000 ;wait a sec
low c.2 ;G LED off
goto start ;go wait for more data on programming pin
here:
high c.2 ;light Green LED
end
so the 08m2's default speed is 4800,n,8,1 and the 28x2 default is 9600,n,8,1 using these commands.
The manual says increasing clock speed to 8mhz, on the 08m2 will make its output run at 9600,n,8,1, (same as 28x2) yet when I up it to that freq the following fails??
at 4mhz an LED flashs once every second, and it replies back to the terminal as expected when the 25,25,n is sent from the terminal, so I would expect that to happen every half second at 8 mhz. but nada.?
yes I set the terminal to 9600 to match the new clock speed. no led heart beat, no reply. No doubt I am doing something wrong.
#Picaxe 08M2
#no_data
b4=101
setfreq 8 ;it works without this, but need it for 9600 baud
Start:
if pinc.3=1 then goto here ;test for programming exit
pulsout c.1,50 ;short pulse on Y led
serrxd [950,start],(25,25),b4 ;wait for data with qualifier Nos of 25,25,data
high c.2 ;light Green LED
sertxd("the value sent was ",#b4,13,10) ;send data back to terminal
pause 1000 ;wait a sec
low c.2 ;G LED off
goto start ;go wait for more data on programming pin
here:
high c.2 ;light Green LED
end
Last edited: