Tunning internal oscillators

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Tunning internal oscillators

Post by Jan Lichtenbelt »

I wanted to tune the frequencies of 2 microcontrollers with only internal oscillators to get frequencies as close as possible to each other.

The solution is easy. Just tune 1 microcontroller by means of the byte OSCTUNE with bits TUN <5:0>. This can be made visual with software RS232 outputs of both microcontrollers. Compare them e.g. with an oscilloscope *).
By means of an external voltage with ADC the TUN values can be changed. The TUN values are shown on a LCD. If the frequencies are equal the TUN value is known and can be set for that microcontroller.

See the flowcode used in the attached file.

I found a frequency shift possible of +/- 10%.

Kind regards,

Jan Lichtenbelt

*) If you do not have an oscilloscope, it is possible to compare the 2 signals (one inverted) and integrate the output (just an RC circuit) until 0 is reached.
Attachments
Internal_frequency_tuning_V1.fcf
(13.91 KiB) Downloaded 243 times

Post Reply