Hi Frank,
Unfortunately, Microchip decided to change the name of the register from
OSCCON to
OSCFRQ
So the OSCCON part requires removing.
Now what you need to do is within the configuration settings is select
HFINTOSC32MHz
The C block at the start requires a value for OSCFRQ which is found within the
datasheet on page 93:
- 16F18346 Datasheet.png (114.05 KiB) Viewed 1251 times
The frequency selected can be from 1 to 32MHz.
So as you want 8MHz you can see that the value is 0100.
Since that it's 4 you can use hex:
or decimal:
or even binary:
It's vital that you check by using a
one-second flasher test to make sure the mico is running at the correct speed.