trouble with my 16f84a


Closed Thread
Results 1 to 27 of 27

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    pin 4= POSITIVE with 47k resistor

    pin 5= NEGATIVE

    PIN 6 AND 7= LEDs with 470 ohm resistors(and yes, the polarity is correct)

    pin 14 =positive

    pin 15 and 16 =crystal with two 22 pf caps attached to ground
    I have never seen a 47K resistor on reset pin! Tray a 10K

    Pin 5 negative? , surely you mean ground !

    crystal with two 22 pf caps attached to ground (4 MHz?)

    In your program modify pause to 5000, then with a DVM measure port pins. If you see both pins turning on & off then you have a bad ground or a bad resistor or a bad led connected to the led that doesn't work. On the other hand if you don't see the +5 volts ont both pins than you have a bad pic.

    Appart from that I don't see reason for your leds not blinking.

    Al.
    Last edited by aratti; - 30th November 2008 at 07:28.
    All progress began with an idea

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Lightbulb

    Hi, Shawn

    Could you post your HEX code ( not Basic ! ) ???

    I think it's the only way to verify what you put into your Pic ... ( Mr de la Pallice dixit )

    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 " !!!
    *****************************************

  3. #3
    Join Date
    Nov 2008
    Location
    Columbus, OH, USA
    Posts
    12


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by aratti View Post
    I have never seen a 47K resistor on reset pin! Tray a 10K

    Pin 5 negative? , surely you mean ground !

    crystal with two 22 pf caps attached to ground (4 MHz?)

    In your program modify pause to 5000, then with a DVM measure port pins. If you see both pins turning on & off then you have a bad ground or a bad resistor or a bad led connected to the led that doesn't work. On the other hand if you don't see the +5 volts ont both pins than you have a bad pic.

    Appart from that I don't see reason for your leds not blinking.

    Al.

    For this particular PIC at least , it seems to be the norm to use a 47k resistor. The crystal is 4 mhz. And yes,I meant ground:P
    I tried what you recommended , and checked the pins.I am getting a very tiny voltage value ( the last was 35.6 mV.).I've got a feeling I have a couple of bad chips, unless someone can think of another reason for this

    Alain I'm going to post the Hex listing here of the most recent wink program.Thanks for taking a look at it.

    :1000000028288F018E00FF308E07031C8F07031CEA
    :10001000232803308D00DF300F2003288D01E83EB8
    :100020008C008D09FC30031C18288C070318152838
    :100030008C0764008D0F15280C181E288C1C222894
    :1000400000002228080083130313831264000800B1
    :1000500006148316061083128610831686108312E8
    :1000600013308F008830022006108316061083128A
    :10007000861483168610831213308F008830022076
    :060080002828630041285E
    :02400E00FD3F74
    :00000001FF

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by cavity creep View Post
    For this particular PIC at least , it seems to be the norm to use a 47k resistor.
    ???
    Do you mean 4.7K
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Nov 2008
    Location
    Columbus, OH, USA
    Posts
    12


    Did you find this post helpful? Yes | No

    Default

    Yes I did.Apologies for the typos.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by cavity creep View Post
    Yes I did.Apologies for the typos.
    Darn, that probably would have been the problem.

    I do not have an 84A to test your HEX with, but I can say the fuses are correct.
    I do not think it will make a difference, but you may try setting the WatchDogTimer to OFF??
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    Nov 2008
    Location
    Columbus, OH, USA
    Posts
    12


    Did you find this post helpful? Yes | No

    Default

    Would you believe that did the trick?????

    Thanks you so much! Can you give a little insight into what exactly is going on with the timers?I'm certain I'll run into this again.

    Thanks again to everybody for their insight

    Shawn

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


    Did you find this post helpful? Yes | No

    Default

    The data sheet says it best. If not, let us know.
    6.10 Watchdog Timer (WDT)
    The Watchdog Timer is a free running On-Chip RC
    Oscillator which does not require any external
    components. This RC oscillator is separate from the
    RC oscillator of the OSC1/CLKIN pin. That means that
    the WDT will run even if the clock on the OSC1/CLKIN
    and OSC2/CLKOUT pins of the device has been
    stopped, for example, by execution of a SLEEP
    instruction. During normal operation, a WDT time-out
    generates a device RESET. If the device is in SLEEP
    mode, a WDT wake-up causes the device to wake-up
    and continue with normal operation. The WDT can be
    permanently disabled by programming configuration bit
    WDTE as a '0' (Section 6.1).
    6.10.1 WDT PERIOD
    The WDT has a nominal time-out period of 18 ms, (with
    no prescaler). The time-out periods vary with
    temperature, VDD and process variations from part to
    part (see DC specs). If longer time-out periods are
    desired, a prescaler with a division ratio of up to 1:128
    can be assigned to the WDT under software control by
    writing to the OPTION_REG register. Thus, time-out
    periods up to 2.3 seconds can be realized.
    The CLRWDT and SLEEP instructions clear the WDT
    and the postscaler (if assigned to the WDT) and prevent
    it from timing out and generating a device
    RESETcondition.
    The TO bit in the STATUS register will be cleared upon
    a WDT time-out.
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. Code works on 16F84A but not on 16F88?
    By pharaohamps in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 6th November 2009, 19:29
  2. MCLR causing trouble . .
    By shahidali55 in forum General
    Replies: 10
    Last Post: - 21st December 2007, 13:20
  3. ICSP using a 16F84a to program 24CXX
    By aftab in forum mel PIC BASIC
    Replies: 26
    Last Post: - 8th April 2007, 12:39
  4. 16F84A and Optrex LCD
    By coyotegd in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 17th October 2005, 17:08
  5. RS 485 using 16F84A
    By ngeronikolos in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 18th May 2005, 15:46

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