EM78P468N LCD显示的应用
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
二、 三、
编程注意事项 ....................................................................................................... 3 LCD 显示范例程序 ............................................................................................... 3
ELAN MICROELECTRONICS CORPORATION
Headquarters: No. 12, Innovation Road 1 Hsinchu Science Park Hsinchu, Taiwan 308 Tel: +886 3 563-9977 Fax: +886 3 563-9966 http://www.emc.com.tw Hong Kong: Elan (HK) Microelectronics Corporation, Ltd. Flat A, 19F., World Tech Centre 95 How Ming Street, Kwun Tong Kowloon, HONG KONG Tel: +852 2723-3376 Fax: +852 2723-7780 elanhk@emc.com.hk Shenzhen: Elan Microelectronics Shenzhen, Ltd. 3F, SSMEC Bldg., Gaoxin S. Ave. I Shenzhen Hi-tech Industrial Park (South Area), Shenzhen CHINA 518057 Tel: +86 755 2601-0565 Fax: +86 755 2601-0500 USA: Elan Information Technology Group (USA) P.O. Box 601 Cupertino, CA 95015 USA Tel: +1 408 366-8225 Fax: +1 408 366-8225
EM78P468N LCD显示的应用
目
一、
录
相关寄存器 ........................................................................................................... 2
1、 R9(CLDCR:LCD 控制寄存器)·················································································· 2 2、 RA(LCD_ADDR:LCD 地址寄存器) ········································································· 2 3、 RB(LCD_DB:LCD 数据缓存器) ··············································································· 3
Βιβλιοθήκη Baidu
Copyright © 2008 by ELAN Microelectronics Corporation All Rights Reserved Printed in Taiwan
The contents of this specification are subject to change without further notice. ELAN Microelectronics assumes no responsibility concerning the accuracy, adequacy, or completeness of this specification. ELAN Microelectronics makes no commitment to update, or to keep current the information and material contained in this specification. Such information and material may change to conform to each confirmed order. In no event shall ELAN Microelectronics be made responsible for any claims attributed to errors, omissions, or other inaccuracies in the information or material contained in this specification. ELAN Microelectronics shall not be liable for direct, indirect, special incidental, or consequential damages arising from the use of such information or material. The software (if any) described in this specification is furnished under a license or nondisclosure agreement, and may be used or copied only in accordance with the terms of such agreement. ELAN Microelectronics products are not intended for use in life support appliances, devices, or systems. Use of ELAN Microelectronics product in such applications is not supported and is prohibited. NO PART OF THIS SPECIFICATION MAY BE REPRODUCED OR TRANSMITTED IN ANY FORM OR BY ANY MEANS WITHOUT THE EXPRESSED WRITTEN PERMISSION OF ELAN MICROELECTRONICS.
LCDTYPE LCDF1
Bit 7 (BS):LCD bias 选择位 0:1/2 bias 1:1/3 bias Bit6~Bit5(DS1~DS0):LCD duty 选择位
DS1 0 0 1 DS0 0 1 LCD duty 1/2 duty 1/3 duty 1/4 duty
Bit4(LCDEN): LCD 使能位 0:LCD 电路关闭,所有公共驱动段输出设置为低电平 1:LCD 电路打开 Bit2(LCDTYPE) :LCD 驱动波形选择 0:A 类波形 1:B 类波形 Bit1~Bit0(LCDF1~LCDF0) :LCD 帧频控制位,一般设置为 “1”
3、 RB(LCD_DB:LCD 数据缓存器)
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3
LCD_D3
Bit 2
LCD_D2
Bit 1
LCD_D1
Bit 0
LCD_D0
Bit3~Bit0(LCD_D3~LCD_D0):LCD RAM 数据传输寄存器
二、 编程注意事项
在编写液晶显示模块程序时,需要注意以下事项: 1、 duty 和 bias 根据液晶的实际参数来设置, 显示的地址和数据分别通过寄存器 RA 和 RB 来控制,还要特别注意液晶的工作电压,以免造成鬼影等不正常现象; 2、 在编写显示部分程序时,应做到整屏刷新,以避免干扰。
注意: Fs为副频振荡频率
2、 RA(LCD_ADDR:LCD 地址寄存器)
Bit 7 0
2
Bit 6 0
Bit 5 0
Bit 4 LCD_A4
Bit 3 LCD_A3
Bit 2 LCD_A2
Bit 1 LCD_A1
Bit 0 LCD_A0
EM78P468N应用笔记
EM78P468N LCD显示的应用
Bit4~Bit0:LCD RAM 地址
RA (LCD 地址) 00H 01H 02H | 1DH 1EH 1FH 公共驱动 COM3 RB (LCD 数据缓存器) Bits 7 ~4 Bit 3 Bit 2 Bit 1 Bit 0 (LCD_D3) (LCD_D2) (LCD_D1) (LCD_D0) | COM2 COM1 COM0 段 SEG0 SEG1 SEG2 | SEG29 SEG30 SEG31
EM78P468N应用笔记
1
EM78P468N LCD显示的应用
EM78P468N LCD 显示的应用
一、 相关寄存器
1、 R9(CLDCR:LCD 控制寄存器)
Bit 7 BS Bit 6 DS1 Bit 5 DS0 Bit 4 LCDEN Bit 3 -Bit 2 Bit 1 Bit 0 LCDF0
1、 汇编范例: ······················································································································· 3 2、 C 范例: ··························································································································· 8
三、 LCD显示范例程序
1、 汇编范例:
下面程序演示的是 LCD 4 位数字 0-9 的循环显示,程式的 Duty 和 Bias 是根据所使用的 LCD 来设置,以下程式中设置为 1/4 duty 和 1/3 bias,使用 SEG0~SEG11 线,LCD 显示地 址和数据分别是由 LCD_ADDR(RA)和 LCD_DB(RB)控制。另附所使用 LCD 图形。 ;********************************************************* ;LCD 显示屏移除显示 0 到 9 ;********************************************************* ;MCU:EM78P468N ;Oscillator:Fm:4MHz Fs:32.768KHz
Shanghai: Elan Microelectronics Shanghai, Ltd. #23, Zone 115, Lane 572, Bibo Rd. Zhangjiang Hi-Tech Park Shanghai, CHINA 201203 Tel: +86 21 5080-3866 Fax: +86 21 5080-4600
LCDF1 0 0 1 1 LCDF0 0 1 0 1 LCD 帧频(例. *Fs=32.768kHz) 1/2 占空比 Fs/(2562)=64.0 Fs/(2802)=58.5 Fs/(3042)=53.9 Fs/(2322)=70.6 1/3 占空比 Fs/(1723)=63.5 Fs/(1883)=58.0 Fs/(2043)=53.5 Fs/(1563)=70.0 1/4 占空比 Fs/(1284)=64.0 Fs/(1404)=58.5 Fs/(1524)=53.9 Fs/(1164)=70.6
EM78P468N
LCD显示的应用
义隆电子股份有限公司
第一版 2009年6月
Trademark Acknowledgments: IBM is a registered trademark and PS/2 is a trademark of IBM. Windows is a trademark of Microsoft Corporation. ELAN and ELAN logo are trademarks of ELAN Microelectronics Corporation.