Hi Ben
I have a PIC 18LF6722. I like to config like in the Manual on 40MHz (or 32Mhz).
I can not make it faster than 8Mhz. I can config in C-code the two Register but not the CONFIG1H
FC7 can not found it. Can I define it by my self if I know the addres (300001h)?
OSCCON = 0x70;// 8Mega
OSCTUNE = 0x7f; //4xPLL
//CONFIG1H = 0x08 //
Info from the Manual....
The PLL is available when the device is configured to
use the internal oscillator block as its primary clock
source (FOSC<3:0> = 1001 or 1000). Additionally, the
PLL will only function when the selected output frequency
is either 4 MHz or 8 MHz (OSCCON<6:4> = 111
or 110). If both of these conditions are not met, the PLL
is disabled and the PLLEN bit remains clear (writes are
ignored).
REGISTER 25-1: CONFIG1H: CONFIGURATION REGISTER 1 HIGH (BYTE ADDRESS 300001h)
1001 = Internal oscillator block, CLKO function on RA6, port function on RA7
1000 = Internal oscillator block, port function on RA6 and RA7
PIC 18LF6722 PLLx4 How to turn it on for 40MHz
-
- Valued Contributor
- Posts: 654
- Joined: Fri Aug 19, 2016 2:09 pm
- Location: switzerland
- Has thanked: 182 times
- Been thanked: 179 times
- Contact: