Bluemoon-EVB LCD Application Note

Fujitsu Semiconductor Design (Chengdu) Co., Ltd.
Application Note
MCU-AN-510109-E-10
32-BIT MICROCONTROLLER
MB9AA30N SERIES
BLUEMOON-EVB_LCD
APPLICATION NOTE
ARM and Cortex-M3 are the trademarks of ARM Limited in the EU and other countries.
Bluemoon-EVB_LCD V1.0.0
Revision History
Revision History
Version
Date
Updated by
1.0.0
2012-10-30
Abel Ma
Approved by
Modifications
First Draft
This manual contains 13 pages.
Specifications are subject to change without notice. For further information please contact each office.
All Rights Reserved.
The contents of this document are subject to change without notice.
Customers are advised to consult with sales representatives before ordering.
The information, such as descriptions of function and application circuit examples, in this document are presented solely
for the purpose of reference to show examples of operations and uses of FUJITSU SEMICONDUCTOR device; FUJITSU
SEMICONDUCTOR does not warrant proper operation of the device with respect to use based on such information. When
you develop equipment incorporating the device based on such information, you must assume any responsibility arising
out of such use of the information.
FUJITSU SEMICONDUCTOR assumes no liability for any damages whatsoever arising out of the use of the information.
Any information in this document, including descriptions of function and schematic diagrams, shall not be construed as
license of the use or exercise of any intellectual property right, such as patent right or copyright, or any other right of
FUJITSU SEMICONDUCTOR or any third party or does FUJITSU SEMICONDUCTOR warrant non-infringement of
any third-party's intellectual property right or other right by using such information. FUJITSU SEMICONDUCTOR
assumes no liability for any infringement of the intellectual property rights or other rights of third parties which would
result from the use of information contained herein.
The products described in this document are designed, developed and manufactured as contemplated for general use,
including without limitation, ordinary industrial use, general office use, personal use, and household use, but are not
designed, developed and manufactured as contemplated (1) for use accompanying fatal risks or dangers that, unless
extremely high safety is secured, could have a serious effect to the public, and could lead directly to death, personal injury,
severe physical damage or other loss (i.e., nuclear reaction control in nuclear facility, aircraft flight control, air traffic
control, mass transport control, medical life support system, missile launch control in weapon system), or (2) for use
requiring extremely high reliability (i.e., submersible repeater and artificial satellite).
Please note that FUJITSU SEMICONDUCTOR will not be liable against you and/or any third party for any claims or
damages arising in connection with above-mentioned uses of the products.
Any semiconductor devices have an inherent chance of failure. You must protect against injury, damage or loss from such
failures by incorporating safety design measures into your facility and equipment such as redundancy, fire protection, and
prevention of over-current levels and other abnormal operating conditions.
Exportation/release of any products described in this document may require necessary procedures in accordance with the
regulations of the Foreign Exchange and Foreign Trade Control Law of Japan and/or US export control laws.
The company names and brand names herein are the trademarks or registered trademarks of their respective owners.
Copyright © 2012 Fujitsu Semiconductor Design (Chengdu) Co., Ltd. All rights reserved.
MCU-AN-510109-E-10 – Page 2
Bluemoon-EVB_LCD V1.0.0
Contents
Contents
REVISION HISTORY ............................................................................................................ 2
CONTENTS .......................................................................................................................... 3
1 INTRODUCTION .............................................................................................................. 4
1.1
Purpose ................................................................................................................... 4
1.2
Document Overview ................................................................................................ 4
2 LCD INTRODUCTION ...................................................................................................... 5
2.1
2.2
LCD Driver Principle ................................................................................................ 5
2.1.1
LCD Principle ............................................................................................. 5
2.1.2
Terms Used For LCD controller ................................................................. 5
Configuration of LCD Controller............................................................................... 6
3 HARDWARE INTRODUCTION ........................................................................................ 7
3.1
LCD Controller Overview ......................................................................................... 7
3.2
Bluemoon EV Board Hardware................................................................................ 7
4 FIRMWARE INTRODUCTION.......................................................................................... 8
4.1
Firmware Overview ................................................................................................. 8
4.2
Application Interface ................................................................................................ 9
4.2.1
LcdComPin_Int(uint8_t) ............................................................................. 9
4.2.2
LcdSegPin_Int() ......................................................................................... 9
4.2.3
LCD_Init() .................................................................................................. 9
4.2.4
LcdDisp() ................................................................................................... 9
4.2.5
LcdWriteData(uint8_t, uint8_t, uint8_t) ..................................................... 10
4.2.6
LcdWriteColon(uint8_t) ............................................................................ 10
4.2.7
ShowWichPlaceBlink(uint8_t, uint8_t, uint8_t) ......................................... 10
4.2.8
Lvd_Init() ................................................................................................. 10
5 USAGE NOTICE ............................................................................................................ 11
6 ADDITIONAL INFORMATION ....................................................................................... 12
7 APPENDIX ..................................................................................................................... 13
7.1
List of Figures and Tables ..................................................................................... 13
MCU-AN-510109-E-10 – Page 3
Bluemoon-EVB_LCD V1.0.0
Chapter 1 Introduction
1
Introduction
1.1
Purpose
This application note describes LCD sample codes, designed to operate the 8 COM
segment LCD driver modules in bluemoon EVB which is build up in MB9AA30N series MCU.
Added to that is the descriptions of how to use this sample code and some notices.
Certainly, user can use it for other type LCD.
1.2
Document Overview
The rest of document is organized as the following:
Chapter 2 explains LCD Introduction.
Chapter 3 explains Hardware Introduction.
Chapter 4 explains Firmware Introduction.
MCU-AN-510109-E-10 – Page 4
Bluemoon-EVB_LCD V1.0.0
Chapter 2 LCD Introduction
2 LCD Introduction
LCD working principles
2.1
LCD Driver Principle
2.1.1 LCD Principle
Figure 2-1: COM and SEG signal layout Example in a LCD symbol
Each symbol on LCD is controlled by no less than 1 common signal and 1 segment signals.
The ON or OFF status of which symbol is determined by both common and segment outputs.
2.1.2 Terms Used For LCD controller
LCD clock drives the LCD controller, Cycle of AC waveform which drives LCD. By its nature,
LCD causes deterioration to its LCD elements if DC driver because the LCD elements are
affected by chemical changes. To avoid this situation, the LCD controller incorporates AC
waveform generator to generate AC waveform consisting of 2 frames: an odd frame and an
even frame(inverted odd frame), allowing driving the LCD.
Figure 2-2: Terms Used For LCD controller
MCU-AN-510109-E-10 – Page 5
Bluemoon-EVB_LCD V1.0.0
Chapter 2 LCD Introduction
2.2
Configuration of LCD Controller
The LCD controller consists of the following blocks, which are divided functionally into a
controller section that generates the segment and common signals based on the content of
display RAM and a driver section that drives the LCD.
Figure 2-3: LCD Controller Block Diagram
MCU-AN-510109-E-10 – Page 6
Bluemoon-EVB_LCD V1.0.0
Chapter 3 Hardware Introduction
3 Hardware Introduction
LCD hardware connection introduction
3.1
LCD Controller Overview
The LCD drive voltage is generated by divider resistors, includes internal or external divider
resistors, as Figure 3-1 shows
Internal resistor
External resistor
Figure 3-1: Divider Resistor Connection
The internal divider resistor consists of 10K and 100K resistors. The value of these divider
resistors we should base on the detail LCD parameters.
VR is an external variable resistor, connect it to adjust the voltage at pin VV4.
3.2
Bluemoon EV Board Hardware
The VR and divider resistors effect to adjust LCD brightness base on VCC. Bluemoon EV
board used 3.3V or 5V power supply, so uses internal divider resistors to generate LCD
drive voltage, as Figure 3-2 shows:
When power supply is 5V, we used internal 10K resistors.
When power supply is 3.3V, we used internal 100K resistors.
We can get the power supply voltage via MCU LVD function.
Figure 3-2: Bluemoon EVB Divider Resistor Connection
MCU-AN-510109-E-10 – Page 7
Bluemoon-EVB_LCD V1.0.0
Chapter 4 Firmware Introduction
4 Firmware Introduction
LCD firmware introduction
4.1
Firmware Overview
All the parameters and functions are introduced as follow.
Table 4-1: Parameters List
Name
Description
Remarks
ComMap[]
LCD comx actual connect to which MCU comx
N/A
SegMap[]
LCD segx actual connect to which MCU segx
N/A
LCD_DigitBitMap[][]
Display content map base on LCD which is used bluemoon evb
N/A
LcdDisplayBuffer
LCD display buffer
N/A
PowerSupply
Current EV Board power supply
N/A
Table 4-2: Functions List
Prototype
Function Description
void LcdComPin_Int(uint8_t)
Base on actual hardware connect init
the com pin
Base on actual hardware connect init
the segment pin
N/A
void LCD_Init(void)
Init LCD controller
N/A
void LcdDisp(void)
Display the buffer data to LCD
N/A
void LcdWriteData(uint8_t, uint8_t, uint8_t)
Write data to LCD display buffer
N/A
void LcdWriteColon(uint8_t)
Write colon to LCD display buffer
N/A
void ShowWhichPlaceBlink(uint8_t, uint8_t, uint8_t)
Appoint a place, the display is blink
N/A
void Lvd_Init(void)
Init MCU LVD
N/A
void LcdSegPin_Int(void)
MCU-AN-510109-E-10 – Page 8
Remarks
N/A
Bluemoon-EVB_LCD V1.0.0
Chapter 4 Firmware Introduction
4.2
Application Interface
All the functions about LCD will be introduced as below, include the function prototype, input
parameter(s), return value(s), and the function description.
4.2.1 LcdComPin_Int(uint8_t)
Prototype
void LcdComPin_Int(uint8_t mode)
Parameter
mode: 4 – 4 com mode
8 – 8 com mode
other is invalid
Return
void
Description
Base on actual hardware connect init the com pin
Remark
N/A
4.2.2 LcdSegPin_Int()
Prototype
void LcdSegPin_Int(void)
Parameter
void
Return
void
Description
Base on actual hardware connect init the segment pin
Remark
N/A
4.2.3 LCD_Init()
Prototype
void LCD_Init(void)
Parameter
void
Return
void
Description
Init LCD controller
Remark
N/A
4.2.4 LcdDisp()
Prototype
void LcdDisp(void)
Parameter
void
Return
void
Description
Display the buffer data to LCD
Remark
N/A
MCU-AN-510109-E-10 – Page 9
Bluemoon-EVB_LCD V1.0.0
Chapter 4 Firmware Introduction
4.2.5 LcdWriteData(uint8_t, uint8_t, uint8_t)
Prototype
void LcdWriteData(uint8_t dat, uint8_t place, uint8_t point)
Parameter:
dat: needs display data
Place: place of display
Point: if display radix point 1:yes other: no
Return
void
Description
Write data to LCD display buffer
Remark
N/A
4.2.6 LcdWriteColon(uint8_t)
Prototype
void LcdWriteColon(uint8_t place)
Parameter:
place: display place
Return
void
Description
Write colon to LCD display buffer
Remark
N/A
4.2.7 ShowWichPlaceBlink(uint8_t, uint8_t, uint8_t)
Prototype
Parameter:
void ShowWhichPlaceBlink(uint8_t WhichPlace, uint8_t ReplaceDate1, uint8_t
ReplaceDate2)
Place: place of blink display
ReplceDate1: need replace data in place
ReplceDate2: need replace data in place+1
Return
void
Description
A point a place, the display is blink
Remark
Spread Function
4.2.8 Lvd_Init()
Prototype
void Lvd_Init(void)
Parameter:
void
Return
void
Description
LVD initialization, detected voltage fall 4V, LVD interrupt
Remark
Spread Function
MCU-AN-510109-E-10 – Page 10
Bluemoon-EVB_LCD V1.0.0
Chapter 5 Usage Notice
5 Usage Notice
The usage notice

