PIC 12C508 reset problem

From: A Beaujean (abeaujean_at_gillam-fei.be)
Date: 11/30/04


Date: 30 Nov 2004 02:11:53 -0800

I am encountering a very strange behaviour on a PIC 12C508A, nominally
powered at 5 Volts.

To alleviate possible brownout conditions in my design, I use a Dallas
DS1233-5 (Microprocessor supervisor) to act on GP3 (MCLR/ pin). The
threshold of the Dallas chip is around 4.5 Volts, way within the PIC
Vcc operating range.

At power up, no problem ever happens : the program ALWAYS performs as
expected, and that may be done flawlessly hundreds and hundreds of
time.

BUT : first tests made on my prototype under simulation of brownout
conditions (just slowly lowering the power supply) and bringing back
Vcc to nominal value showed that the MCLR/ does not reset (completely
?) the chip. The chip appears to hang and it may be pulled out off its
hanging condition ONLY by bringing the PIC Vcc to 0 Volts for more
than 2-3 seconds.

The "hanging" is somewhat particular in the sense that the IOs, some
of which have been put in output mode (things work well at power up),
return to high impedance once MCLR/ has been asserted (this is easily
measured by measuring the output current to Vcc or Ground if any).
BUT, the program never performs again as from power on.

A first look at the Web for similar problems indicates that some
people appear to have alike problems (on other PICs) if the MCLR/ is
asserted while Vcc is going down (which is of course the case when
using a supervisory chip connected on the same Vcc line).

But : more testing showed that even at stable Vcc (+5V), shorting the
MCLR/ pin to ground for any period of time had the same result
(infinite hanging).

I am using a XELTEK SP3000U programmer.

The GP3 pin is programmed as MASTER CLEAR.
Watchdog is enabled.
Internal RC mode is selected.

A more complete reading of the PIC product spec made me think that the
MCLR/ function does not operate correctly in internal RC mode. I thus
decided, for the purpose of testing, to use an external crystal
instead for a while. BUT : same thing !!

I took a few actions:

- additional decoupling at a very short distance of the PIC power pins
: no help.
- additional pullup resistor (10K) to Vcc on MCLR/ : no help

So, what happens ?

There might be a software problem I miss completely, although the
program is very simple.

You will find hereafter part of the program (essentially some
definitions and inits, the body of the program being absolutely
trivial)

Can anyone help ?

OPTION_IN EQU B'11001111' ;

;
OPTION_CF EQU B'11001110'
                           ; configuration
               ; 7 : Disable wake-up on pin change
               ; 6 : Weak pullups disabled
               ; 5 : TMR0 clock source = Fosc/4
               ; 4
               ; 3 : Prescaler --> Wdog
               ; 210 : WDOG Postscaler rate = 1:64 --> WDOG TO
of 1.09 Seconds
TMR0_CF EQU D'38' ; TIMER0 reload value.
;
TRIS_CF EQU B'11111011' ;
;
GPIO_CF EQU B'00000000' ; Valeurs initiales: tout à 0.

        ORG 0
Inits:
;
; Initialisations
;
        clrf STATUS
;
; OPTION sequence recommanded by Microchip
;
        clrwdt
        clrf TMR0
        movlw OPTION_IN
        option
        clrwdt
        movlw OPTION_CF
        option
;
        movlw GPIO_CF
        movwf GPIO
;
        movlw TRIS_CF
        tris GPIO ;
;
; BODY OF PROGRAM
;
        ORG h'1FF'
        goto Inits ; Not using calibration value
        END



Relevant Pages

  • Re: Possible Latchup problem with RS485 transciever
    ... VCC or GND limits? ... the output stage of those switching DC-DC power supplies. ... connection with the circuit. ... It could be a latchup type failure from seeing voltage ...
    (sci.electronics.design)
  • Re: Possible Latchup problem with RS485 transciever
    ... VCC or GND limits? ... the output stage of those switching DC-DC power supplies. ... connection with the circuit. ... It could be a latchup type failure from seeing voltage ...
    (sci.electronics.design)
  • Re: 47uf decoupling caps?!
    ... At the 20 picosecond level you're talking about ... you can get 1/1000 th the bandwidth you need to utilize this chip. ... and TDC jitters in the 25 ps RMS range, ... chip he proposes to use seems to be very Vcc sensitive, ...
    (sci.electronics.design)
  • Re: Momentary Switch Circuit
    ... >Vzener is slightly below Vcc - eg 4.7 volts if Vcc is ... 11 volts if Vcc is 12 volts etc. ... pulse he wanted, but my starting assumptions were a clean, +ve, full ... Noisy switch, detail ...
    (sci.electronics.design)
  • Re: Oops !
    ... Final check before power on - AAAAAAggghhh! ... Then take a millivoltmeter and solidly connect one probe to where VCC hits the board. ... For feeding in use very good coax such as quad shield and lots of toroids slid onto it. ...
    (sci.electronics.design)