Swra 471
Swra 471
Swra 471
Fredrik Eriksen
ABSTRACT
This application report provides the necessary information in order to use the voltage sensor of the
CC112x and CC120x family. The voltage sensor can be used to monitor the supply and battery voltage
(VDD).
Contents
1 Acronyms Used in This Document ........................................................................................ 2
2 Digital Readout of Supply Voltage (VDD) .................................................................................. 2
3 Calibration Example ......................................................................................................... 3
4 References ................................................................................................................... 4
Appendix A CC120X Code for Digital Readout................................................................................ 5
List of Tables
1 Register Settings for Digital Readout Using CC112X ................................................................... 2
2 Register Settings for Digital Readout Using CC120X ................................................................... 3
3 ADC Value vs Supply Voltage ............................................................................................. 3
Acronym Description
ADC Analog-to-Digital Converter
DC Direct Current
IF Intermediate Frequency
IFAMP Intermediate Frequency Amplifier
IFADC Intermediate Frequency Analog-to-Digital Converter
RX Receive (mode)
2.1 Operation
The IFADC in the receive chain is used to convert the analog sensor voltage to a digital value, which can
be read from the CHFILT register.
In order to get a digital readout the following must be done:
• The chip must be in receive mode (RX).
• The DC filter must be disabled and the IF frequency set to zero. Otherwise the DC information is
filtered out.
• The IFAMP must be off and this is done with the chip set in debug mode. For details about debug
mode, see Section 2.2. Note that the chip needs to be reset (by issuing an SRES strobe) to get out of
debug mode.
• Optionally the DVGA_GAIN setting in the MDMCFG1 register can be adjusted to increase/decrease
the amplitude of the signal to prevent an overflow in the output value.
• Table 1 and Table 2 list the registers used to activate digital readout when using CC112x and CC120x,
respectively. For details, see code in Appendix A. All the SPI functions used in the code is found in the
CC112x and CC120x software examples ( [7] and [8]).
3 Calibration Example
The voltage offset in the ADC varies from chip to chip; therefore, it is necessary to do a calibration before
use.
Figure 1 shows that the digital readout is quite linear to the related voltage and a simple linear equation is
sufficient for coarse voltage measurement.
The equation can be found by performing measurements across the wanted voltage range and make a
trend line as shown Table 3. The equation for the trend line can then be used in the software to calculate
the supply and battery voltage. The equation found in this example is:
Voltage = 0.0001 * ADCvalue - 7.9 (1)
4 References
1. CC1120 High-Performance RF Transceiver for Narrowband Systems Data Sheet (SWRS112)
2. CC1121 High-Performance Low-Power RF Transceiver Data Sheet (SWRS111)
3. CC1125 Ultra-High Performance RF Narrowband Transceiver Data Sheet (SWRS120)
4. CC112X/CC1175 Low-Power High Performance Sub-1 GHz RF Transceivers/Transmitter User's Guide
(SWRU295)
5. CC1200 Low-Power, High-Performance RF Transceiver Data Sheet (SWRS123)
6. CC120X Low-Power High Performance Sub-1 GHz RF Transceivers User's Guide (SWRU346)
7. CC112x Software Examples (http://www.ti.com/lit/zip/swrc219)
8. CC120x Software Examples (http://www.ti.com/lit/zip/swrc274)
The following code is for CC120x, but can easily be rewritten for use with the CC112x.
/*******************************************************************************
* @fn voltageRead
*
* @brief Reads voltage sensor
*
* @param none
*
* @return none
*/
static float voltageRead(void) {
// Variables
uint8 RegValue = 0;
uint8 marcStatus;
uint8 writeByte;
float voltage = 0;
// Configure ADC
writeByte = 0x02;
cc120xSpiWriteReg( CC120X_IF_ADC2, &writeByte, 1);
writeByte = 0xEE;
cc120xSpiWriteReg( CC120X_IF_ADC1, &writeByte, 1);
writeByte = 0x10;
cc120xSpiWriteReg( CC120X_IF_ADC0, &writeByte, 1);
// Zero-IF
writeByte = 0x00;
cc120xSpiWriteReg( CC120X_IF_MIX_CFG, &writeByte, 1);
// Disable DC_FILT
writeByte = 0x40;
cc120xSpiWriteReg( CC120X_DCFILT_CFG, &writeByte, 1);
// Set chip in RX
trxSpiCmdStrobe(CC120X_SRX);
// Strobe IDLE
trxSpiCmdStrobe(CC120X_SIDLE);
// Set IF AMP in PD
writeByte=0x1F;
cc120xSpiWriteReg( CC120X_WOR_EVENT0_LSB, &writeByte, 1);
// Return voltage
return voltage;
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, enhancements, improvements and other
changes to its semiconductor products and services per JESD46, latest issue, and to discontinue any product or service per JESD48, latest
issue. Buyers should obtain the latest relevant information before placing orders and should verify that such information is current and
complete. All semiconductor products (also referred to herein as “components”) are sold subject to TI’s terms and conditions of sale
supplied at the time of order acknowledgment.
TI warrants performance of its components to the specifications applicable at the time of sale, in accordance with the warranty in TI’s terms
and conditions of sale of semiconductor products. Testing and other quality control techniques are used to the extent TI deems necessary
to support this warranty. Except where mandated by applicable law, testing of all parameters of each component is not necessarily
performed.
TI assumes no liability for applications assistance or the design of Buyers’ products. Buyers are responsible for their products and
applications using TI components. To minimize the risks associated with Buyers’ products and applications, Buyers should provide
adequate design and operating safeguards.
TI does not warrant or represent that any license, either express or implied, is granted under any patent right, copyright, mask work right, or
other intellectual property right relating to any combination, machine, or process in which TI components or services are used. Information
published by TI regarding third-party products or services does not constitute a license to use such products or services or a warranty or
endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the
third party, or a license from TI under the patents or other intellectual property of TI.
Reproduction of significant portions of TI information in TI data books or data sheets is permissible only if reproduction is without alteration
and is accompanied by all associated warranties, conditions, limitations, and notices. TI is not responsible or liable for such altered
documentation. Information of third parties may be subject to additional restrictions.
Resale of TI components or services with statements different from or beyond the parameters stated by TI for that component or service
voids all express and any implied warranties for the associated TI component or service and is an unfair and deceptive business practice.
TI is not responsible or liable for any such statements.
Buyer acknowledges and agrees that it is solely responsible for compliance with all legal, regulatory and safety-related requirements
concerning its products, and any use of TI components in its applications, notwithstanding any applications-related information or support
that may be provided by TI. Buyer represents and agrees that it has all the necessary expertise to create and implement safeguards which
anticipate dangerous consequences of failures, monitor failures and their consequences, lessen the likelihood of failures that might cause
harm and take appropriate remedial actions. Buyer will fully indemnify TI and its representatives against any damages arising out of the use
of any TI components in safety-critical applications.
In some cases, TI components may be promoted specifically to facilitate safety-related applications. With such components, TI’s goal is to
help enable customers to design and create their own end-product solutions that meet applicable functional safety standards and
requirements. Nonetheless, such components are subject to these terms.
No TI components are authorized for use in FDA Class III (or similar life-critical medical equipment) unless authorized officers of the parties
have executed a special agreement specifically governing such use.
Only those TI components which TI has specifically designated as military grade or “enhanced plastic” are designed and intended for use in
military/aerospace applications or environments. Buyer acknowledges and agrees that any military or aerospace use of TI components
which have not been so designated is solely at the Buyer's risk, and that Buyer is solely responsible for compliance with all legal and
regulatory requirements in connection with such use.
TI has specifically designated certain components as meeting ISO/TS16949 requirements, mainly for automotive use. In any case of use of
non-designated products, TI will not be responsible for any failure to meet ISO/TS16949.
Products Applications
Audio www.ti.com/audio Automotive and Transportation www.ti.com/automotive
Amplifiers amplifier.ti.com Communications and Telecom www.ti.com/communications
Data Converters dataconverter.ti.com Computers and Peripherals www.ti.com/computers
DLP® Products www.dlp.com Consumer Electronics www.ti.com/consumer-apps
DSP dsp.ti.com Energy and Lighting www.ti.com/energy
Clocks and Timers www.ti.com/clocks Industrial www.ti.com/industrial
Interface interface.ti.com Medical www.ti.com/medical
Logic logic.ti.com Security www.ti.com/security
Power Mgmt power.ti.com Space, Avionics and Defense www.ti.com/space-avionics-defense
Microcontrollers microcontroller.ti.com Video and Imaging www.ti.com/video
RFID www.ti-rfid.com
OMAP Applications Processors www.ti.com/omap TI E2E Community e2e.ti.com
Wireless Connectivity www.ti.com/wirelessconnectivity
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265
Copyright © 2014, Texas Instruments Incorporated