Crystal oscillator problems on a 16f628a


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2009
    Location
    Huntsville, AL
    Posts
    32

    Default Crystal oscillator problems on a 16f628a

    I'm having some trouble with my crystal oscillator. It worked fine on another 16f628a, but I've soldered some more components to my prototype board (and I accidentally bent the pins on the original PIC), and the replacement 16f628a isn't working. But when I set it to internal oscillator, it works, so I know it's the xtal oscillator...

    I have a 20MHz xtal with the standard 22pF caps. I'm wondering if the addition of nearby components or heat from additional soldering could have affected the circuit? I also have the caps tied to 5V, not GND (which has worked in several previous circuits, including this one... until now...)

    Any suggestions what might have caused the oscillator to stop working?

    Thanks in advance!
    Dave

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by achilles03 View Post

    Any suggestions what might have caused the oscillator to stop working?

    Thanks in advance!
    Dave
    You are sure the config statement is set to HS_OSC, Yes?
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  3. #3
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Joe S. View Post
    You are sure the config statement is set to HS_OSC, Yes?
    In addition to Joe's,

    Not all 16f628A chips work at 20Mhz. You MUST make sure its type is 20Mhz.

    Also, 15pf instead of 22pf for 20Mhz has always been better in my applications.


    --------------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Lightbulb

    Hi,

    If it is an existing board ... I'd first carefully clean all the "touched" PCB , verify all Pic pins are correctly soldered ( Laugh, ... who never forgot a pin ??? ) and no short ...

    Magnifying glass required ...

    Then, if no success ...Try you chip on a breadbord with the ol' famous "Blink" program ... you'll know if it is OK. and
    where to look at ...

    Alain

    PS: 4 Mhz chips are not supposed, but work really fine up to ... 28 Mhz !!! ( no µchip warranty ... of course ...)
    ************************************************** ***********************
    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 " !!!
    *****************************************

  5. #5
    Join Date
    Jan 2009
    Location
    Huntsville, AL
    Posts
    32


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Joe S. View Post
    You are sure the config statement is set to HS_OSC, Yes?
    Ah ha, that might be it... I have the configuration word set to XT on the pull-down menu (I don't typically set the oscillator type in the program). I guess that should be set to HS. Odd that the previous 16f628a worked with the same oscillator on XT. I guess that XT occasionally works for 20Mhz xtals?

    Thanks!
    Dave

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by achilles03 View Post

    Odd that the previous 16f628a worked with the same oscillator on XT. I guess that XT occasionally works for 20Mhz xtals?

    Thanks!
    Dave

    YES !!! It may happend ... I discovered once the "horrible truth" on one of my 16F877 ...

    It was working @ 20 Mhz with a XT setting ... next one never wanted to work !!!

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

Similar Threads

  1. Sharing Crystal with 2 IC's
    By ShaneMichael in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 10th January 2013, 13:33
  2. 20 Mhz Crystal, simple blinking LED
    By BenjaminsShinob in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 16th October 2007, 05:06
  3. Crystal osc running but PIC not using it
    By p15218 in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 18th February 2007, 22:33
  4. 20Mhz crystal cause led to blink irreguarly
    By niknaksbarbeque in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 16th April 2005, 11:35
  5. Replies: 1
    Last Post: - 30th June 2004, 08:07

Members who have read this thread : 1

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