Long wait preventing download?

Graham O

Member
Hello,
I'm using an 08M to control the transmit line of a radio and inject an audio tune. This works according to plan and is not a problem. However, I don't want it to start immediately, so have set a 600s gap after power on before the main program runs.

initial:
for b0 = 1 to 10
wait 60
next

main_program:
etc
etc

(I didn't want to use the sleep command due to the timing variations on it.)

Before adding the the initial wait period, everything was fine and I could blank and/or re-program the 08 at any time. But when the initial period is included in the program, I can't reprogram it unless I switch it off first for about 15 minutes. It is almost as if the long wait period causes a lock up. Is this normal or expected. Any suggestions please?

Chip: 08M
Board: hombrewed
Download circuit: As described in the manual and works under all other conditions.
 

MurrayJ

Senior Member
Yes long wait commands, and others can cause trouble with downloads. To program try the following. It works because the picaxe looks for a program download before the program starts.

1 have the picaxe off
2 press the download button.
3 when the downloading screen comes on, turn on power to the picaxe.

You have to get your timing right. Wait too long and the program download will fail. Too early and it will also fail.
 

chigley

Senior Member
You could do a hard reset...

Remove power from your circuit.
Start download from Programming Editor.
Plug power in, and download should start straight away.

Charlie
 

hippy

Ex-Staff (retired)
You can change to -

For w0 = 1 To 600
Wait 1
Next

Which should allow downloads in the first 600 seconds.
 

Graham O

Member
Thanks for all your help. I have tried the power off, program, power on sequence, albeit without success, but if the timing is critical, that could explain lack of progress.
Thanks Hippy for the alternative way of waiting 600s. I'll give that a go. It's only a problem during the testing phase as I'm re-writing and re-testing the radio control part. Once built they'll be set until another direction finding exercise comes along.
 

chigley

Senior Member
Thanks for all your help. I have tried the power off, program, power on sequence, albeit without success, but if the timing is critical, that could explain lack of progress.
Thanks Hippy for the alternative way of waiting 600s. I'll give that a go. It's only a problem during the testing phase as I'm re-writing and re-testing the radio control part. Once built they'll be set until another direction finding exercise comes along.
The hard reset should still work. In my experience the timing isn't that critical, as long as you don't let the Programming Editor timeout before plugging the power in.

It's described in a bit more detail on page 42 of Manual 1.
 
Top