• AVR Freaks

Hot!PIC16F1519 - brownout test problem

Author
AzzolinS
New Member
  • Total Posts : 7
  • Reward points : 0
  • Joined: 2019/11/11 07:05:57
  • Location: 0
  • Status: offline
2019/11/14 06:29:51 (permalink)
0

PIC16F1519 - brownout test problem

Hi All. I'm using PIC16F1519 with ceramic resonator 16Mhz. I'm finding problem with a single production batch, 1720BM2, with this batch i have brownout problem; when i try to turn on-off fastly
my system, sometime PIC doesn't start, it looks it cannot run even the first code row. To note that:
-my configuration bits includes HS type.
-with the same external components, other batches of 16F1519 work properly.
-i'm using the same ceramic resonator from years.
-to solve the problem i've tried different models of ceramic resonators, as well as external oscillator, but no improvement appears.
-if i use internal oscillator, all work properly.
That's why i've focused my attention on OSC1 port. I'v tried to implement/modify watchdog timer, BORV25 or BORV19, and clock switching routine
including adding resistors between resonator and PIC, but without effect. I've found also a silicon errata that may concerns my problem, but nothing solve it.
I'm hardware specialist, i cannot do big modify in software code, also the same software had worked perfectly for many years.
So, did someone meet similar problem? Any hint to fix it?
 
So i'm very confused.
Thanks for any help/hint.

Attached Image(s)

#1

