What about if you add some clamping diode, but instead of sending them to Vdd, send them to Vref... well a buffered Vref.
What about if you add some clamping diode, but instead of sending them to Vdd, send them to Vref... well a buffered Vref.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hi, Steve
Good idea ... I've placed a low-leakage BAW62 ... hope my TL431 ref. will agree !!!
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Hi, pros
One more 18F2520 Out of use after 30 Hours of good work, like the others, and still the same AN2 ADC input leakage current tremendously increasing. ( I repeat here AN1 has EXACTLY the same input circuit : a LM335 fully filtered and clamped : a 10k resistor in series ...).
EVERYTHING has been carefully verified ... Even Microchip gurus didn't have anything to reply ...
another " damaged " circuit has been continuously running for more than a year ... all other analog inputs are still Ok !!!
Has anyone a little idea ???
Date Markings are 07204AY ...
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Alain
I'm not sure if just powering off and on the PIC would solve your problem. Most likely it would if the input protection got clamped on a spike and stayed stuck(latched). I've seen similar behaviour in other hardware with input protections and the usual way to recover was a power cycle. Is it possible for you to rule that out?
Jerson
Is there any possibility that the CVRCON register is getting modified somewhere along the way?
Either intentionally ... CVRCON = %11000000
or Unintentionally ... if you have ASM in your program and are in the wrong bank when writing to address B5.
If the CVref is turned on, and the CVROE bit is set, the CVref will output on RA2/AN2/VREF-/CVREF.
<br>
DT
Hi, Darrel and Jerson
CVRCON would be a good Idea ... but it is cleared at each power-up, and there's no asm ... other than DT Instant interrupts !
but the ADC still works ( it follows input, but as if a ghost divider was placed : for 3.4 v @ sensor input it "sees " 2.28v - confirmed by the voltmeter placed on the input pin )
Now, after a power down, the problem comes back , first times after ~ half an hour, then quicker and quicker ... and finally at power up and continuously.
if re-programming the device ... the problem still is here.
Note the problem only occurs after ~ 30 Hours of work ... whether the chip stays in sleep mode ( 400 Hours ) or powered down.
May be I should try another chip ... a 2580 i.e. ...
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Repeated failure after a fixed duration suggests stack problem to me. I can suggest you check the nesting levels in your code and if you have sufficient stack left over for interrupts use. Due to stack failure, the program could be returning to a wrong location and somehow modifying the CVRCON register and turning the AN2 port to output VREF. There may be other symptoms that accompany this.
Hi, Jerson
as the AN2 input permanently stays "damaged" after some times ... I do not think it could be a stack or soft problem ...
as I wrote : re-programming the chip do not solve the issue ...
let's say the program continue to run pretty fine, of course excepting what relies to AN2 input ...
I must make some tests with RA2 as digital input/output ... just to try to see if something abnormal and verify if it is in the ADC input multiplexer or in the clamping diodes that the problem is ...
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks