18X ADC1 input "stuck"


Hi ya - I have a problem with the 18X - anything stupid that I've overlooked perhaps or is it something you have seen/heard of before?

I have a 5k pot wired across the 5v supply, the wiper connected to leg18 (INPUT1/ADC1). Without the chip in the socket, twiddling the pot gives a nice smooth variation from 0 to 5v.

With a (brand new) chip in the socket, twiddling the pot I find the (scope) observed voltage on leg18 feels like its pegged to 0v, only swinging 0v to 5v over the last 10% or so of the pot as the low ohms at the end of the track fight whatever is holding leg 18 down. With a test program I verified that the ADC is actually reading the input voltage in a representative manner over this narrow adjustment range of the pot.

I have a second (used) 18X chip that behaves in just the same way. My only previous 18X circuit used leg18 as a digital input, not as an ADC, and it was driven directly by an output pin of an 08M, so I this may have masked a potential problem.

I once had a problem not unlike this where a pull-up needed to be *very* low before it worked, because at a later date in the project I'd unwittingly used what I thought was a spare pin as an input, whereas it had in fact already been used as an (unconnected) output for a timing delay using "pulsout" - but this was on the 8M where some pins can be assigned as IN or OUT. The 18X has dedicated INs and OUTs

Even so, I've tried a zero length program and then a three line trivial program accessing ADC1 just to be sure - no luck! I've also tried it without the programming lead attached and on a 3v supply.

On my circuit board, the other two ADCs (0 and 2) are similarly connected to pots and their inputs can be smoothly altered over the whole pot range with the chip in place, like you'd expect.

I'm out of ideas !!!! Any help would be gratefully received.




So you are saying that on two 18X chips, neither work on ADC1 (well, they work in the strange manner you describe), but they both work fine on ADC0 and ADC2?

Apart from a wiring error, the conclusion would be that you have somehow destroyed the ADC0 pin on both chips, but ADC0 is a dedicated input pin and reasonably hard to destroy.

Are you absolutely sure you don't have a wiring error? (sounds like you don't).


Hi thanks for your thoughts

Pot is not logarithmic - as evidenced by its smooth linear operation when no chip is in the socket.

Circuit is built on stripboard, and I'm confident of no wiring (or soldering) errors - I've been in electronics for over 40 years and very competent in stripboard construction. EVEN SO - I ask how can it be a wiring error if the pot works just fine until you plug the chip in?

The ADC1 works from the point of view of returning values in the range 0 to 255 - it's just that it happens all at one end of the pot instead of smoothly across its whole rotation.

Let's all keep taking the thinking pills !


Only a negative result I'm afraid.

I used an AXE091 board, with its own 10k pot.

I connected the pot to inputs 0, 1 then 2, in turn.

#picaxe 18X

readadc 1,b0
 ;then 0, then 2

sertxd (#b0,cr,lf)
pause 200
goto main
Same result for each:
a smooth transition across the whole “sweep” of the pot.


PS. Can you swap the pots around, and see if there's any difference?


Thanks big E for trialling the set-up.

Thanks to you I now know its NOT some strange I/O feature of the 18X that I had failed to observe - and the problem is definitely mine to sort. Its typical that I look for complicated reasons when it sounds increasingly like (two) blown chips.

I will conduct a sanity check on both chips simply plugged into a solderless breadboard and connect a pot to each ADC in turn. If the problem won't go away I will accept that BOTH chips are fried in some subtle way - but quite how I *twice* blow up the same input with a predominantly passive circuit powered by 4 x 1.2v AA pen cells is beyond me! (static? - ok I wasn't chained to the radiator whilst I was handling them - but the same damage each time????)

Many thanks for your help.


Senior Member
Before you try another 18X, put a 1K resistor between the wiper of the pot and the ADC input pin. It should not make a difference in readings but will provide a degree of protection for the next chip.


Andrew Cowan

Senior Member
I'd be interested to hear how this turns out. Without applying a higher voltage to the ADC pin, I'd be very surprised if you've blown up two.



