Change clock frequency in Flowcode to match Arduino hardware [Solved]
Posted: Sat Sep 16, 2023 11:55 pm
I have a 3V 8Mhz Arduino Pro Micro clone that is fitted with an Atmega32u4 processor. The only Target option within flowcode that allows me to program the device is the ‘Arduino LilyPad Usb’. However, the LilyPad Usb target has the clock speed set to 16MHz by default with no ability to change it from within the General Options tab / Options menu.
By running a 1Hz flasher test program I confirmed a 2s ON time and 2s OFF time, which indicates Flowcode is set to 16Mhz and therefore the program is running at half speed.
I have attempted to change the clock frequency by inserting an OSCCON statement into a C Code block at the start of the 1Hz flasher program but this flags an OSCCON undeclared error when compiling.
I have also tried using the ‘Arduino Micro 8MHz’ target but this will not compile to my Arduino Pro Micro clone.
Searching the forum posts has not provided an answer, therefore I wonder if some kind soul can point me in the right direction, by advising how to set the clock frequency in Flowcode for a clone Arduino device running on an 8MHz external crystal oscillator?
Thanks in advance.
By running a 1Hz flasher test program I confirmed a 2s ON time and 2s OFF time, which indicates Flowcode is set to 16Mhz and therefore the program is running at half speed.
I have attempted to change the clock frequency by inserting an OSCCON statement into a C Code block at the start of the 1Hz flasher program but this flags an OSCCON undeclared error when compiling.
I have also tried using the ‘Arduino Micro 8MHz’ target but this will not compile to my Arduino Pro Micro clone.
Searching the forum posts has not provided an answer, therefore I wonder if some kind soul can point me in the right direction, by advising how to set the clock frequency in Flowcode for a clone Arduino device running on an 8MHz external crystal oscillator?
Thanks in advance.