download cable and serial terminal

I Have been useing a short little program to count pulses, and useing the serial terminal to see that it is working properly. No problem. As soon as I disconnect the program cable it doesn't work???. I have taken out the sertxd lines ( in the code) and stopped the serial terminal opening after download in the options list but still no joy, I'm sure I've forgotten to do something but I can't think what!. anyone who can point me in the right direction will be my hero......for a while... until the next problem at least!!!

Its all running ofF a 5v regulated supply and has always worked in the past. The only thing I have changed recently is the editor. I upgraded to V 5.2.7
 
the circuit is a standard rev ed board for picaxe 18x there is a IR detector connected to input0 and an Led connected to output1. (an IR pulse comes from a 555 timer circuit.)


'pulse counting
start: w0 =0

#terminal 9600
setfreq m8
do

if pin0= 0 then: w0 =0 endif
do :loop until pin0 =0

do :loop until pin0 = 1
high 1
w0 = w0 +1
sertxd (#w0,cr,lf)
loop until w0 = 100
low 1

pause 2000

goto start
 

eclectic

Moderator
the circuit is a standard rev ed board for picaxe 18x there is a IR detector connected to input0 and an Led connected to output1. (an IR pulse comes from a 555 timer circuit.)
Sorry to sound pedantic, but

1. Is it the CHI030 board?

2. Which IR detector? How connected?

3. 555 pulse? How's it connected please?

E
 
It is the CH1030 board,
the IR detector is a simple 5mm clear type similar to the 5mm LED's apologies cant give a part no
the 555 timer Produces the IR pulse from a 5mm clear LED
it is connected to the same regulated 5v supply as the picaxe
 

BeanieBots

Moderator
Only works with the download cable plugged in is a classic of a fault with the download circuit.
Double check that the two resistors are NOT wired as a potential divider and that the 10k really does pull down to 0v.
Also double check that reset is pulled high.

If both of those really are OK but it still behaves wrong, please post a full schematic of your circuit and a bare minimum code that exhibits the error.

EDIT:
Sorry, missed the last two posts. If it's the CHI030 then we must assume the download circuit is OK.
Does it work OK if you start the terminal program (press F8)?
If yes, is your PC a DELL?
 
Last edited:
yes f8 terminal works fine and yes it is a dell laptop Inspiron 4100
I have the highpower board from rev ed sitting next to this CH1030 running a stepper motor with no problems after downloading and removing the cable!
 

BeanieBots

Moderator
I have seen this before recently on a few work colleagues PCs.

On some DELL laptops, when the serial port is not in use, it idles high instead of low. (hence the problem)
Sorry, no idea of the cause or fix but it only appears to effect DELL laptops.
The only fix I can think of is either to disconnect the download lead or press F8 after each download to keep the line high.

Maybe Hippy or Technical can look further into what is going on but it might be outside their control.
 

hippy

Ex-Staff (retired)
Not running with serial cable disconnected I'd usually say was down to a Serial In interface being wrong, but with a Rev-Ed board that seems less likely. Upgrading to Programming Editor 5.2.7 shouldn't have affected anything - If it runs with the serial cable connected then it should run with it disconnected.

The only thing I can think is there's some hardware issue whereby the circuit becomes different when disconnected.

I would suggest downloading a simple program which flashes the LED. Does that work when the cable is disconnected ... ?

#Picaxe 18X
Do
Toggle 1
Pause 1000
Loop
 
Top