Overview - Renesas RX110 Application Note

12-bit a/d converter support
Table of Contents

Advertisement

RX Family
ADC Module Using Firmware Integration Technology

1. Overview

This A/D Converter (ADC) driver supports the S12ADa peripheral on the RX63x, the S12ADb peripheral on the
RX11x/RX210, the S12ADC peripheral on the RX64M/RX71M, the S12ADE peripheral on the RX130/RX230/RX231
and the S12ADFa peripheral on the RX65x.
Depending on the MCU chosen, some features include, but are not limited to single scans, grouped single scans, and
continuous scanning. Peripheral features include register left or right alignment, clearing data after register reads,
summation and average of conversion results, and the ability to store data on alternate triggers of a channel. Channel,
temperature and internal reference voltage sensor specific features include setting sampling time using state counts, and
opting out of summation of samples. There is no dependency on any other software except for the board support
package (r_bsp module).
The ADC begins conversion when it receives a trigger. When the conversion is complete, a flag is set and an interrupt
issued if enabled. If the ADC is operating in a single scan mode, only one scan takes place per trigger. If the ADC is
operating in a continuous mode, scans continue indefinitely after the initial trigger occurs.
The trigger source may be synchronous from an MTU peripheral, Event Link Controller (ELC), or a TPU peripheral
(non-RX11x); asynchronous from an external trigger on ADTRG#, or from setting a bit in software. Note that even
though a software trigger is an asynchronous action, the hardware manual reserves the term "asynchronous trigger" to
refer to asynchronous external hardware triggers. Additionally, although the temperature sensor on the RX210 has its
own independent trigger, the driver hides this operation and the application should be written as if the standard software
trigger is being used.
The driver provides a Control() command for polled applications which checks to see if a scan completed after a trigger
occurs. If interrupts are in use, the interrupt will call a Callback function specified in the Open() function. The only
argument to the Callback function specifies whether the default scan has completed or a Group B scan has completed.
In general, the peripheral operates on a single trigger source. However, in a group mode, two different trigger sources
are used. Each group can contain one or more unique channels and may be scanned at different trigger intervals.
The majority of the driver serves to initialize the A/D peripheral and provide functions to read conversion results.
Settings which are common to all channels such as conversion alignment or addition count are set in the Open() call.
Specific channel enabling is done via a Control() command. Two Read() functions are provided- one which retrieves a
single conversion value and another which retrieves all conversion registers whether the channel is enabled or not.
For the RX11x/RX21x/RX63x there are 13 to 24 channels available for conversion depending upon the MCU chosen.
All MCUs include a Temperature and an Internal Reference Voltage sensor. Each has its own conversion register. In
addition, in non-RX63x MCUs, a single channel can be designated as a "double trigger". This means the scan-complete
flag/interrupt occurs on every other scan. On an odd scan, the conversion result is placed in its normal data register. On
an even scan, the result is placed in a special register. Double trigger cannot be used with sensors or other channels
(unless the other channels are in Group B), and a sensor can only be scanned by itself.
For the RX64M/RX71M/RX65x there are 8 channels on Unit 0, 21 channels and two sensors (Temperature and Internal
Reference Voltage) on Unit 1. In addition, a single channel on each unit can be designated as a "double trigger"
channel. This means that the scan-complete flag/interrupt occurs on every other scan. On an odd scan, the conversion
result is placed in its normal data register. On an even scan, the result is placed in a special register. Double trigger
cannot be used with sensors or other channels (unless the other channels are in other Groups.). Sensors and channels
may be scanned together on Unit 1. A built-in level and window comparator is available for channels and sensors. The
sensors are available on unit 1 and a Sample & Hold feature is available on unit 0 for sampling up to 3 channels
simultaneously. A virtual channel is available for Self-Diagnosis against various voltages, and a Disconnect Detection
Assist feature allows for an initial charging or discharging of the internal capacitor. This 12-bit converter may also be
configured for 8 or 10-bit resolution for slightly faster conversion if desired, and an input is available for an external
amplifier (positive or negative gain) for up to 8 channels on unit 1.
R01AN1666EJ0220 Rev. 2.20
Page 3 of 74
Dec 01, 2016

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents