ADC
 
Component ADC
A/D converter
Component Level: High
Application Notes:
(Examples, notes and hints for the component usage.)


Inappropriate use of Measure(TRUE) or MeasureChan(TRUE) call can lead to application dead-lock.
I.e. in polling mode (Interrupt service is disabled) the application stucks in Measure method, if Disable method is called from an event of other component, or the speed mode is switched to a mode where the ADC component is disabled while a measurement launched by Measure(TRUE) method is in progress.
Or if method Measure(TRUE) is called from an event of some component and the priority of the interrupt of ADC component isn't higher than the priority of this event (Interrupt service is enabled), this method will stuck.

Version specific information for HC(S)08 derivatives
Asynchronous clock source setting on some derivatives.
Some HC(S)08 derivatives (e.g. MC68HC908QB8, M9S08QG8 and many others) feature an Analog/Digital converter with independent clock source called Asynchronous clock. The ADC component enables to use this Asynchronous clock source in two ways:
  • The property Conversion time opens the Timing dialog box with selection of all valid timing settings of all available clock sources of the ADC module (Bus clock, Alternative clock, Asynchronous clock). It is possible to select specific clock source for the a given speed mode in the "ADC clock source in ..." property.
  • Methods EnableAsynchroClock/DisableAsynchroClock offers the possibility to switch during run-time to the Asynchronous clock source.
Values offered by the Timing dialog box of the Conversion time property are only estimations of the conversion time, because the frequency of the Asynchronous clock is given by an interval (see datasheet of the specific derivative).
The frequency of the Asynchronous clock used by the ADC component depends on the value of the Low-power mode property and is cpu specific. The Conversion time calculation of the ADC component for Asynchronous clock is based on the following values:

Low-power modeHC08 familyHCS08 family
Enabled0.75MHz2MHz
Disabled1.5MHz4MHz