User manual
PIC18F87J72 Evaluation Board Firmware Flowchart
© 2011 Microchip Technology Inc. DS51990A-page 27
FIGURE 4-4: Key Press Routine to Configure Gain of Channel CH1.
gain2_value
= 0
gain2_value
= 1
gain2_value
= 2
gain2_value
= 3
CH1
Gain=1,
Write
Display
GAIN = 1 on
LCD
CH1
Gain=2,
Write
Display
GAIN = 2 on
LCD
CH1
Gain=8,
Write
Display
GAIN = 8 on
LCD
CH1
Gain=4,
Write
Display
GAIN = 4 on
LCD
gain2_value
= 4
CH1
Gain=16,
Write
Display
GAIN = 16 on
LCD
Disable Global
Interrupts
Enable Global
Interrupts
Disable Global
Interrupts
Disable Global
Interrupts
Disable Global
Interrupts
Disable Global
Interrupts
Enable Global
Interrupts
Enable Global
Interrupts
Enable Global
Interrupts
Enable Global
Interrupts
YES
YES YES YES YES
NONONO
NO
Idle
gain2_value
= 5
CH1
Gain=32,
Write
Display
GAIN = 32 on
LCD
Disable Global
Interrupts
Enable Global
Interrupts
YES
NO
3