In the datasheet for the 16F1827 ( http://ww1.microchip.com/downloads/en/d ... 41391d.pdf ) as from page 299, I see tables with different BAUD rates with different Xtal's. "BAUD RATES FOR ASYNCHRONOUS MODES"
I want to use a PIC that consumes as less power as possible, and then I see the 32khz XTAL configuration (LP mode) as the most power efficient..
My question is if the 32khz crystal can generate a decent 9600baud signal and a 1-wire signal for a DS18B20?
Maybe I need to make a leap to a 1Mhz, or even 4Mhz crystal but in these modes the chip consumes more energy.
How does Flowcode handle the baudrates?
Do they really mean a 32Khz or a 32.786kHz (Page 55 5.2.1.5 TIMER1 Oscillator), elsewhere in the datasheet them keep on calling it a 32Khz Xtal
And, how can I set the project options to 32khz?
Oscillator question (LP-mode)
Moderator: Benj
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
Re: Oscillator question (LP-mode)
Why do you post the same question on both this and the V9 forum?
For one wire you need a faster clock. However you could consider using the internal oscillator at high speed and switching back to the 32khz clock afterwards.
For one wire you need a faster clock. However you could consider using the internal oscillator at high speed and switching back to the 32khz clock afterwards.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
- Valued Contributor
- Posts: 786
- Joined: Fri Jun 06, 2014 3:53 pm
- Has thanked: 187 times
- Been thanked: 205 times
Re: Oscillator question (LP-mode)
Hi MJU
I'm guessing this is perhaps a follow on from previous posts regarding power savings?
If so, when you execute a Sleep instruction, the Clock is disabled and the PIC then uses it's internal 31KHz Osc for duration. If for example you were running at a higher speed as Kersing suggests then that would allow your comms, but would only be running when not asleep. I think that chip allows a sleep of around four or five minutes, so your ratio of sleep/awake may possibly negate your power concerns of "running" at a higher speed.
Timer 1 is a separate dedicated Oscillator in itself.
Hope this is of some help.
Regards
Edit....
Just seen Ben's reply on the v9 Forum sent around the same time. In it he explains why your baud rate won't work and also provides further info on 1-wire.
I'm guessing this is perhaps a follow on from previous posts regarding power savings?
If so, when you execute a Sleep instruction, the Clock is disabled and the PIC then uses it's internal 31KHz Osc for duration. If for example you were running at a higher speed as Kersing suggests then that would allow your comms, but would only be running when not asleep. I think that chip allows a sleep of around four or five minutes, so your ratio of sleep/awake may possibly negate your power concerns of "running" at a higher speed.
Timer 1 is a separate dedicated Oscillator in itself.
Hope this is of some help.
Regards
Edit....
Just seen Ben's reply on the v9 Forum sent around the same time. In it he explains why your baud rate won't work and also provides further info on 1-wire.