Figure 4-15 Sw2 Interrupts (Led On/Off Processing); Figure 4-16 Sw3 Interrupts (Buzzer Output Processing) - 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

Next, an interrupt is created when SW2 is pushed. The external interrupt function _interrupt void
Ext_int1_5 in ext_int.c will be called as shown in "Figure 4-15 SW2 interrupts (LED on/off
processing)".Here, the LED display is turned on/off, due to the output settings for the port connected
to the LED, or due to the switch being pressed several times, is shown.
_ interrupt void Ext_int1_5(void)
{
IO_EIC20.bit.EIR1 = 0;
if (TEMP_MEASURE_OFF){
}
else if(TEMP_MEASURE_ON){
}
}
An interrupt is also created if SW3 is pressed, and the external interrupt function __interrupt void
Ext_int2_6 in ext_int.c is called as shown in "Figure 4-16 SW3 interrupts (buzzer output
processing)".This is where the PPG timer output settings are made, and timer start/stop process is
performed.
__interrupt void Ext_int2_6(void)
{
IO_EIC30.bit.EIR0 = 0;
IO_PC00.byte = 0x0E;
IO_PPGS.byte = ~IO_PPGS.byte;
}

Figure 4-16 SW3 interrupts (buzzer output processing)

IO_DDR1.bit.P14 = 1;
IO_DDR1.bit.P15 = 1;
IO_DDR1.bit.P16 = 1;
SW_count++;
if(SW_count > 3){
SW_count = 0;
}
IO_PDR1.byte = LED_pat[SW_count];
(Omitted)

Figure 4-15 SW2 interrupts (LED on/off processing)

When using Volume SW
Port output setting
LED ON processing
Using temperature sensor
PPG timer output setting
PPG timer start/stop
77
AN07-00200-03E

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mb95f136jbs

Table of Contents