Hot!PIC16F630 Power Up Issue

Page: 12 > Showing page 1 of 2
Author
Designer
Super Member
  • Total Posts : 401
  • Reward points : 0
  • Joined: 2007/11/20 20:28:41
  • Location: 0
  • Status: offline
2019/02/04 17:24:35 (permalink)
0

PIC16F630 Power Up Issue

I bought 100pcs of PIC16F630 from aliexpress.But most of them are not working when I switch them from a 230V Power outlet switch feed them via a 5V SMPS.But they are working when I switch the 5V line instead of the power outlet switch.
 
I also tried adding a 7805 via a transformer supply.Same happens,everytime I need to switch 5V side not the 230V side wall switch.
 
Here is my config & setup menu.
 
Any help?
 
__CONFIG _CP & _CPD & _BODEN_ON & _MCLRE_OFF & _WDT_OFF & _PWRTE_ON & _INTRC_OSC_NOCLKOUT

  org 0000h
  clrf STATUS
  clrf INTCON
  goto Set_PORTS
   
  org 0004h
  retfie
    
Set_PORTS nop
  call 0x3FF ; retrieve factory calibration value
  bsf STATUS,RP0 ; B1
  movwf OSCCAL ; update register with factory cal value
  bcf STATUS,RP0 ; B0
  movlw 07h
  movwf CMCON ; turn off comparators
  bsf STATUS,RP0 ; B1
  clrf ANSEL ; digital I/O
  clrf TRISA
  clrf TRISC

#1

