ICTRIM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ICTRIM

1,272 Views
DanielMorley
Contributor I

I am trying to program a MC8SO8 GT8A.  I am using an internal oscillator in FEI mode.  I want to set up serial com but need to have the bus frequency accuracy up to about 2% instead of the 25%.   I feel that the ICTRIM has something to do with this from reading the manual.  The data sheet says it adjusts the period with a larger value.  The question is how I know what accuracy that I am getting with what value.   I can’t seem to figuire this one out.

Labels (1)
0 Kudos
1 Reply

313 Views
Alban
Senior Contributor II
Hello Daniel,
 
Let me explain this TRIM thing so you have a clearer idea.
 
When the MCU is produced, there is always slight variations between devices. This come from the characteristics of the semiconductors, the time it has been 'cooked', the location on the wafer... To put in a nutshell, it comes from many parameters.
 
The internal oscillator is based on a vulgar Resistor-Capacitor oscillator.
The fundamental oscillation frequency is To = R x C.
 
Due to the process differences, Freescale can only guarantee that the device will be roughly at the frequency (25%).
As many applications require a better accuracy. They added something acting as variable capacitor to fine tune this basic oscillator.
 
What happens is, during programming usually (not to create a new process), the programmer set the device for a known frequency and look at what the devices speed.
It then corrects the variable capacitor to match the reference frequency.
 
In the facts, each time you change the TRIM value, you add/remove small capacitors that will influence the PERIOD of the clock accordingly.
 
Then, you can modify the multipliers and divider of PLL or FLL and as you know the base frequency is precise, you know the target frequency will also be precise.
 
The 2% when trimmed is given across the whole temperature and voltage range.
 
Therefore, once your device is trimmed (whatever the value of the TRIM needed), you will be within 2% of the desired frequency.
If you wish to check this frequency, you can either toggle an output, or set the TIMer module and observe the output with an oscilloscope.
 
I hope this helps !
Cheers,
Alban.
0 Kudos