Datasheet
Table Of Contents
- Features
- Applications
- Functional Block Diagram
- General Description
- Revision History
- Specifications
- Absolute Maximum Ratings
- Pin Configurations and Function Descriptions
- Typical Performance Characteristics
- Terminology
- Explanation of Typical Performance Plots
- Memory Organization
- Special Function Registers (SFRs)
- Special Function Registers
- ADC Circuit Information
- Calibrating the ADC
- Initiating Calibration in Code
- Nonvolatile Flash/EE Memory
- Using the Flash/EE Data Memory
- User Interface to Other On-Chip ADuC832 Peripherals
- On-Chip PLL
- Pulse-Width Modulator (PWM)
- PWM Modes of Operation
- Serial Peripheral Interface
- I2C-Compatible Interface
- Dual Data Pointers
- Power Supply Monitor
- Watchdog Timer
- Time Interval Counter (TIC)
- 8052-Compatible On-Chip Peripherals
- Timer/Counter 0 And Timer/Counter 1 Operating Modes
- Timer/Counter 2
- UART Serial Interface
- SBUF
- SCON (UART Serial Port Control Register)
- Mode 0: 8-Bit Shift Register Mode
- Mode 1: 8-Bit UART, Variable Baud Rate
- Mode 2: 9-Bit UART with Fixed Baud Rate
- Mode 3: 9-Bit UART with Variable Baud Rate
- UART Serial Port Baud Rate Generation
- Timer 1 Generated Baud Rates
- Timer 2 Generated Baud Rates
- Timer 3 Generated Baud Rates
- Interrupt System
- ADuC832 Hardware Design Considerations
- Other Hardware Considerations
- Development Tools
- Outline Dimensions

ADuC832 Data Sheet
Rev. B | Page 44 of 92
INITIATING CALIBRATION IN CODE
When calibrating the ADC using ADCCON1, the ADC should
be set up into the configuration in which it will be used. The
ADCCON3 register can then be used to set up the device and
calibrate the ADC offset and gain.
MOV ADCCON1,#0ACH
;ADC on; ADCCLK set
;to divide by 16,4
;acquisition clock
To calibrate device offset:
MOV ADCCON2,#0BH
;select internal AGND
MOV ADCCON3,#25H
;select offset calibration,
;31 averages per bit,
;offset calibration
To calibrate device gain:
MOV ADCCON2,#0CH
;select internal V
REF
MOV ADCCON3,#27H
;select offset calibration,
;31 averages per bit,
;offset calibration
To calibrate system offset:
Connect system AGND to an ADC channel input (0).
MOV ADCCON2,#00H
;select external AGND
MOV ADCCON3,#25H
;select offset calibration,
;31 averages per bit
To calibrate system gain:
Connect system V
REF
to an ADC channel input (1).
MOV ADCCON2,#01H
;select external V
REF
MOV ADCCON3,#27H
;select offset calibration
;31 averages per bit,
;offset calibration
The calibration cycle time, t
CAL
, is calculated by the following
equation:
t
CAL
= 14 × ADCCLK × NUMAV × (16 + t
ACQ
)
For an ADCCLK/f
CORE
divide ratio of 16, with t
ACQ
= 4 ADCCLK,
and NUMAV = 15, the calibration cycle time is:
t
CAL
= 14 × (1/1,048,576) × 15 × (16 + 4)
t
CAL
= 4.2 ms
In a calibration cycle, the ADC busy flag (ADCCON3[7]),
instead of framing an individual ADC conversion as in normal
mode, goes high at the start of calibration and only returns to 0
at the end of the calibration cycle. It can therefore be monitored
in code to indicate when the calibration cycle is completed. The
following code can be used to monitor the busy signal during a
calibration cycle:
WAIT:
MOV A, ADCCON3
;move ADCCON3 to A
JB ACC.7, WAIT
;If Bit 7 is set, jump to
WAIT, else continue