Thanks for your reply. Here is my schematic:Please post a detailed schematic of your design.
I don't have ICD pins connected, as space is very limited (and I've never actually tried ICD). The PIC sits in a socket and is removed to program. The schematic is complete, unless there is an error I have not found (I have checked pretty carefully for mistakes or shorts).I can't detect critical points in the schematic, but may be it's incomplete or the real circuit doesn't comply with the schematic.
I presume, you have also ICD pins connected.
You haven't given 5V to the MCLR pin (5th pin) can't that be a problem?
Maximum current sunk by PORTA ................................................................100 mA
Maximum current sourced by PORTA ...........................................................100 mA
Maximum current sunk by PORTB ................................................................100 mA
Maximum current sourced by PORTB ............................................................100 mA
For the A/D converter to meet its specified accuracy, the
charge holding capacitor (CHOLD) must be allowed to
fully charge to the input channel voltage level. The analog
input model is shown in Figure 12-2. The source
impedance (RS) and the internal sampling switch (RSS)
impedance directly affect the time required to charge the
capacitor CHOLD. The sampling switch (RSS) impedance
varies over the device voltage (VDD), see Figure 12-2.
The maximum recommended impedance for analog
sources is 10 kΩ. As the impedance is decreased, the
acquisition time may be decreased. After the analog
input channel is selected (changed), this acquisition
must be done before the conversion can be started.
Recommended Impedance of Analog Voltage Source 2.5kΩ
Note 4: Maximum allowed impedance for analog voltage source is 10 kΩ. This requires higher acquisition time.
My measurements were perhaps a little less than this, but, as you very rightly say:(5V - 1.7V)/220Ω = 15mA per segment
15mA x 7 segments = 105mA current sunk by PORTA
... and I really have absolutely no reason to be pushing it so hard (I just need to invest in a better range of resistor values)! Given that I did see an "8.x" shortly before death (8 segments including decimal point), this is looking a bit ominous.In any event it is generally not prudent to push a device close to its absolute maximum ratings.
Thank you -- I hadn't been able to find this information and didn't realise the requirement would be quite so low. I'll fix this.The voltage divider, R7 (10kΩ) and R8 (47kΩ), implemented in the current design exceeds the recommended source impedance (Rs) of the PIC16F88 ADC module.
I had just been shutting my eyes and crossing my fingers regarding the lack of decoupling caps. However, now that you mention it, I could squeeze a little 100nF SMT cap in there... so that ought to help matters.A bypass/decoupling capacitor of typically value 100nF should be connected across the VDD and VSS pins to ensure stable operation.
P.S. The addition of an active D.P., an eighth segment, could cause PORTA to exceed its absolute maximum current sunk rating even if the VF = 2V.
(5V - 2V)/220Ω ~ 14mA per segment
14mA x 8 segments = 112mA current sunk by PORTA
Concerning the bypass/decoupling capacitor, they can be often connected under an IC socket. :wink:
I have always been confused by this. In my code, I ensure these are disabled. However, I now notice that the PICkit 2 software has its own settings. How can these be different from the values in my code? Which values are actually used?There is a possibility the Code Protection or Write Protection bits have been set.
my recommendation would be to disable all code and write protection settings within your code and PICkit programming application.
If code or write protection is set, you should be able to erase the entire device and then reprogram it.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?