Figure 4-12 Operation Mode Settings (When Using Volume Switch); Figure 4-13 Operation Mode Settings (When Using The Temperature Sensor) - 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 flowcharts for the sample programs are shown in "Figure 4-11 Single-unit operation flowcharts".
First, the ports, interrupt levels, external interrupts, and A/D converter are initialized. Thereafter, the
program enters a loop. Here, when SW2 is pressed, an external interrupt is created, and the LED
on/of processing is performed. Further, when SW3 is pressed, the buzzer is output. Here, the buzzer
sound can be changed by operating the Volume SW.
So, let us look at an actual program.
Check the following folder for the sample program. The folder contains several files. First, open
"main.c".
¥bitpot_yellow_SampleProgram_single-chip¥single_operation¥source
Check around the line 37 as shown in "Figure 4-12 Operation mode settings (when using volume
switch)" to select the operation mode. #define is set, so that whether to use the temperature sensor,
and the enable/disable settings can be configured. To use the Volume SW for inputs to the A/D
converter, configure the settings as shown in Figure 4-14, and to use the temperature sensor,
configure the settings as shown in Figure 4-15.
In this explanation, the temperature sensor is not used, but use of the volume switch is enabled.
/* Temperature sensor use (1), or unused (0)
#define TEMP_SENSOR_USE
/* Temperature measurement permission, non-permission */
#define TEMP_MEASURE_ON
#define TEMP_MEASURE_OFF

Figure 4-12 Operation mode settings (when using volume switch)

/* Temperature sensor use (1), or unused (0)
#define TEMP_SENSOR_USE
/* Temperature measurement permission, non-permission */
#define TEMP_MEASURE_ON
#define TEMP_MEASURE_OFF

Figure 4-13 Operation mode settings (when using the temperature sensor)

Note: The operation mode settings must be configured not only for main.c, but also for ADC.c and
ext_int.c.
*/
Temperature sensor not used
(0)
Temperature sensor disabled
(0)
Volume SW enabled
(1)
*/
Temperature sensor used
(1)
Temperature sensor enabled
(1)
Volume switch disabled
(0)
75
AN07-00200-03E

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mb95f136jbs

Table of Contents