When to Use External Oscillator

(instructions, reset, WDT, specifications...) PIC17Cxx, PIC18Fxxx

When to Use External Oscillator

Postby birghtnight » Wed Mar 09, 2022 2:23 am

1) I'm making a wireless TX/RX system with and LED and photodiode. On one side I'm using the PIC16F15313 to blink an LED at 10Hz for 100uS each blink and I'm also using the PIC16F15313 to turn on a receiver that is looking for the blinks on the other side. It needs to be low power since it will be battery powered so the PIC will turn off between blinks (ideally), but the timing is very important so I'm wondering if I should consider an external oscillator to keep a more accurate time of when to blink, how long to blink for, when to sleep, and when to wake up. What would I look for in the datasheet to understand the variation in time between using the internal oscillator VS an external oscillator. Would be nice to know that over a wide temperature range too. The datasheet says the internal oscillator is "factory calibrated" so maybe it's good enough, just would like to know for sure.

2) Why is a PIC16 core an 8-bit and not a 16 bit?
birghtnight
 
Posts: 4
Joined: Wed Mar 09, 2022 1:29 am

Re: When to Use External Oscillator

Postby AussieSusan » Wed Mar 09, 2022 2:49 am

I assume the timing is more accurate that you can get from the internal oscillator. The data sheet will tell you the +/-x% of the internal oscillator accuracy
Therefore you have two choices: external crystal and external oscillator.
As to which of those to select, you need to look at the accuracy of the crystal vs the accuracy of whatever external oscillator you select. Also you may need to take the power required by the external oscillator into account if you are concerned about overall power consumption.
Another factor to consider is whether the internal parts of the crystal oscillator still work in whatever sleep mode you will use.
The PIC16 family are 8-bit because they handle 8-bit data values in the accumulator. The instructions are (IIRC) 12 bits (or something) but are stored in 16-bit locations.
Susan
AussieSusan
Verified identity
 
Posts: 173
Joined: Mon Jun 16, 2014 4:45 am
PIC experience: Experienced Hobbyist

Re: When to Use External Oscillator

Postby ric » Sat Mar 12, 2022 7:30 am

birghtnight wrote:1) but the timing is very important

"Very important" is not an engineering term.
You need to deal in hard numbers. Is 1% accuracy good enough?
If not, how about 0.1%, or do you need 0.01% or better?

2) Why is a PIC16 core an 8-bit and not a 16 bit?
[/quote]
The number after "PIC" is arbitrary. The "PIC32" family is the only one where it is the same as the register width.
All PIC16F devices have 8 bit wide registers. Most have 14 bit wide instructions, but some are only 12 bit. (Mainly older devices)
Latest test project, an LED matrix display made from one reel of addressable LEDs. here
User avatar
ric
Verified identity
 
Posts: 659
Joined: Sat May 24, 2014 2:35 pm
Location: Melbourne, Australia
PIC experience: Professional 5+ years with MCHP products


Return to 16-Bit Core

Who is online

Users browsing this forum: No registered users and 19 guests