CY8CKIT-029 PSoC® LCD Segment Drive Expansion Board Kit Guide, Doc. # 001-55415 Rev. *K
29
5.
Code Examples
5.1
Code Example 1: LCD_Seg_Example1_Battery_Meter
This code example demonstrates the battery charge indicator along with the 14-segment display of
the LCD glass by implementing a battery meter. The battery meter is used to graphically display the
battery charge level; the 14-segment display is used to relay messages related to the battery charge
(full, medium, and low).
5.1.1
Project Description
The potentiometer on the DVK is used to increase and decrease the battery meter on the segment
LCD. The four segments in
Figure 4-3
(S2, S3, S4, and S5) have four voltage levels (1.25 V, 2.50 V,
3.75 V, and 5 V) to define the switching on/off of the battery meter. This is accomplished using count
values from the Delta-Sigma ADC available on PSoC 3. Based on the battery meter, 'Full', 'Medium',
and 'Low' are displayed on the 14-segment LCD display.
Figure 5-1. Battery Meter Firmware Flowchart
5.1.2
Running the Code Example
Follow the steps described in
Programming a PSoC 3/PSoC 5LP Device (processor module) on a
CY8CKIT-001 DVK on page 13
to program the PSoC 3 device with the Battery Meter code example.
Follow the steps described in
Programming a PSoC 3/PSoC 5LP Development Kit on page 16
to
program the PSoC 3/PSoC 5LP DVK with the Battery Meter code example.
5.1.3
Hardware Connections
See
Hardware Connection for CY8CKIT-001 DVK on page 18
for details on hardware connections
on CY8CKIT-001 DVK.
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from