Figure 4-17 A/D Converter Interrupts - Fujitsu F2MC-8FX Series User Manual

8-bit microcontroller bits pot yellow lin board
Hide thumbs Also See for F2MC-8FX Series:
Table of Contents

Advertisement

The A/D conversion is started in the A/D converter initialization function. Thereafter, when the A/D
conversion is finished, an A/D converter interrupt is created as shown in "Figure 4-17 A/D converter
interrupts". Here, the A/D conversion values are acquired from the Volume SW or temperature
sensor. If using the SW, the PPG timer cycle and duty changes are implemented using the A/D
conversion values that have been acquired, to change the sound of the buzzer. If using the
temperature sensor, the temperature is displayed according to the A/D conversion values acquired.
__interrupt void ad_int(void)
{
IO_ADC1.bit.ADI = 0;
ad = ~IO_ADD.byte.ADDL;
if (TEMP_MEASURE_OFF){
else if (TEMP_MEASURE_ON){
}
IO_ADC1.bit.AD = 1;
}
if(ad < 51){
IO_PPS00 = 0xFA;
IO_PDS00 = 0x7D;
}
else if(ad < 102){
(Omitted)
}
if(ad < 66)
{
IO_PDR1.bit.P14 = 0;
IO_PDR1.bit.P15 = 1;
IO_PDR1.bit.P16 = 0;
}
(Omitted)
Start A/D conversion

Figure 4-17 A/D converter interrupts

78
Acquire A/D conversion value
If using Volume SW
Change interval
If using temperature sensor
Change LED display
AN07-00200-03E

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mb95f136jbs

Table of Contents