User manual

PIC18F87J72 Evaluation Board User’s Guide
DS51990A-page 26 © 2011 Microchip Technology Inc.
FIGURE 4-3: Key Press Routine to Configure Gain of Channel CH0.
gain1_value
= 0
gain1_value
= 1
gain1_value
= 2
gain1_value
= 3
CH0
Gain=1,
Write
Display
GAIN = 1 on
LCD
CH0
Gain=2,
Write
Display
GAIN = 2 on
LCD
CH0
Gain=8,
Write
Display
GAIN = 8 on
LCD
CH0
Gain=4,
Write
Display
GAIN = 4 on
LCD
gain1_value
= 4
CH0
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
gain1_value
= 5
CH0
Gain=32,
Write
Display
GAIN = 32 on
LCD
Disable Global
Interrupts
Enable Global
Interrupts
YES
NO
2