I'm trying to write my first and a simple program on a pic16LF84, but I'm confused as to whether an external oscillator is required or optional.

I'm reading a pdf called "Book: PIC Microcontrollers Programming in C" and it states:

Even though the microcontroller has a built-in oscillator, it cannot operate without external components which stabilize its operation and determine its frequency (operating speed of the microcontroller). Depending on elements in use as well as their frequencies, the oscillator can be run in four different modes:
· LP - Low Power Crystal;
· XT - Crystal / Resonator;
· HS - High speed Crystal / Resonator; and
· RC - Resistor / Capacitor.

^It's actually referring to the pic16f887.

I just want to make a simple LED blinker and ADC, so do I need an external oscillator?


4 Answers 4


Yes, the 16F84 does need an external oscillator. It is a very old PIC.

However almost all of the newer PICs have an Internal RC Oscillator that can be selected, which will be mentioned in the datasheet.

I would really consider getting hold of a newer PIC, something like a 16F690, or 16F1824/16F1828. These are far more current, and can do anything the 16F84 can do and much more.

If you want to use your 16F84 though, either use an external clock (e.g. from 555 timer or oscillator based on e.g. an inverting gate with RC or crystal) or crystal as specified in the datasheet, or if you don't have an external clock or crystal use the RC option.

RC osc

  • \$\begingroup\$ Oh I see, I do have a couple of bigger pics which I'm pretty sure have an internal oscillator, I'll use those. Thanks a lot, that clears things up. \$\endgroup\$
    – Shubham
    Sep 21, 2011 at 18:11
  • 1
    \$\begingroup\$ The 16F84 is NOT obsolete - just check a vendor like Digikey, Mouser or several others. Digikey alone stocks more than 20 varieties of the part. Not that it's great using an older part, but sometimes hobbyist find a circuit that was designed just for this part; and newbies have a harder time porting over to a different chip, even though it's a good exercise... \$\endgroup\$
    – user16107
    Nov 13, 2012 at 21:32
  • 2
    \$\begingroup\$ Still available,but Microchip lists it as not recommended for new designs. Microchip rarely removes pics from its portfolio, which has good and bad impacts on design \$\endgroup\$ Nov 14, 2012 at 12:08
  • 1
    \$\begingroup\$ @Scott: Mostly good though. I feel much more comfortable designing a PIC into something intended for 20 year lifetime than microcontrollers from other companies. Microchip has been very good about supporting legacy designs. I'd rather pay $5 for a micro that can be replaced by a $.75 part today, than get the product recertified for Intrinsic Safety, RF emissions, requalified by the customer, etc. Microchip gets this, and has the best record in the industry for keeping old parts available. \$\endgroup\$ Jan 20, 2016 at 11:59

First, please return the 16F84 to whatever museum you found it in.

Most modern PICs have a internal R-C oscillator. In fact some, like the 10F series, can run no other way. PICs with enough pins contain a crystal driver. You add the crystal and it's load caps, and the PIC does the rest.

Your PIC is a ancient relic that does not have a oscillator built in. The section (from the datasheet?) you quoted above is a bit misleading. It does have driver circuitry for external crystal or R-C oscillator built in, but not the whole oscillator itself. Note that it also says it cannot operate without external components.

So to answer the question about what you need to make this PIC run, is a crystal and two load caps. You can also find ceramic resonators with the appropriate caps built in, but I'd stick to the crystal.


PIC16F84 is an obsolete microcontroller and it doesn't have internal oscillator.

I suggest you use PIC16F627/628/648 or PIC16F1826/1827. They are compatible and have internal oscillator and much more peripherals.


Clock configurations for microcontrollers can generally be divided into 3 categories.

  1. Complete oscilator circuit is external, microcontroller simply receives a clock signal.
  2. Oscilator drive circuit is inside the microcontroller but timing components are external. Often there are multiple different drive modes, one for RC circuits and one or more for different speeds of crystal.
  3. Complete oscilator circuit is inside the microcontroller.

Older Pic models like the F84 and F887 tend to only provide options in the first two categories. Newer PIC models tend to provide options in all three categories.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.