Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Intermittent working PICs

Status
Not open for further replies.

camerart

Well-Known Member
Hi,

Has anyone experienced PICs that work unpredictably or intermittently?

I'm using 18F2431 PICs, programmed in Oshonsoft, and programmed with Pickit2 V2.61.

These PICs need to have certain pins connected to program them, so have a dedicated programming socket. When there is a problem, I >choose the program>Program PIC>erase PIC>blank check>re-program PIC>verify PIC. (I use this sequence if I suspect programming issues)

I have a number of PICs, one works 'nearly' every time, and all of the others don't. I've tried 10s of times, changing them, re-programming, all with the same result.

Does anyone have any ideas what's going one?

Camerart.
 
Last edited:
Hola,

Maybe it is software, not HW. Do they come from salvaging components?

I would try to see what they have (or not) in common.

Have you checked if each micro has a specific flaw? Do the failure pattern repeats?

Had I more of them available I would start afresh with three (really) new ones and see if the failure pattern repeats. If pattern at all.
 
Hi Atferarri and Ian,

To clarify, I've tried 4 new PICs 10s of times.

I'm using the internal oscillator, not XTL.

Camerart.
 
Do you have some I/O port pins which are floating? ie not connected to anything.
Are any of those pins configured as inputs?
Can any of those inputs create an interupt?

I once had a problem with a 16F84 which would stop working at random times.
The problem was that I had some unused PORTB pins configured as inputs and left floating, and any pin on PORTB was set to create an interupt.

The fix was to add some 10k pull-down resistors on the two unused pins.
A better way is to ensure that all unused port pins are set as outputs and do no have interupts enabled,

JimB
 
Hi C,
As you know the 18F2431 has these two extra AVdd and AVss [ +V and 0V respectively] pins, many Prommers do not have these two pins internally connected, also pin #26 PGM has to be at 0V.
The option we discussed some time ago was to modify our Prommer's, mine is a PICStart+.

To avoid modifying the Prommer I added the extra links to a 28 turned pin IC socket, I insert the PIC into the socket and then the socket into the prommer, it works every time OK.

I suspect your problems with the 18F2431 are due to your Prommer.

Eric
 
Excess capacitance on wire to ICSP pins can give problems. keep wire length to minimum , power all PIC Vdd / Vss pins also USBv if it has one. don't forget 0.1uF bypass caps .
 
As granddad said above - make sure you use a minimum of a 0.1uF bypass cap between the power pins as close to them as you can get. Strange things happen when you run PIC microcontrollers without bypass capacitors.
 
I had a problem with erratic behavior -- some chips seemed to work while others didn't.

The biggest problem was in initialization of the hardware EUSART. I did something out of sequence. Sometimes it started fine; sometimes it didn't, and I got gibberish. The second problem was my RAM (both common and general purpose) that had various flag registers. They were not always cleared on programming, or at least they didn't appear to be. I added a routine to clear all ram during processor set-up and everything started working smoothly with all of the chips I had tried, even the ones that didn't seem to work before.

John
 
Hi C,
As you know the 18F2431 has these two extra AVdd and AVss [ +V and 0V respectively] pins, many Prommers do not have these two pins internally connected, also pin #26 PGM has to be at 0V.
The option we discussed some time ago was to modify our Prommer's, mine is a PICStart+.

To avoid modifying the Prommer I added the extra links to a 28 turned pin IC socket, I insert the PIC into the socket and then the socket into the prommer, it works every time OK.

I suspect your problems with the 18F2431 are due to your Prommer.

Eric

Hi Eric,

I have a couple of IC sockets, wired as we discussed some time ago for programming. The PICs are programming, as I have added a LED into the 'LOOP' which flashes at start-up, also a TOGGLE LED that works once running, but only on the 'GOOD' PIC.

As I have one working PIC, I haven't tried programming it again. (I want to keep one working) This PIC verifies ok.

Camerart.
 
As granddad said above - make sure you use a minimum of a 0.1uF bypass cap between the power pins as close to them as you can get. Strange things happen when you run PIC microcontrollers without bypass capacitors.

I have 0.1uF caps also a large one EDIT: 470uF at the Power connections to the PICS. The wires are as short as possible.

Camerart.
 
Last edited:
Does PIC fail during detecting / programming or verify are you using PicKit2 standalone SW , where is PIC power coming from during burn ?
 
Camerart wrote:
Has anyone experienced PICs that work unpredictably or intermittently?
It is possible that I, and maybe others, have misinterpreted your description of the fault.
Is the problem:

A. The PIC burns correctly, but the program will not run reliably every time it is switched on, or runs OK and then does wrong things.

or

B. The PIC does not burn correctly sometimes, and so the program never runs at all in those badly burned PICs.

Please clarify.

JimB
 
Does PIC fail during detecting / programming or verify are you using PicKit2 standalone SW , where is PIC power coming from during burn ?

Hi Grandad,

I have clarified post #1. The power for the Pickit2 comes from the USB socket.

Camerart.
 
Hi camerart , OK Pickit2 on USB power...and 5 wires connect to PIC18F2431 is that it.... or do you have any external power to PIC in your program socket ?

Reason , Had problems with PIC24 , would program OK ...but not verify using Programmer power ,(PK3) had to supply external power to PIC. all was well..
 
Camerart wrote:

It is possible that I, and maybe others, have misinterpreted your description of the fault.
Is the problem:

A. The PIC burns correctly, but the program will not run reliably every time it is switched on, or runs OK and then does wrong things.

or

B. The PIC does not burn correctly sometimes, and so the program never runs at all in those badly burned PICs.

Please clarify.

JimB

Hi Jim,

There have been programming issues in the past, that sometimes happen when 'say' the wrong PIC is chosen then corrected. Once cleared, any problem goes away for months.

I'm guessing that the PICs are being programmed ok, but as suggested perhaps and interrupt is being triggered.

The program was mainly written, by a better programmer than I am, setting all of the necessary registers.

There are LED flashes in the program to help with diagnosis, the first runs ok, and there is an output to a Terminal screen that also works, then nothing.

Camerart.
 
Hi camerart , OK Pickit2 on USB power...and 5 wires connect to PIC18F2431 is that it.... or do you have any external power to PIC in your program socket ?

Reason , Had problems with PIC24 , would program OK ...but not verify using Programmer power ,(PK3) had to supply external power to PIC. all was well..

As mentioned in #1 All verifies ok. (And as mentioned starts to run) No external power.
 
camerart . change of direction.... so PIC programs and verifies, but has running issues... WDT enabled or disabled ?

Edit 2 you say " No external power " at all ?

Edit 1 . I would still only program using external power...
 
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top