Page 1 of 1

When to Use External Oscillator

PostPosted: Wed Mar 09, 2022 2:23 am
by birghtnight
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?

Re: When to Use External Oscillator

PostPosted: Wed Mar 09, 2022 2:49 am
by AussieSusan
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

Re: When to Use External Oscillator

PostPosted: Sat Mar 12, 2022 7:30 am
by ric
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)