39 Replies Related Threads

    Jim Nickerson
    User 452
    • Total Posts : 5735
    • Reward points : 0
    • Joined: 2003/11/07 12:35:10
    • Location: San Diego, CA
    • Status: offline
    Re: PIC16F630 Power Up Issue 2019/02/04 17:38:50 (permalink)
    +1 (1)
    Can you scope the 5V line while you power on the 230V switch ?
    #2
    Bob White
    Super Member
    • Total Posts : 202
    • Reward points : 0
    • Joined: 2010/11/06 19:52:38
    • Location: Denver, Colorado
    • Status: offline
    Re: PIC16F630 Power Up Issue 2019/02/04 17:39:15 (permalink)
    +1 (1)
    What is the rise time of the 5 V output of your switch mode power supply?  What is the rise time of the 5 V when it is switched directly?
     
    What is the rise time of the output of the 7805 regulator when power is switched on at the mains?  What is the rise time when the 5 V is switched directly?
     
    Does the output of your power supply overshoot at turn on?
     
    Schematics and waveforms of the 5 V rail at turn on would be helpful.
    #3
    Jim Nickerson
    User 452
    • Total Posts : 5735
    • Reward points : 0
    • Joined: 2003/11/07 12:35:10
    • Location: San Diego, CA
    • Status: offline
    Re: PIC16F630 Power Up Issue 2019/02/04 17:39:58 (permalink)
    +1 (1)
    And mclr
    #4
    dan1138
    Super Member
    • Total Posts : 2987
    • Reward points : 0
    • Joined: 2007/02/21 23:04:16
    • Location: 0
    • Status: offline
    Re: PIC16F630 Power Up Issue 2019/02/04 19:03:45 (permalink)
    +3 (3)
    There are several other issues that can cause problems on a PIC16F630.
     
    When the factory calibration of the band gap voltage reference gets erased the brown out voltage detect can behave badly. When VDD changes too slowly the PIC can fail to exit brown out voltage reset.
     
    Try turning off the _BODEN_ON configuration bit.
    post edited by dan1138 - 2019/02/04 20:57:27
    #5
    Designer
    Super Member
    • Total Posts : 401
    • Reward points : 0
    • Joined: 2007/11/20 20:28:41
    • Location: 0
    • Status: offline
    Re: PIC16F630 Power Up Issue 2019/02/04 20:10:14 (permalink)
    0
    I owned a DS1052E 50Mhz digital oscilloscope & I'm not sure I can scope the rise rates with this oscilloscope....!!!
     
    I just planning to put external MCLR instead of internal MCLR. Will that be help?
    #6
    Bob White
    Super Member
    • Total Posts : 202
    • Reward points : 0
    • Joined: 2010/11/06 19:52:38
    • Location: Denver, Colorado
    • Status: offline
    Re: PIC16F630 Power Up Issue 2019/02/04 20:40:30 (permalink)
    +3 (3)
    Designer
    I owned a DS1052E 50Mhz digital oscilloscope & I'm not sure I can scope the rise rates with this oscilloscope....!!!



    Uh, really?
     
    Connect the probe tip to Vdd and probe ground to Vss.
     
    Set scope the vertical so that the ground is one division from the bottom of the screen.  Set the vertical to 1 V/division.
     
    Set the horizontal for single sweep at about 1 ms/div and the trigger point one division from the left edge of the screen.
     
    Set the trigger for rising edge with a threshold/level of about 500 mV.
     
    Turn on the power.
     
    Adjust scope settings as needed (such a horizontal time/division) to get a full capture of the rising edge (vertical and horizontal).
     
    I am curious why such basic 'scope operation is a mystery to you.
     
    post edited by Bob White - 2019/02/04 20:46:00
    #7
    Designer
    Super Member
    • Total Posts : 401
    • Reward points : 0
    • Joined: 2007/11/20 20:28:41
    • Location: 0
    • Status: offline
    Re: PIC16F630 Power Up Issue 2019/02/05 10:27:14 (permalink)
    0
    Hi,
     
    I managed to find the solution.There were some clone PICs (not original) in the batch.They are not working & have the power up issues. The attachment shows the Good PICs & Bad PICs.
     
    The good PICs working nicely.Is there any method to check the PIC is original or not..!! otherwise I have to check them one by one :(
    post edited by Designer - 2019/02/05 10:29:11

    Attached Image(s)

    #8
    dan1138
    Super Member
    • Total Posts : 2987
    • Reward points : 0
    • Joined: 2007/02/21 23:04:16
    • Location: 0
    • Status: offline
    Re: PIC16F630 Power Up Issue 2019/02/05 10:57:50 (permalink)
    +1 (1)
    Designer
    I managed to find the solution.
    There were some clone PICs (not original) in the batch.
    They are not working & have the power up issues.

    It is possible that the PIC16F630 you find as "clone" are genuine Microchip parts that were erased and the factory calibrations are lost.
     
    There are two tools made by Microchip, the PICKit1 and PICKit2 that could restore the oscillator calibration. These tools are now obsolete and all but impossible to find genuine Microchip originals.
     
    I do not know of anything that can regenerate the band gap voltage reference calibration.
     
    Looks like you got flim-flammed by aliexpress.
    post edited by dan1138 - 2019/02/05 21:17:17
    #9
    NKurzman
    A Guy on the Net
    • Total Posts : 16886
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: PIC16F630 Power Up Issue 2019/02/05 11:13:16 (permalink)
    +1 (1)
    Buy them from a Reliable Source.
    #10
    crosland
    Super Member
    • Total Posts : 1449
    • Reward points : 0
    • Joined: 2005/05/10 10:55:05
    • Location: Bucks, UK
    • Status: offline
    Re: PIC16F630 Power Up Issue 2019/02/05 13:03:40 (permalink)
    0
    How do you know they are clones?
    #11
    qhb
    Superb Member
    • Total Posts : 8712
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: online
    Re: PIC16F630 Power Up Issue 2019/02/05 14:48:11 (permalink)
    +1 (1)
    The "Good" chips were made in 2005, at the "JK" fab.
    The "Bad" chips were made in 2011 at the "RK" fab.
     
    I don't know where JK or RK are, but just the 6 year gap explains why they look so different.
     
    #12
    NKurzman
    A Guy on the Net
    • Total Posts : 16886
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: PIC16F630 Power Up Issue 2019/02/05 14:54:40 (permalink)
    +1 (1)
    Errata?
    http://ww1.microchip.com/downloads/en/DeviceDoc/80185F.pdf
     
    Bootleg Chips are Not Marked Bootleg.
    #13
    qhb
    Superb Member
    • Total Posts : 8712
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: online
    Re: PIC16F630 Power Up Issue 2019/02/05 15:30:50 (permalink)
    +1 (1)
    NKurzman
    Errata?
    http://ww1.microchip.com/downloads/en/DeviceDoc/80185F.pdf

    So if the regulator output rises a bit, droops, then rises to the full voltage, it could trigger that errata.
    I could well imagine a switch-mode supply doing that when power is first applied to its input.
     
    #14
    Ian.M
    Super Member
    • Total Posts : 13209
    • Reward points : 0
    • Joined: 2009/07/23 07:02:40
    • Location: UK
    • Status: offline
    Re: PIC16F630 Power Up Issue 2019/02/05 19:39:26 (permalink)
    +3 (3)
    Bandgap bits recalibration: https://www.microchip.com/forums/m473188.aspx (see my reply #11 for recovery method using a PICkit 2 and patched PK2DeviceFile.dat)
     
    The same method should work with a PICkit 3 as long as you use its standalone app v3.10, which emulates a PICkit 2: http://ww1.microchip.com/downloads/en/DeviceDoc/PICkit3%20Programmer%20Application%20v3.10.zip  RTFM about reverting to MPLAB mode afterwards!

    --
    NEW USERS: Posting images, links and code - workaround for restrictions.
    I also support http://picforum.ric323.com because this forum is sometimes too broken to use!
    #15
    Designer
    Super Member
    • Total Posts : 401
    • Reward points : 0
    • Joined: 2007/11/20 20:28:41
    • Location: 0
    • Status: offline
    Re: PIC16F630 Power Up Issue 2019/02/05 20:58:23 (permalink)
    0
    Ok thanks everybody.
     
    I read my faulty PIC using PICkit2 & it shows Bandgap "0000". I think here is the problem.
    I followed IAN steps to recover Bandgap values on those chips.
     
    But I'm unable to attach "Recovery Device file" to my PICkit2 V2.61.
     
    I added the below line in the .ini file but nothing asked when I open the pickit2 
     SDAT: Y 

    #16
    Ian.M
    Super Member
    • Total Posts : 13209
    • Reward points : 0
    • Joined: 2009/07/23 07:02:40
    • Location: UK
    • Status: offline
    Re: PIC16F630 Power Up Issue 2019/02/05 21:08:44 (permalink)
    +1 (1)
    So rename the standard one and replace it with the one I provided.
     
    N.B.  adding 
    SDAT: Y

    to the PICkit2.ini file only lets you select .dat files in the same folder as the PICkit 2 program.  There's no file browser to ley you change folders, and no way of selecting anything that's not got a .dat extension. 
     
    Also, I've never tested if the PICkit 3 app accepts SDAT: Y
    post edited by Ian.M - 2019/02/05 21:19:34

    --
    NEW USERS: Posting images, links and code - workaround for restrictions.
    I also support http://picforum.ric323.com because this forum is sometimes too broken to use!
    #17
    Designer
    Super Member
    • Total Posts : 401
    • Reward points : 0
    • Joined: 2007/11/20 20:28:41
    • Location: 0
    • Status: offline
    Re: PIC16F630 Power Up Issue 2019/02/05 21:18:57 (permalink)
    0
    Hi, Is this correct? or It should have only 1 DAT file?

    Attached Image(s)

    #18
    qhb
    Superb Member
    • Total Posts : 8712
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: online
    Re: PIC16F630 Power Up Issue 2019/02/05 21:22:24 (permalink)
    +2 (2)
    That means Ian's file has the wrong extension.
    I HATE that Windows setting that hides known file extensions. Turning it off is the first thing I do on a new PC.
     
    #19
    Ian.M
    Super Member
    • Total Posts : 13209
    • Reward points : 0
    • Joined: 2009/07/23 07:02:40
    • Location: UK
    • Status: offline
    Re: PIC16F630 Power Up Issue 2019/02/05 21:33:15 (permalink)
    +1 (1)
    The forum doesn't let you attach .dat files.  Its got a notepad icon, so its almost certainly been saved with the extension .txt.  The PICkit 2 app can only use device files with the extension .dat
     
    Turn off 'Hide extensions for known file types' (or whatever they call that setting in more recent windows versions) in windows folder options so you can see the extensions for all fie types then rename the file I provided to
    PK2DeviceFile.1.62.14.BG Recovery.dat

    if you are using SDAT: Y
    Only use the name PK2DeviceFile.dat if you aren't using SDAT: Y, and don't forget to rename the original PK2DeviceFile.dat first to PK2DeviceFile.dat.std to keep it so you can revert to normal afterwards.
    post edited by Ian.M - 2019/02/05 21:34:57

    --
    NEW USERS: Posting images, links and code - workaround for restrictions.
    I also support http://picforum.ric323.com because this forum is sometimes too broken to use!
    #20
    Page: 12 > Showing page 1 of 2
    Jump to:
    © 2019 APG vNext Commercial Version 4.5