EC - ADC

 ADC

An analog-to-digital converter converts an input linear voltage (from 0V to the highest input voltage) into a corresponding digital value (0-2).T (T = number of bits), allowing the program to perform corresponding work based on the digital voltage value.


The input conversion voltage of an EC ADC is typically from 0V to VREF (AVCC), unlike a MCU where the input conversion voltage range can be adjusted, for example, from 0V to 1/2 AVCC. EC ADCs are used to detect battery voltage and temperature, as well as system voltage and current, to calculate the system's power consumption.


The block diagram of the ADC is as follows:




ADC has three operating modes: Software-Triggered, Timer-Triggered, and Scan.

  • Software-triggered means that the ADC is triggered by software to perform linear voltage-to-digital conversion;

  • Timer - Triggered means that the ADC is triggered by a timer to perform a linear voltage-to-digital conversion;

  • Scan - The ADC performs a linear voltage-to-digital conversion, triggered by its internal clock. The differences are shown in the following diagram:


The following details how to configure the software for the three working modes:

  • Software-Triggered Working Mode

    • Set working mode

    • Set conversion channel

    • Start ADC conversion

    • Waiting for the conversion to complete

    • Extract the converted digit value

    • Clear the converted bits


  • Timer-Triggered working mode

    • Set working mode

    • Set a Timer and wait for the event to trigger.

    • Set conversion channel

    • Start ADC conversion

    • Waiting for the conversion to complete

    • Extract the converted digit value

    • Clear the converted bits


  • Scan working mode

    • Set working mode

    • Configure the conversion channel (multiple channels can be configured).

    • Start ADC conversion

    • Waiting for the conversion to complete

    • Extract the converted digit value

    • Clear the converted bits


exist Software-Triggered Mode and Timer-Triggered ModeBelow, the ADC can only perform one action at a time.Single channelThe conversion operation. In comparison,Scan ModeIt supports scanning and conversion in one go.Multiple channelsIt is suitable for application scenarios that require monitoring multiple analog inputs simultaneously.


Therefore, the choice of ADC operating mode should be based on the actual application requirements:

  • If only a single channel is required and the conversion can be triggered by software or a timer, you can use...Software or Timer Triggered Mode。

  • If you need to read data from multiple channels simultaneously or continuously, it is recommended to use...Scan Mode。


Choosing the right working mode can improve the efficiency of data acquisition and the speed of system response.



留言

這個網誌中的熱門文章

EC 所需知識 - SMBUS

EC Required Knowledge - KBC

EC Required Knowledge - LPC