Tom's Main Menu

Physical Computing Home

Intro to Physical Computing Syllabus

Networked Objects

Sustainable Practices

blog

Resources

code, circuits, & construction

my del.icio.us links

 
PIC:

Programming the PIC using PicBasic Pro

PIC memory registers

Digital in and out

Analog in

Serial in and out (using serin2 and serout2)

PIC resources page

Microengineering Labs' site

Using a powered oscillator with the PIC

 
Breadboards are convenient for prototyping, but they're not the most efficient conductors. They have a characteristic impedance, or resistance to change in voltage (think of it kind of like voltage inertia). In particular, they can affect the oscillation of a microcontroller's clock when it's very fast. When yo're using a fast crystal, for example 20MHz, you may find that your microcontroller doesn't run. One way around this is to use a powered oscillator.

A powered oscillator may give you a stronger and more regular clock signal than a crystal for your microcontroller, though they take power and space on your board. This example uses a TTL-level crystal clock oscillator. If you want to use an oscillator with the PIC instead of a crystal, wire it as follows:

  • Oscillator Pin 1 (with the dot): not connected
  • Oscillator Pin 2: Ground
  • Oscillator Pin 3: to CLKIN pin of PIC
  • Oscillator Pin 4: to +5V

Note that some documentation may number the pins as Pin 1, 7, 8, and 14. This is because the oscillator fits a standard 14-pin socket. As with most DIP integrated circuits, pins are numbered in a U-shape.

Below is a picture of a 18F452 PIC wired with an oscillator.

When you use a powered oscillator, you should also make a point of decoupling your power regulator properly, as follows: