Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

External clock for PIC16

Status
Not open for further replies.

Shipton

New Member
Does the PIC16 - specifically the PIC16F87XA family - need an external clock pulse to operate? If so, how do I generate one of these?
 
Looking at the datasheet for that family of uC's, it appears that there is no OSC setting for the internal clock, so I would say it doesn't have an internal clock.

An external clock can be generated in the form of a crystal, nominally at 20MHz, however, if you look at the datasheet you will find under section 14.2, table 14-2 a list of oscillators and the corresponding capacitor values.

I always use a 20MHz with 18-22pf capacitors, depending on the crystal spec, which can be found usually on the suppliers web site. I use RS Components or Farnell for my stuff in the UK. Also, Digikey is a good source. Or a local electronics store.

What you specifiy your clock at is entirely your choice based upon your design, if you have time dependant features or need a high speed baud rate for the serial peripheral, you will need a 20MHz clock, if you are just turning LED's on and off, a 4MHz will do just fine.

Hope this helps.

Wilksey
 
Does the PIC16 - specifically the PIC16F87XA family - need an external clock pulse to operate? If so, how do I generate one of these?
The most accurate is to use a crystal and a pair of capacitors to provide a pulse. You can find out more from the data sheet on pages

Get the data sheet from here: top link PIC16F877A
and turn to page 145 - Section 14.2 and you will find everything you need to know about clocking this PIC (and most others..)
The resistor in schematic Figure 14-1, I have never had to use. The value of the caps is not critical, but stay within the limits they suggest and you will be fine.

EDIT: I see I'm a bit slow getting a post up. :p
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top