• AVR Freaks

PIC12F1840 not starting up

Author
CalmOne
New Member
  • Total Posts : 2
  • Reward points : 0
  • Joined: 2020/09/21 13:22:10
  • Location: 0
  • Status: offline
2020/09/21 19:28:11 (permalink)
0

PIC12F1840 not starting up

Produced a batch of boards using PIC12f1840 MCU's after successful testing of a prototype. About half of them work while the other half don't. Regular expected operation is for the device to send SPI messages continuously after boot. However, the PIC seems stuck and no messages are being sent for half the devices. Here are the troubleshooting tests I performed.
1) MCLR = enabled
- When powered up MCLR pin is low when measured with DMM. (On the good devices, the pin however, its high).
- Connecting Pickit3 makes it start working. Continues to work normally after removal of Pickit3. MCLR pin stays high after removing Pickit3 and everything seems normal.
2) MCLR = Disabled (set as input with internal weak pull up)
- When powered, it still doesn't work. MCLR pin is low when measured with DMM.
- Connecting Pickit3 makes it start working. Continues to work normally after removal of Pickit3. MCLR pin stays high after removing Pickit3.
3) MCLR = Disabled (set as input with internal weak pull up) AND connected MCLR(RA3) pin to VDD.
- When powered, its till doesn't work. MCLR pin is HIGH when measured with DMM.
- While its still powered up, disconnecting MCLR pin from VDD does nothing but MCLR pin goes low when measured with DMM.
- While its still powered up, disconnecting then reconnecting the MCLR pin from VDD makes it start working again and MCLR pin goes HIGH. MCLR pin stay high at this point even after disconnecting it from VDD.
4) Created a dummy test program with everything disabled and code to toggle each of the pins. However, I experience the same issues as above. the toggling of the pins only works when toggling the MCLR pin. Therefore, I'm ruling out SPI issues.
5) Replaced the bad MCU's with a new one and it started working normally.
6) Another major issue is some of the good working MCU's start behaving this way after some time and never to return to their good working condition.
 
-----
In all cases a momentary short between MCLR and VDD causes a "reset" where the device starts to operate normally. There is a weak internal pull-up which doesn't help. I even pulled MCLR to VDD directly, but device doesn't start at power up. Only when I toggle MCLR does it start working after power up.
 
Am I missing something in hardware or software setup?
Could there be ESD damage?
These components were procured and assembled by an assembler in China. Could they be counterfeit MCU's?
Is my Pickit3 causing the damage/issue?
 
Circuit --> https://ibb.co/fk35Vv2
// CONFIG1
#pragma config FOSC = INTOSC
#pragma config WDTE = OFF
#pragma config PWRTE = ON
#pragma config MCLRE = OFF
#pragma config CP = OFF
#pragma config CPD = OFF
#pragma config BOREN = ON
#pragma config CLKOUTEN = OFF
#pragma config IESO = ON
#pragma config FCMEN = ON
// CONFIG2
#pragma config WRT = OFF
#pragma config PLLEN = OFF
#pragma config STVREN = ON
#pragma config BORV = LO
#pragma config LVP = OFF

Attached Image(s)

#1

1 Reply Related Threads

    ric
    Super Member
    • Total Posts : 28629
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: offline
    Re: PIC12F1840 not starting up 2020/09/22 14:20:53 (permalink)

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #2
    Jump to:
    © 2020 APG vNext Commercial Version 4.5