Dear all,
I'm currently debugging a bit of hardware developed by someone else - I have the code and the hardware in front of me and from my previous PIC work I'm
99% certain it should be working fine. Its coded in C and essentially boils down to something that tests two ADC values and reports them over the serial port. Using pins 3 and 4 (adc channels 1 and 2) the code goes:set_adc_chennel(1); result=read_adc(); Print some chars, print the result,. set_adc_channel(2); result-read_adc(); Print some chars print result
It does this, waits some time, does it again and then stops.
The strange output is that the ADC reading is somewhere around 17-25 for the first "result" and then 5 or 6 for the second. The actual voltage monitored on the pins is 0.441v and 0.12v respectively, steady to the third decimal place.
Changing the voltage (they are pressure sensors) to 0.580 seems to make zero difference to the first reading but changing the second to a voltage of
0.2v reads around 11. Reducing the voltage on the pins to zero yields no change in the first but 0 on the second. These voltages have been tested at the actual pin-body joint of the processor so are the actual pin voltages.Any hints?
Can one pin be blown without affecting the others? I've only ever had a whole port blow before. I had considered the switchover time being too short with no delay before read_adc but the same happens before the second reading and that is "correct".
Any help appreciated!