PDA

View Full Version : 18LF4680 on heat



MadAl
- 13th May 2008, 18:16
I have taken up the project of converting a 16LF877 project to a 18LF4680
Programming the bootloader works, as does bootloading the program.
For some strange reason the PIC heats up like crazy when port A0 (which I use for AD conversion) is connected to the battery voltage (LiPo, about 4V). When a series resistor is used, AD works normally. The PIC is driven at 5V
I have disabled all secondary functions (Voltage reference and comparators).
Why is port A0 causing this heat up? Shouldn't it be high impedance when defined as AD channel?

skimask
- 13th May 2008, 18:28
For some strange reason the PIC heats up like crazy when port A0 (which I use for AD conversion) is connected to the battery voltage (LiPo, about 4V). When a series resistor is used, AD works normally. The PIC is driven at 5V
I have disabled all secondary functions (Voltage reference and comparators).
Why is port A0 causing this heat up? Shouldn't it be high impedance when defined as AD channel?

Sounds to me like your A/D ports aren't set up correctly and/or PortA.0 may be output driven low sucking up current...so maybe your A/D isn't set up quite right. Post some code. Maybe you're missing something...
Maybe a short between A.0 and another pin (ground) that is driven low... Most likely not MCLR/E.3, likely choice A.1 since it's right there.

EDIT: Just looked at your other posts... Get a new chip...

Ron Marcus
- 13th May 2008, 19:45
Once you can cook small pieces of toast on a PIC, you will have catastrophic failure in short order. This I know from plugging the programming header in wrong. It worked for a while, drawing more current than usual, then quit. I'd suggest replacing it, and never connecting an I/O directly to a B+ line.Put a 1K resistor in series if necessary. If you are running at 3.3 volts and using a LiPo which can be charged to 4.2 volts, You will stress the diodes beyond their limit. If there is internal damage to the gate or protection diodes, it's a bad thing.

MadAl
- 14th May 2008, 06:08
"EDIT: Just looked at your other posts... Get a new chip... "

Are you saying this PIC means trouble?? Should I find a 'safer' alternative? Any suggestions are welcome!!

I checked for shorts, and no there are none. The PCB is professionally made, not just an experimental setup. And as said, with a series resistor the AD conversion works just fine which would imply the port is set up correctly for the AD.

After the bootloader is in place in a virgin PIC and hooking up the power, the PIC stays cool. But after uploading the program the heat is on. This would imply the error is indeed in the program, not in the PIC or PCB.

The program is big (close to 8k on the 16F877) but I could post the register settings, AD conversion part and port setup. Maybe this will shed some light in the matter.

The PIC power supply is 5V and the voltage on port A0 is anything between 0 and 4.2V (LiPo max.)

Thanks for the suggestions sofar!

sougata
- 14th May 2008, 08:18
"EDIT: Just looked at your other posts... Get a new chip... "

Are you saying this PIC means trouble ?? Should I find a 'safer' alternative? Any suggestions are welcome!!



All I can say is that a PIC has never let me down and I earn my living out of it. Why don't you run only the A/D part of your program and test it out. Also without the full schematic and code it is really hard to comment.

skimask
- 14th May 2008, 12:59
Are you saying this PIC means trouble?? Should I find a 'safer' alternative? Any suggestions are welcome!!
No, just that you heated it up once. It's most likely done for...


The PCB is professionally made, not just an experimental setup.
I've got cars, tv's, water heaters, and a septic system... All of which have been 'professionally made' and/or installed. Guess what? They've all failed at one time or another...


After the bootloader is in place in a virgin PIC and hooking up the power, the PIC stays cool. But after uploading the program the heat is on. This would imply the error is indeed in the program, not in the PIC or PCB.
Sure does. Something tells me that something in the program is turning off the A/D module, setting the pin back to digital mode and setting it low.

Acetronics2
- 14th May 2008, 13:53
Hi,

Just an interesting question ...

which is applied to the pic first ???

The Pic 5V

OR

The LiPo DIRECT 4.3v ???

could easily explain the correct operation with a series resistor ...

coz The clamp diodes surely would not like to power the whole card ...

just to see ... try to place a 1N400x from A0 input to the +5 v ...

my two cents ...


Alain

Ron Marcus
- 14th May 2008, 14:25
Put a 1K resistor in series from the LiPo battery to A.0 PERIOD.It's just safe engineering practice. I don't see a need to post the code, or parse the replies any further.
I have a button read subroutine that must set the pin to an input before reading it. Something in the program, totally unrelated to that pin, is setting it to an output low. Sound familiar? Now, I can go through every subroutine and watch that line to find out EXACTLY what is tripping the pin to be an output, or I can make sure it is an input before I read it. I choose to set it to a known state before I rely on the test. If it is an output, the reading will be unreliable. I won't lose the chip. In your case, you will. If you have the time, go ahead and see what is causing the problem. Connecting any port directly to B+ is a very bad idea.
Ron