Getting the most out of the PSoC 3 and PSoC 5 Internal Oscillators | Cypress Semiconductor
Getting the most out of the PSoC 3 and PSoC 5 Internal Oscillators
AN80248 "PSoC 3/PSoC 5 Improving the Accuracy of Internal Oscillators" application note was recently released. This application note is in response to many requests for PSoC Creator components that can trim the Internal Main Oscillator (IMO) and Internal Lo-speed Oscillator (ILO) at run-time.
Trimming simply means adjusting register values to achieve better accuracy be it for offset of a comparator or the frequency of a clock. For clocks, trimming means calibration with respect to a higher accuracy reference clock.
In the example project associated with the application note (schematic shown above), the IMO is trimmed with a 32 kHz crystal as reference and the ILO is trimmed with the IMO as reference. This enables the IMO to achieve near MHz crystal accuracy (±0.05%) at kHz crystal cost. The ILO performance is also considerably improved with a post-trim accuracy of ±6.5% with respect to the IMO. This means that the respective trim components improve ILO accuracy by a factor of 16, and the IMO accuracy by up to a factor of 140. Moreover, the accuracy can be easily verified on the character LCD (an example is shown below) with a simple API call to check IMO and ILO errors!
I really enjoyed developing these two components. Once you program the example project on the PSoC, zap it with freeze-spray or a heat gun and have fun watching the component correct the IMO and ILO frequencies!
In conclusion, having an accurate MHz clock is important for a wide range of applications, and particularly for high-speed communication. An accurate kHz clock also has many applications, especially in low power modes when MHz clocks are switched off.
The IMO and ILO Trim components really enhance the already-flexible clocking structure in PSoC 3 & PSoC 5, and I hope that they help you out in your specific applications as well. You can download the application note and the components at AN80248's landing page.
By Antonio De Lima Fernandes