Strange failure mode?

Dr_John

Member
I have a robot that is no longer working.
I have been downloading to the AXE401 shield base (28X2 picaxe chip) on and off about 30 to 40 times since the board was new last October. see http://www.picaxe.com/docs/axe401.pdf page 4
The motor drivers etc, are provided by an instant robot board: AXE408 - see http://www.picaxe.com/docs/axe408.pdf
Today it stopped working.
On inspection the following commands were not seeing the voltage change (measured with a voltmeter = 5volts / 0volts)
on Shield pin S.0 also known as C.7
Code:
WaitPushbutton:
   do : loop until pins.0 =1 ' wait till pushbutton pressed
   do : loop until pins.0 =0 ' wait till released
return
when handling the circuit board to see if there was an obvious short circuit, and to measure the actual voltage on S.0, my finger brushed against the "VR" pin, which is also pin A.3 according to the PDF document.
This touch caused the robot to start.
using a simple debug loop,
Code:
do
b2 = pinc.7
b3 = pina.3
debug
loop
I saw that b2 was not responding to the pushbutton, but was responding to the "Vref" pin,
and b3 was responding to the a.3 pin on the left of the circuit board 3rd one down in the analogue inputs. (see AXE401 pdf page 4)
my question is this?

**** Has anyone else seen this kind of failure mode?. ****
I will replace the 28X2 chip as soon as I can, and post my findings.

This input-swapping is the only fault I have found with the robot.
It reads its other inputs, and controls its motors quite happily once it has seen its start pushbutton signal.
(I now touch the Vref pin to get it started!)

I have been programming PICAXE chips for many years, and apart from the loss of downloaded program during a period of high solar activity about 3 years ago, I've never seen anything like this.
Regards
John Fisher
 

geoff07

Senior Member
If noone replies in three days to a post that generally means, to answer your question: "No".

There is a lot of switching between the cpu and the pins, which enables the multiple functions on each pin. So there is a lot that could be zapped by an over-voltage, for example, that would then behave quite unpredictably.

As I use my Picaxes in household devices that matter (there are five chips controlling my garage door, for example) as well as in experiments, I always buy spares!
 

SAborn

Senior Member
I have never used a 28x2 chip, but at a guess its a code problem not a fault in the chip.

Your code .........

do : loop until pins.0 =1 ' wait till pushbutton pressed
do : loop until pins.0 =0 ' wait till released
To me has problems and im supprised it passed a syntax check without the need to nominate whick bank of pins is refered to, for example there is pins bank A, pins bank B, and bank C, so just "PINS" might mean any pin in A.B.C, im too lazy to look it up.

So perhaps narrow the field to .............
do : loop until pinsA.0 =1 ' wait till pushbutton pressed
do : loop until pinsA.0 =0 ' wait till released


Also have you set up the directive for what each bank of pins will do, as a general "Pins" comment is likely to make ALL pins as inputs, making pins that was previous outputs become inputs, again im too lazy to look it up, so perhaps someone else will comment and correct myself.
 

Dr_John

Member
Thanks Technical, I found the concept of "PIN S.0" very confusing at first.

I have run more detailed tests (debug) and find that the offending pin ( C.7 otherwise called S.0) is registering High,
even though it is pulled to ground with 15k, and reads 0.0 volts on the voltmeter.

Pin A.3 is open circuit and alternates 0 and 1, but provides a steady high, when touched, so it's presumably running in Touch mode.
All four "dirs" registers read 00000000 on debug, and the chip seems otherwise to run OK.

When you touch A.3 it goes High, and Pin C.7 goes low.

I'll put it on the shelf and look at it every year at about this time - midsummer madness.
The replacement chip from Rapid electronics works entirely as expected.

Thanks for all your replies.
John F
 
Top