1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Electronics 16F872/oscillators

Discussion in 'Modding' started by kbn, 10 Nov 2006.

  1. kbn

    kbn What's a Dremel?

    Joined:
    17 Mar 2004
    Posts:
    603
    Likes Received:
    0
    When I try to read this chip icprog shows everything as 0000, usually ic prog shows 3FFF for new chips, is it dead?

    Also it appears not to have a built in rc oscillator but I have a few crystals - but no capacitors for them (atleast none in the pF range). Are capacitors needed?

    From this page
    I have a 20mhz 90-0382, and a 4mhz 90-3010

    If not, I could use a 12f675 to make a clock signal... it doesnt have enough pins to be usefull...
     
  2. SteveyG

    SteveyG Electromodder

    Joined:
    23 Nov 2002
    Posts:
    3,049
    Likes Received:
    8
    Can you read the device ID of the PIC? If it reads as 0xFF or 0x00 then something is wrong with your connections to the PIC.

    The capacitors are needed if you use a crystal otherwise it won't start oscillating (or it'll oscillate erratically).

    You could use a 12F675 as an external clock, if you set the config word to use an external clock. The 12F675 is a very capable device. I've used a 12F675 with a 16 key keypad, LCD, some LEDs and SPI interface to another device so I wouldn't say it doesn't have enough pins to be useful - you just have to know how to design with low pin count devices.
     
  3. kbn

    kbn What's a Dremel?

    Joined:
    17 Mar 2004
    Posts:
    603
    Likes Received:
    0
    Is a 0.1uF (100pF?) to high? RA49 from here

    only has enough pins if you use other chips to expand them :p
     
  4. SteveyG

    SteveyG Electromodder

    Joined:
    23 Nov 2002
    Posts:
    3,049
    Likes Received:
    8
    I doubt the PIC will be able to drive a capacitance that high. 30pF is about the maximum.
     
  5. Lardarse

    Lardarse What's a Dremel?

    Joined:
    17 Nov 2004
    Posts:
    25
    Likes Received:
    0
    In the electronics magazine that I used to read, they used 10pF for the crystal in nearly every PIC circuit. So you'll probably want RA33 on the page you linked to. And if you're going to be making more than 1 circuit involving PICs, then you should consider buying 10 (or more) of them.

    Also note that 0.1uF isn't 100pF. They're different by a factor of 1000. For some strange reason, Maplin don't like listing capacitor values in nanofarads, which is confusing, even for me. :(
     
  6. SteveyG

    SteveyG Electromodder

    Joined:
    23 Nov 2002
    Posts:
    3,049
    Likes Received:
    8
    The best value is in the range of 15pF to 22pF as indicated in the PIC datasheet, but it'd dependant on the specifications of the crystal.
     
  7. g0th

    g0th What's a Dremel?

    Joined:
    12 Apr 2005
    Posts:
    319
    Likes Received:
    1
    I use 22pF all the time.

    When i'm prototyping using a breadboard i often omit the capacitors all together, and have never seen a problem in this case for most applications.

    For high-accuracy critical timing applications you might want to put a small value trimmer variable capacitor in parallel with one of the loading capacitors.
     

Share This Page