News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

Faulty (new) PIC18F1320

Started by See_Mos, Apr 06, 2021, 03:02 PM

Previous topic - Next topic

See_Mos

Following on from my previous thread about strange problems when an LCD display was connected to 18F1320.

It looks like all five 18F1320 new old stock devices from batch 03372HM are faulty.

The code is a simple timer.  With a couple of buttons, an LCD display plus an LED connected to RB1 which is turned on soon after power is applied.  The LED should then stay on as long as power is connected but RB1 would turn off at random.  Sometimes the counter would continue but sometimes it would stop at random.

Adding extra code I managed to prove that one particular PIC was resetting randomly, but why did the LED not come back on?

AND before anyone suggests a pullup resistor on MCLRE it is already there along with the diode and capacitor shown in the PicKit guide. All unused pins were set to low output leaving only the two button inputs and they have 4K7 pullup resistors

I then tried programming another new chip but programming failed so I tried another and got different random faults again.  I tried all five with a simple LED flashing code and the devices that I did mange to program all behaved differently.

It began to look like bad connections on the PCB but checking with the oscilloscope showed nothing wrong.

Finally I swapped the 18F1320 for a 16F88 which was in a socket so no soldering required.  Thanks to Proton no rewiring was required either, just changes to the pin declares and the config.  It has been running now for nearly two hours and no amount of disturbance testing will make it falter.

trastikata

What clock source are you using?

tumbleweed

I wonder if it has anything to do with the pon state of the RB5/PGM pin and/or LVP config setting.

I seem to remember something about a few of those old chips requiring the PGM pin to have a pulldown resistor or some such nonsense... can't recall the exact details.

Dompie

The 16F883\886 need during programming the PGM pin connected to the GND otherwise the programming is very unpredictable. This is a silicon error from Microchip. I believe this info was in an errata sheet.

Johan

SebaG

Quote from: See_Mos on Apr 06, 2021, 03:02 PMFollowing on from my previous thread about strange problems when an LCD display was connected to 18F1320.

It looks like all five 18F1320 new old stock devices from batch 03372HM are faulty.

The code is a simple timer.  With a couple of buttons, an LCD display plus an LED connected to RB1 which is turned on soon after power is applied.  The LED should then stay on as long as power is connected but RB1 would turn off at random.  Sometimes the counter would continue but sometimes it would stop at random.

Adding extra code I managed to prove that one particular PIC was resetting randomly, but why did the LED not come back on?

AND before anyone suggests a pullup resistor on MCLRE it is already there along with the diode and capacitor shown in the PicKit guide. All unused pins were set to low output leaving only the two button inputs and they have 4K7 pullup resistors

I then tried programming another new chip but programming failed so I tried another and got different random faults again.  I tried all five with a simple LED flashing code and the devices that I did mange to program all behaved differently.

It began to look like bad connections on the PCB but checking with the oscilloscope showed nothing wrong.

Finally I swapped the 18F1320 for a 16F88 which was in a socket so no soldering required.  Thanks to Proton no rewiring was required either, just changes to the pin declares and the config.  It has been running now for nearly two hours and no amount of disturbance testing will make it falter.

What programmer do you use?

See_Mos

The programmer is a PicKit 2, in this case using Microchip original software.

PGM already has a 10K to VSS and MCLR has 10K to VDD and pin 6 of the programming header is isolated at the PicKit end of the short flying lead that I use for programming.

I have also read this interesting post:-

https://www.microchip.com/forums/m640643.aspx

I haven't given up yet and will test the devices again today


SebaG

#6
I understand. I thought you had a PICkit4 which in its earlier versions tends to kill some chips.
https://ww1.microchip.com/downloads/en/DeviceDoc/ETN37_MPLAB-PICkit4_overshoot_modification.pdf

top204

I've had the PICkit4 kill a few devices when it gets its voltage incorrect. A truly dreadful monstrosity of a programmer!

tumbleweed

QuoteThe programmer is a PicKit 2, in this case using Microchip original software.
Be sure not to use the "autodetect" feature since that can tend to kill chips too.

It's a lot safer to always select the device family manually.