10 Replies Related Threads

    DeutcheN
    Super Member
    • Total Posts : 121
    • Reward points : 0
    • Joined: 2010/09/01 12:35:40
    • Location: DM43BH
    • Status: offline
    Re: PIC16F1519 - brownout test problem 2019/11/21 09:38:44 (permalink)
    0
        Hello, please share your schematic.  In particular the Oscillator circuit to the micro as well as your power, Vdd and MCLR circuit.
     
      Also, please share your code.
     
       
    #2
    AzzolinS
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2019/11/11 07:05:57
    • Location: 0
    • Status: offline
    Re: PIC16F1519 - brownout test problem 2019/11/25 03:46:35 (permalink)
    0
    Hello.
     
    About code, i think i can only send you fuses :

    // 16 MHz

    #include <16F1519.h>
    #device *=16
    #device ADC=10
    #define CLK16 // CLK4,CLK8,CLK16 internal clock selection


    #ifdef CLK4 #define CLKF 4000000
    #endif
    #ifdef CLK8 #define CLKF 8000000
    #endif
    #ifdef CLK16 #define CLKF 16000000
    #endif

    #define BAUD 19200 //9600,19200,38400
    #use delay(clock = CLKF)

    // COMPILERS VARIABLES

    //#define INTOSC // Internal oscillator
    #define PROTECTION // code protection
    #define BUS_COM
    //#define LED_1
    #define SW_1
    //#define P12_COM_A
    //#define TIMING
    #define DMAX 10



    //1519
    //////// Fuses: LP,XT,HS,RC,INTRC_IO,ECL,ECM,ECH,NOWDT,WDT_SW,WDT_NOSL,WDT
    //////// Fuses: PUT,NOPUT,NOMCLR,MCLR,PROTECT,NOPROTECT,NOBROWNOUT
    //////// Fuses: BROWNOUT_SW,BROWNOUT_NOSL,BROWNOUT,CLKOUT,NOCLKOUT,NOIESO
    //////// Fuses: IESO,NOFCMEN,FCMEN,WRT,WRT_2000,WRT_200,NOWRT,VCAP,NOVCAP
    //////// Fuses: NOSTVREN,STVREN,BORV25,BORV19,LPBOR,NOLPBOR,DEBUG,NODEBUG
    //////// Fuses: NOLVP,LVP

    #ifdef INTOSC
     #fuses INTRC_IO
    #else
     #fuses HS
    #endif



    #ifdef PROTECTION
     #fuses BROWNOUT, BORV25, PUT, WDT, NODEBUG, NOLVP, NOSTVREN
     #fuses PROTECT, WRT_2000
    #else
     #fuses BROWNOUT, BORV25, PUT, WDT, NODEBUG, NOLVP, NOSTVREN
     #fuses NOPROTECT, NOWRT
    #endif


    // costant parameters
    #define VER 0x29
    #define MCTYPE 0x52
    #define DEBUG

    #ID VER

    Thanks for help.
    #3
    AzzolinS
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2019/11/11 07:05:57
    • Location: 0
    • Status: offline
    Re: PIC16F1519 - brownout test problem 2019/11/25 03:48:30 (permalink)
    0
    Here it is the schematic:

    Thanks. 
     

    Attached Image(s)

    #4
    ric
    Super Member
    • Total Posts : 25225
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: PIC16F1519 - brownout test problem 2019/11/25 04:14:05 (permalink)
    +1 (1)
    Just one comment.
    It would have been better to put one bypass capacitor next to EACH pair of power pins.
    It's impossible to use one cap on both pairs AND keep all the traces short.
     

    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!
    #5
    Nikolay_Po
    Super Member
    • Total Posts : 1935
    • Reward points : 0
    • Joined: 2012/04/01 13:49:27
    • Location: Russia, Novorossiysk
    • Status: offline
    Re: PIC16F1519 - brownout test problem 2019/11/25 07:29:39 (permalink)
    0
    If the consumption allows some margin of supply voltage, try to add 22 Ohm resistor in series with L1. Or replace L1 by a jumper or a resistor which is appropriate (the resistor is better).
    I dislike the circuits with both inductor and capacitor but without a resistance to damp their oscillations. In your particularly circuit there may be ~70kHz ringing after power bus supply connection. And the regulator may behave not as expected under 70kHz pulses.
    I may be completely wrong and the regulator may damp the ringing. But It worth to check what is at the Vin of U1.
    #6
    AzzolinS
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2019/11/11 07:05:57
    • Location: 0
    • Status: offline
    Re: PIC16F1519 - brownout test problem 2019/11/26 09:05:59 (permalink)
    0
    @ Ric: well noted. Anyhow, i try to add a capacitor closer (around 5mm) to pin 28-29 (now it's near pin 6-7) but it did not influence my situation.
     
    @Nikolay: i've tried to add 22 Ohm resistor in series with L1, but no effect. My Vin is 12.0V.
     
    As experiment, i've tried to use resonator 4Mhz, by now it looks working properly. But i cannot use 4Mhz (because of serial use with fixed baud rate). Any idea about why with 4Mhz runs ok, and 16Mhz not? It's not the resonator defective itself, because i've test different brands, also external oscillator by Abracom. 
    #7
    coffee critic
    Super Member
    • Total Posts : 385
    • Reward points : 0
    • Status: offline
    Re: PIC16F1519 - brownout test problem 2019/11/26 09:54:17 (permalink)
    0
    Are the caps you show on the ceramic resonator circuit additional cap or the ones that are built into the package?  Remove them if they are added. 
     
    Attach a scope shot of the both oscillator pins.  It would be good to see the amplitude and shape of the waveform. 

    n_*$
    #8
    AzzolinS
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2019/11/11 07:05:57
    • Location: 0
    • Status: offline
    Re: PIC16F1519 - brownout test problem 2019/11/28 09:09:37 (permalink)
    0
    @ Coffee critic:
    Caps are built into. Attached i send OSC1 and OSC2 waveshape, i think they are ok (reference to GND).
     
    Doing this test i've noted and when i put my probe with OSC1, my problem seems to disappear (while when put to OSC2 no difference). I know the probe has capacitance/impedance (should be 15pf), i've try to put 18pf between OSC1 and GND nearest to resontor; it looks to work better, but still not completely ok. Now i don't have 15pf, i'll buy soon for test.
    Anyway, can 15pf between OSC1 and GND be useful? And why? As said by Coffee Critic, external capacitor to ceramic resonator should have no use, or even creating problems.

    Attached Image(s)

    #9
    AzzolinS
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2019/11/11 07:05:57
    • Location: 0
    • Status: offline
    Re: PIC16F1519 - brownout test problem 2019/12/10 02:48:29 (permalink)
    0
    I've tried with 15pF between OSC1 and GND, it works a little better, but still not completely solved.
    #10
    AzzolinS
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2019/11/11 07:05:57
    • Location: 0
    • Status: offline
    Re: PIC16F1519 - brownout test problem 2019/12/19 03:56:21 (permalink)
    0
    Hi All. It looks i've fixed my problem with this RC add (see image). 
    But does someone knows why this RC fix OSC1 problem? Any theory?
     
    Thanks. 

    Attached Image(s)

    #11
    Jump to:
    © 2020 APG vNext Commercial Version 4.5