Hi I have write config on download flag set in Project options dialog, configure. But unable to change internal oscillator speed or no matter what oscillator I set pic 8 keeps running at 1Mhz. So looks like I am unable to set configuration bits.
I am using latest version of Flowcode 7 and latest version of Microchip XC8 V1.4 compiler. Is there any other way to send configuration to chip?
unable to set config bits
Moderator: Benj
-
- Posts: 93
- Joined: Mon Sep 23, 2013 4:33 pm
- Has thanked: 5 times
- Been thanked: 6 times
- Contact:
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
- Contact:
Re: unable to set config bits
Hi
Are you setting the OSCON Register with the flowcode Oscillator Helper or you have to do it with a C code component
if you can post a minimum project then we could help you
Are you setting the OSCON Register with the flowcode Oscillator Helper or you have to do it with a C code component
if you can post a minimum project then we could help you
- Attachments
-
- 1.jpg (66.36 KiB) Viewed 4708 times
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR
-
- Posts: 93
- Joined: Mon Sep 23, 2013 4:33 pm
- Has thanked: 5 times
- Been thanked: 6 times
- Contact:
Re: unable to set config bits
I set the oscillator speed in project options, general options as in program attached
The older the boy the bigger the toy
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: unable to set config bits
The setting in project options just tells Flowcode what speed the oscillator is set to. It does not set the value on chip. To actually configure the oscillator on the chip you need to use a C code icon and set the PIC registers to the correct values.
The code to use the internal oscillator at 8 MHz for your device should be:
The code to use the internal oscillator at 8 MHz for your device should be:
Code: Select all
OSCCON = 0b01110011;
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
- Posts: 93
- Joined: Mon Sep 23, 2013 4:33 pm
- Has thanked: 5 times
- Been thanked: 6 times
- Contact:
Re: unable to set config bits
Ok Thanks is it just the oscillator speed setting that is not sent?
I presume the other config bits are programmed?
I presume the other config bits are programmed?
The older the boy the bigger the toy
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: unable to set config bits
Oscillator speed is not part of the configuration bits, it is a separate register. The configuration bits are programmed.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis