I have a similar problem. I have a voltage between 0 and 3.5v coming from an op-amp which goes into input1 on an 18X. The ADC value is then displayed on an LCD. When the serial download cable is connected I get a stable reading, as soon as I remove the cable the value is just all over the place. The 18X is wired up on breadboard as it should and includes the download circuit.
Any help would be greatly appreciated.
Here is my code - it uses the lcd routine from the picaxe manual.
Start: Gosub init
b1 = 1
Gosub wrins
b1 = 128
Gosub wrins
Goto Main
init: let pins = 0
let b4 = 0
pause 200
let pins = 48
pulsout 3,1
pause 10
pulsout 3,1
pulsout 3,1
let pins = 32
pulsout 3,1
pulsout 3,1
let pins = 128
pulsout 3,1
let b1 = 14
gosub wrins
return
wrchr: let pins = b1 & 240
high 2
pulsout 3,1
let b2 = b1 * 16
let pins = b2 & 240
high 2
pulsout 3,1
return
wrins: let pins = b1 & 240
pulsout 3,1
let b2 = b1 * 16
let pins = b2 & 240
pulsout 3,1
high 2
return
disp_val: b10 = b6 / 100
b13 = b6 / 10
b11 = b13 //10
b12 = b6 // 10
b1 = 192
Gosub wrins
b1 = b10 + "0"
Gosub wrchr
b1 = b11 + "0"
Gosub wrchr
b1 = b12 + "0"
Gosub wrchr
pause 500
Main: Readadc 1,b6
Goto disp_val
pause 1500
Goto Main
End