
SH7080 Group
A/D Conversion in Single-cycle Scan Mode
REJ06B0699-0100/Rev.1.00 January 2008 Page 10 of 19
5. Description of Software
5.1 List of Functions
The functions of this sample application are listed below.
Table 4 List of Functions
Function Name Description
main() Initializes A/D converter module 0 and calls the A/D conversion routine.
ad_conv() Starts A/D conversion and stores the results of conversion in the on-chip RAM.
5.2 Variables Used
The variables used in this sample application are listed below.
Table 5 List of Variables
Variable/Label Name Description
Referring
function
Unsigned short Ad_data[AD][CH] Array (2 bytes) for storing A/D-converted data.
AD indicates the number of rounds of A/D conversion, i.e.
3 in this sample application.
CH indicates the number of channels, i.e. 4 in this sample
application.
ad_conv()
Unsigned char ad_count A/D conversion counter ad_conv()
Unsigned char ch_count A/D conversion channel number counter ad_conv()
5.3 Section Assignment
Section assignment for this sample application is as follows.
Table 6 Section Assignment
Address Section Name Description
H'00000000 DVECTTBL, DINTTBL,
PIntPRG
DVECTTBL: Exception vector table
DINTTBL: Interrupt vector table
PIntPRG: Interrupt program
H'00000800 PResetPRG Reset program
H'00001000 P, C$BSEC, C$DEC, D P: Program area
C$BSEC: Stores an address for B section initialization.
C$DEC: Stores an address for D section initialization.
D: Stores data.
H'FFFF4000 B, R B: uninitialized data area
R: initialized data
H'FFFFBC00 S Stack area
Comentarios a estos manuales