Deffo a wiring fault. More than one chip exhibiting the same 'fault' makes it almost conclusive.
It works fine when the chip is not plugged in so I'd be looking for a link to an output pin. (probably one you don't use, possibly leg2).

Sound advice from papaof2.


Senior Member
Did you try a hard reset?

Sure it’s 5k pot?

Check resistance between pot ground and Picaxe ground.

Check resistance between wiper and ground with Picaxe in and again with Picaxe out.

Physically stress (wobble) the board and IC socket when performing these checks.


Technical Support
Staff member
We are with BB, almost certainly an accidental short between legs 1 and 2 on the board.


10 out of 10 to Beanie Bots! Yes, wiring error - I'll be off to SpecSavers tomorrow. . . .

It took an experiment on solderless breadboard to convince myself it was MY problem and not some obscure and not well documented quirk with the chip - that's the problem of feeling so competant and confident (who said arrogant?) in my 40 odd years of experience in making projects on stripboard.

A stripboard track (connected to the pot wiper) that I thought I'd cut with my trusty 4mm drill bit was in fact still making a connection via an impossibly thin shard of copper along the hole edge - I reckon I've good good close-up eyesight but this needed a magnifying glass! And in my layout it was making an unwanted connection to (unused) OUT7.

Problem solved - thanks to all for your helpful suggestions - I feel very humble!


Well found afb.

Some people give up after 5 minutes and jump into the Forum and blame everyone and everything but themselves.

Unless there is a genuine fault/glitch, then when 1000 people find it OK and muggins has a problem then it must be that muggins has done something wrong.

Obv when you are new to this we can't expect you to have the experience (and experiences ;)) of us Old Hacks /Lags /Gits.
But the 18X is a mature product and, in my experience, a reliable little chappy.


Senior Member
Been bitten by that a few times myself. That's why I suggested measuring resistance. Have adopted a routine that can minimise the chances of this type of problem.

During construction, I frequently ‘x-ray’ the board using my desk lamp. The lamp is directed so that the bulb is just shaded from my direct line of sight, but will illuminate the component side of the board. The light diffuses through the board and it ‘glows’ allowing even the tiniest bridge to be seen. Here’s a picture of what I mean:

Even with this virgin board, you can see a potential problem at the top right.


Glad you got it sorted afb.
Been there myself, that's how I 'knew'.

Good tip there Boriz.
Does indeed show a potential issue top right.


Senior Member
you can see a potential problem at the top right.
Funny.... that looks just like the problem I made on a small board for programming a breadboard circuit. Fortunately I didn't blow the picaxe but a regulator snuffed it!

If I'd checked with a meter I'd have found it :rolleyes:



Good tip.

But I'm not too sure about the "virgin" status. Looks well diddled around edges :)
And that little fleck obv caused by vigorous reciprocation of a hefty tool.

When I cut with a hacksaw I always chamfer with a very fine file afterwards which gets rid of many burrs which can cause embarrassment.
Ditto if I ever hacksaw PCB before exposure as any burr will lift it away from the UV box glass.

I am such an anorak that I check etched PCBs with a multimeter before soldering.


Senior Member
Yes. Tracks towards the camera. Yes this is part of a larger board which has been cut using a junior hacksaw or dremel. I suppose by ‘virgin’ I mean unpopulated.

Since I began using this technique, I’ve discovered and cleaned loads of copper burrs, incomplete track breaks and miniscule solder bridges and blobs, every time I build a board in fact. I’m surprised that any of my previous boards worked at all.

It really highlights the drawbacks of stripboard. Especially cheap stripboard, which is what I usually use. If you look carefully, you can see that some of the tracks don’t even have straight edges. Cheap Chinese special (double happiness).


The Boriz X-Ray Machine - what an excellent idea! It was well worth starting this thread and making a fool of myself, in order to be able to add this massively useful trick to my armoury. At last I've seen the light (ha ha).

Needless to say I tried it immediately and was amazed at how well it worked. No problems found but it did show a few spots of flux residue on the edges of the tracks which were not evident by the normal eyeball technique.

Well done Boriz !!!


Boriz - conjure away, but just be sure to not to do any tricks that involve making PICAXEs disappear !