Flowcode version 9.
Running a short program at project option speed 32 (mhz). Delay times are double expected time. I changed to project option time to 20 mhz and the delay times are correct.
FYI
PIC12f1840 speed selection
-
- Posts: 147
- http://meble-kuchenne.info.pl
- Joined: Fri Dec 04, 2020 2:29 pm
- Has thanked: 26 times
- Been thanked: 7 times
-
- Valued Contributor
- Posts: 1703
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 374 times
- Been thanked: 588 times
Re: PIC12f1840 speed selection
Hi
If you mean where you can select clock speed under project options (highlighted yellow) then that only tells Flowcode what speed you are running at, not the hardware. You still need to select that (highlighted green) and possibly add in a C-code block.
If you post your chart we can look further.
Regards
If you mean where you can select clock speed under project options (highlighted yellow) then that only tells Flowcode what speed you are running at, not the hardware. You still need to select that (highlighted green) and possibly add in a C-code block.
If you post your chart we can look further.
Regards
Re: PIC12f1840 speed selection
Thank you. I think I have selected the correct register number for the osc? Maybe not? I have attached my file
- Attachments
-
- PWM CODE.fcfx
- (18.46 KiB) Downloaded 3 times
-
- Valued Contributor
- Posts: 1703
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 374 times
- Been thanked: 588 times
Re: PIC12f1840 speed selection
Hi
Have a look at the attached snippet from Datasheet. It illustrates the available options you can select using the internal oscillator. If you choose one of them then you should be good. 20MHz would only be an option if using an external crystal.
Flowcode has the Internal Oscillator Helper under Runtime, and this will tell you the code to use in your C-block for your chosen IntOsc, and of course don't forget to set your clock speed to match, under "Other Options" as this tells FC what frequency you are running.
Regards
Have a look at the attached snippet from Datasheet. It illustrates the available options you can select using the internal oscillator. If you choose one of them then you should be good. 20MHz would only be an option if using an external crystal.
Flowcode has the Internal Oscillator Helper under Runtime, and this will tell you the code to use in your C-block for your chosen IntOsc, and of course don't forget to set your clock speed to match, under "Other Options" as this tells FC what frequency you are running.
Regards