Author Topic: Kinetis ADC threshold/range triggering  (Read 5544 times)

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Kinetis ADC threshold/range triggering
« on: May 14, 2015, 08:31:29 PM »
Hi All

The Kinetis ADC contains value comparators which allow it to selectively sample input data depending on its input value. This means that the user can define that only samples above a certain analoge level should be recognised or values below a certain level. Furthermore, the same can be done for input values outside or inside of a range (eg. only values between 2.00V and 2.50V should be recognised, or only samples outside of this range).

If such a mode is configured the ADC is in fact operating autonomously but will only actually save the value if it is within range, meaning that it will also only inform the processor that the conversion is ready (interrupt) in this case.

The ADC operation, monitoring analoge values and/or ranges, can also continue when the processor is in a low power mode, which allows the processor to only be worken when an input in a certain range is sampled.

For example, if an analoge input is to be monitored which the procssor is only interested in when it exceeds a threshold the ADC can be configured to autonomously monitor this and only interrupt the processor when the threshold has actually been exceeded. This removes the need for the processor to poll the value and check against a limit condition (or a range) but provides immediate interruption as soon as the condition is detected by the ADC as being true.

The use of selective ADC triggering is documented in the following uTasker user's document (chapter 2), showing how it can be very simply used:

http://www.utasker.com/docs/uTasker/uTaskerADC.pdf

The uTasker simuator alows the use of selective ADC triggering to be accurately simulated in complete project code.

Regards

Mark