User Manual

Jennic
JennicJennic
Jennic
46 JN-DS-JN5139 v1.5 © Jennic 2008
15.1 Analogue to Digital Converter
The 12-bit analogue to digital converter (ADC) uses a successive approximation design to perform high accuracy
conversions as typically required in wireless sensor network applications. It has six multiplexed single-ended input
channels: four available externally, one connected to an internal temperature sensor, and one connected to an
internal supply monitoring circuit.
15.1.1 Operation
The input range of the ADC can be set between 0V to either the reference voltage or twice the reference voltage.
The reference can be either taken from the internal voltage reference or from the external voltage applied to the
VREF pin. For example, an external reference of 1.2V supplied to VREF may be used to set the ADC range between
0V and 2.4V.
VREF Gain Setting Maximum Input Range Supply Voltage Range (VDD)
1.2V
1.6V
1.2V
1.6V
0
0
1
1
1.2V
1.6V
2.4V
3.2V
2.2V - 3.6V
2.2V - 3.6V
2.6V - 3.6V
3.4V - 3.6V
Table 5 ADC Reference and Gain Settings
The input clock to the ADC is 16MHz and is divided down to 500kHz. During an ADC conversion the selected input
channel is sampled for a fixed period and then held. This sampling period is defined as a number of ADC clock
periods and can be programmed to 2, 4, 6 or 8. The conversion rate is ((3 x Sample period) + 14) clock periods. For
example for 500KHz conversion with sample period of 2 will be (3 x 2) + 14 = 20 clock periods, 40usecs or 25KHz.
If the source resistance of the input voltage is 1kΩ or less, then the default sampling time of 2 clocks should be used.
The input to the ADC can be modelled as a resistor of 5kΩ to represent the on-resistance of the switches and the
sampling capacitor 8pF. The sampling time required can then be calculated, by adding the sensor source resistance
to the switch resistance, multiplying by the capacitance giving a time constant. Assuming normal exponential RC
charging, the number of time constants required to give an acceptable error can be calculated, 7 time constants gives
an error of 0.1%, so for 12-bit accuracy 10 time constants should be the target. For a source with zero resistance, 10
time constants is 800 nsecs, hence the smallest sampling window of 2 clock periods can be used.
The ADC sampling period, input range and mode (single shot or continuous) are controlled through software.
When the ADC conversion is complete, an interrupt is generated. Alternatively the conversion status can be polled.
When operating in continuous mode, it is recommended that the interrupt is used to signal the end of a conversion,
since conversion times may range from 36 to 60
µ
secs. Polling over this period would be wasteful of processor
bandwidth.
For detailed electrical specifications, see section 17.3.8.
15.1.2 Supply Monitor
The internal supply monitor allows the voltage on the analogue supply pin VDD1 to be measured. This is achieved
with a potential divider that reduces the voltage by a factor of 0.666, allowing it to fall inside the input range of the
ADC when set with an input range twice the internal voltage reference. The resistor chain that performs the voltage
reduction is disabled until the measurement is made to avoid a continuous drain on the supply.
15.1.3 Temperature Sensor
The on-chip temperature sensor can be used either to provide an absolute measure of the device temperature or to
detect changes in the ambient temperature. In common with most on-chip temperature sensors, it is not trimmed and
so the absolute accuracy variation is large; the user may wish to calibrate the sensor prior to use. The sensor forces
a constant current through a forward biased diode to provide a voltage output proportional to the chip die temperature
which can then be measured using the ADC. The measured voltage has a linear relationship to temperature as
described in section 17.3.11.