18f2685 internal osc with pll
Moderator: Benj
-
- Posts: 438
- Joined: Mon Aug 29, 2011 12:26 am
- Location: arizona
- Has thanked: 175 times
- Been thanked: 173 times
- Contact:
18f2685 internal osc with pll
im trying the get the 18f2685 set to 4 meg internal with 4x ppl, shooting for 16Mhz internal osc but can seem to get it to work as it default to 4Mhz... i set osctune to 0x40 (01000000) and osccon to 0x6e (01101110), what am i doing wrong and can you please explain it to me?
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: 18f2685 internal osc with pll
Have you set the configuration (FOSC3:FOSC0) bits in CONFIG1H correctly? (Open the chip configuration in flowcode, set oscillator to Internal Oscillator Block mode)brandonb wrote:im trying the get the 18f2685 set to 4 meg internal with 4x ppl, shooting for 16Mhz internal osc but can seem to get it to work as it default to 4Mhz... i set osctune to 0x40 (01000000) and osccon to 0x6e (01101110), what am i doing wrong and can you please explain it to me?
Setting osccon to 0x6e means you are trying to write to read-only bits of the register, 0x62 seems more appropriate.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
- Posts: 438
- Joined: Mon Aug 29, 2011 12:26 am
- Location: arizona
- Has thanked: 175 times
- Been thanked: 173 times
- Contact:
Re: 18f2685 internal osc with pll
thanks for checking it out but that didnt work either here is the flowchart so far https://dl.dropbox.com/u/10367218/flow_ ... osccon.fcf its a bit too large to post
- STibor
- Posts: 263
- Joined: Fri Dec 16, 2011 3:20 pm
- Has thanked: 116 times
- Been thanked: 113 times
- Contact:
Re: 18f2685 internal osc with pll
Hi!
Flowcode5
Microcontroller: Pic18F2620
internal oscillator8MHz and 4Pll
Beginning of the program:
Flowcode5
Microcontroller: Pic18F2620
internal oscillator8MHz and 4Pll
Beginning of the program:
Code: Select all
C code:
osccon = 0x70;/ / 8MHz
or
osccon = 0x60;/ / 4MHz
osctune = 0xC0;
-
- Posts: 438
- Joined: Mon Aug 29, 2011 12:26 am
- Location: arizona
- Has thanked: 175 times
- Been thanked: 173 times
- Contact:
Re: 18f2685 internal osc with pll
right on, that works perfectCode: Select all
C code:
osccon = 0x70;/ / 8MHz
or
osccon = 0x60;/ / 4MHz
osctune = 0xC0;