Problem with PIC 16F819


+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    Join Date
    Dec 2010
    Posts
    5

    Default Problem with PIC 16F819

    Hi, I have this terrible problem with PIC 16F819, it does not starts up with external or internal oscillators if the supply voltage is 5V regulated. However if I decrease the VDD to 3.4 it starts working aftter about 20 seconds when powered up. I have used PICs 16F84A and 16F628A on the same board they do not have this problem.

    Please help.

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924

    Default

    Welcome to the forum.

    Can you provide more information?
    How is MCLR connected?
    How is the chip configured? (Fuses) (config bits)
    Code?
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Dec 2010
    Posts
    5

    Default

    Thanks Mack, MCLR is connected to VDD through a 10K resistor and also grounded with a bypass ceramic capacitor of 0.1uf. I also placed a big 1000 uf capacitor between ground and 5V line but oscillator still doesnt start at 5V supply but it does if the VDD is reduced to 3.4V. Its behaviour is same if fuse is set to Internal Oscillator with OSCCON and OSCTUNE registers set properly.
    Right now I have loaded the following simplest program for testing:

    DEVICE = 16F819

    WARNINGS 0

    Config HS_OSC, WDT_OFF, PWRTE_OFF, BODEN_OFF, LVP_OFF, CP_OFF, MCLRE_ON
    WARNINGS 1
    XTAL= 12

    ALL_DIGITAL TRUE
    OUTPUT PORTB
    loop:
    PORTB=255
    DELAYMS 500
    PORTB=0
    DELAYMS 500
    GOTO loop

  4. #4
    Join Date
    Dec 2010
    Posts
    5

    Default

    Hello again: Here is an update on this strange chip. I placed the 1000 uF Capacitor on the input side of the 5V regulator as it was not letting the ICSP and placed 0.1 uf ceramic directly on the VSS & VDD pins. It still didn't work at 5 V, I gave it jolt by shorting VDD to ground momentarily, Lo and behold it started to work! ( previously I had 10 uf between VSS and VDD and 0.1 uf on both sides of the 5V regulator and one 0.1uf ceramic directly on VDD and VSS, I had even tried to power it with 9 V battery cells, so dont think anything was wrong with my previous circuit as 16F84A and 16F628A worked fine with that arrangement)

    So now I must give it a jolt every time at start up to make it run. I have uploaded another program that uses LCD and PORTA.3 & PORTA.4 as input switches, this program also works. Next I will try to add small capacitance to OSC/RA6 and see if its external oscillator stabilizes.

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924

    Default

    Sounds like you are getting a handle on it and know what to look for.

    BTW... Are you using Proton? Your code does not look like PicBasic.
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Dec 2010
    Posts
    5

    Default

    Mack: Yes i am using Proton, haven't done any change in the circuit yet but seems I might be able to run it on external oscillator by adjusting capacitors on OSC1 & OSC2 ports. Just realized that the Microchip data sheet says 15 pf on each but I have 22 pf, this maybe the problem but why doesn't it run on internal RC, this has to be figured out.

  7. #7
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924

    Default

    You will probably have better luck on the Proton forum.

    Here is how I would do it with Pic Basic Pro.

    Code:
        DEFINE OSC 4           
        OSCCON = %01100000
        @ __config _CONFIG1, _INTRC_IO & _WDT_OFF & _LVP_OFF & _MCLR_OFF &_CP_OFF
    Dave
    Always wear safety glasses while programming.

  8. #8
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,578

    Default

    Hi, Newbee

    Just open your PIC datasheet @ the OSC section, and you will discover the reset pin need a fast rising signal to act correctly ...
    you also will find correct circuitry to pass by your supply lazyness ...

    in other words, your supply is a bit slow when giving power, and the reset pin must be kept low till the supply voltage is established ...

    that's why power supervisors like MC33064P / TC54 VN xx have been created.

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  9. #9
    Join Date
    Dec 2010
    Posts
    5

    Default

    Acetronics thanks, I tried both things grounding the MCLRE pin while powering it up with battery instead of adopter supply. It didn't work, so I think the chip must be faulty. Whether on external oscillator or internal its behavior doesn't change.

  10. #10
    Join Date
    May 2008
    Location
    Italy
    Posts
    825

    Default

    (From post 4) .....I had even tried to power it with 9 V battery cells
    (From post 9)....so I think the chip must be faulty. Whether on external oscillator or internal its behavior doesn't change.
    What did you expect after the 9 volts test ?


    Al.
    All progress began with an idea

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts