Runing a PIc16F876A


Closed Thread
Results 1 to 9 of 9
  1. #1
    Join Date
    Sep 2006
    Posts
    747

    Default Runing a PIc16F876A

    HI am having problem working with a PIc16F876A (and PIc16F877A) it compiles but nothing is happening, Its a simple led blinking. Oscillation is running good too..

    @ DEVICE PIC16F876A , HS_OSC , WDT_OFF , PWRT_ON , BOD_ON , LVP_OFF , PROTECT_OFF
    'HS 20mhz, watchdog off, powerup timer on, mclr external, brown out detect on, low volt program off , code protect off
    DEFINE OSC 20
    INCLUDE "modedefs.bas"
    TRISC =0
    loop:

    portc.3=1 'Blink led
    pause 300
    portC.3=0
    pause 300

    goto loop
    end

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Something is bad in your hardware or PicProgrammer, it's working here.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Same project . . .

    Hello,
    I am asuming this is the same temp monitor you have been working on and as such I am also asuming it is running off the 9v battery, anyway what I was thinking was . . . you have set BOD_ON . . . maybe your power supply voltage is too low to run that way.
    JS

  4. #4
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    To confirm the pic is programmed try reading it back and dumping the HEX to a file, and then read that file in notepad. If that's fine then as Steve has varified the code works it must be hardware related

    1) - check that you are using the correct crystal for timing
    2) - check that the two capacitors are the correct values for that crystal (33pf - 22pf)
    3) - check that the supply voltage is regulated to 5v (5.5v max)
    4) - place a 0.1uF decoupling capacitor accross the supply as close to the PIC as possible.

  5. #5
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    I removed the Bod_on,
    the input to the chip is 4.97 v.

    I posted a picture of my circuit here,
    there is little blue wire near the Lm7805, its not connected to anything, I blew on it and it rolled off the breadboard

    http://www3.sympatico.ca/lerameur/

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    MCLR pin must be set High, not Low...

    Keep your Crystal capacitor pins as short as possible. Most of the time you can remove them when using a breadboard.... the breadboard capacitance is often enough.
    Last edited by mister_e; - 7th January 2007 at 12:50.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  7. #7
    Join Date
    Feb 2003
    Location
    Salt Lake City, Utah USA
    Posts
    517


    Did you find this post helpful? Yes | No

    Smile

    pin 1 MCLR appears to be connected to GND - try moving it to +5 V

    EDIT - as always, Steve beat me by a couple minutes
    Paul Borgmeier
    Salt Lake City, UT
    USA
    __________________

  8. #8
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    a my ,all this time for a MCLR on low... I looked at it so many times...
    its Working on high.
    Thank you

  9. #9
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    ............. Sorry
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Replies: 4
    Last Post: - 15th January 2016, 12:23
  2. Problem runing my code
    By Mus.me in forum mel PIC BASIC Pro
    Replies: 33
    Last Post: - 1st December 2009, 20:36
  3. Migrating PIC16F876a to PIC18F252
    By cohenjdc in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 1st June 2007, 13:55
  4. PLEASE HELP ME! pic16f876a and AD tlc4541
    By luca_sheva in forum mel PIC BASIC
    Replies: 1
    Last Post: - 1st February 2005, 17:32
  5. how to get PCF8574 and PIC16F876A work together
    By nomada in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th December 2004, 02:07

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

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