LCD Initialization
Sometime the LCD segment pin is not connected corresponding to MCU segment pin (for
example: LCD seg11 is used MCU seg19 pin in bluemoon EV Board). So before initialization
LCD controller, user should check array ComMap[] and SegMap[][] to insure its accuracy.

Driver Resistors
The LCD controller has an LCD drive voltage divider resistor whose resistor value can be
selected from 10kΩ or 100kΩ through software. An external divider resistor can also be used
instead.

LVD Function
The bluemoon EV Board allows 3.3V or 5V voltage power supply and the LCD controller
auto- adapt power, so should used LVD function.
MCU-AN-510109-E-10 – Page 11
Bluemoon-EVB_LCD V1.0.0
Chapter 6 Additional Information
6 Additional Information
For more Information on FUJITSU semiconductor products, visit the following websites:
English version address:
http://www.fujitsu.com/cn/fsp/services/mcu/32bit/fm3/an.html
Chinese version address:
http://www.fujitsu.com/cn/fss/services/mcu/32bit/fm3/an.html
MCU-AN-510109-E-10 – Page 12
Bluemoon-EVB_LCD V1.0.0
Chapter 7 Appendix
7 Appendix
7.1
List of Figures and Tables
Table 4-1: Parameters List ..................................................................................................... 8
Table 4-2: Functions List ........................................................................................................ 8
Figure 2-1: COM and SEG signal layout Example in a LCD symbol ....................................... 5
Figure 2-2: Terms Used For LCD controller ........................................................................... 5
Figure 2-3: LCD Controller Block Diagram ............................................................................. 6
Figure 3-1: Divider Resistor Connection ................................................................................. 7
Figure 3-2: Bluemoon EVB Divider Resistor Connection ........................................................ 7
MCU-AN-510109-E-10 – Page 13