| | 网站首页 | 新闻 | SOPC | FPGA | DSP | ARM | 嵌入式操作系统 | 下载 | 网上商城 | 芯片价格参考 | 留言 | 论坛 | 网络协议 | 驱动设计 | 购买指南-HowtoBuy | | |
![]() |
![]() |
| 您现在的位置: FPGA开发板 FPGA 开发板 SOPC开发板 DSP开发板 视频开发板 -嵌入式控制研究室 >> DSP >> DSP应用 >> 文章正文 |
|
|||||
| 微处理器仅用一条线驱动LCD的实现 | |||||
| 作者:佚名 文章来源:互联网 点击数: 更新时间:2007-12-12 | |||||
|
HD44780 LCD是嵌入式系统中最流行的文字数字显示装置。唯一的不足是它们在4位逐点显示模式下使用6个I/O管脚,8位模式下使用11个管脚。早期设计方案已经描述了许多节省或扩展I/O管脚的方法(参考文献1~3)。驱动兼容HD44780的LCD,使用基线微处理器替代逻辑芯片更好,因为微处理器价格低,占用空间小,且有可编程性。Microchip推出最小的PIC10F微处理器系列,具有6管脚SOT23封装形式。 图1中电路证明了,对任意管脚有限的嵌入式系统,单线与兼容HD44780显示的接口是可用的,这个单线串联为通过一个波特率9600的异步单一RS232协议。使用PIC10F202, PIC10F系列的任何一款都合适,因为列表1中高优化源代码允许程序代码少于256个字。尝试高于9600的波特率是没有用的,因为PIC10F202使用1%频率误差的RC内部晶振,LCD需要如说明书上所称“清屏”的延时时间为长达1.6ms。
列表1(程序列表见英文原文)为LCD232模块的 英文原文: Microcontroller drives LCD with just one wire A Microchip PIC10F family microcontroller sparks an HD44780 LCD using a single I/O pin. Noureddine Benabadji, University of Sciences and Technology, Oran, Algeria; Edited by Charles H Small and Fran Granville -- EDN, 12/3/2007 HD44780 LCDs are the most popular alphanumeric displays in embedded systems. The only downside is that they use six I/O pins in 4-bit nibble mode and as many as 11 pins in 8-bit mode. Earlier Design Ideas have described many approaches to saving or expanding I/O pins (reference 1, reference 2, and reference 3). In driving an HD44780-compatible LCD, it would be better to use a baseline microcontroller instead of logic chips, because the microcontroller is lower cost, uses less board space, and has programming features. Microchip has introduced the smallest PIC10F microcontroller family, which comes in a six-pin SOT-23 package. The circuit in Figure 1 proves useful for any pin-limited embedded system that must interface with an HD44780-compatible display through a one-wire serial link using an asynchronous, simplified RS?232 protocol at 9600 baud. It uses a PIC10F202, but any member of the PIC10F family is suitable, because the highly optimized source code in Listing 1 allows the program code to take fewer than 256 words. It is useless to try higher baud rates than 9600,because the PIC10F202 uses an RC internal oscillator with 1%-frequency tolerance, and the LCD requires a delay as long as 1.6 msec for some instructions, such as “clear display.” Listing 1 is the fully commented assembler source code for the LCD232 module; the main routine consists of the display of a 2?sec-delay “splash screen,” and then it enters an endless loop to wait for 1 byte as a command for the LCD, a maximum of 16 bytes as data for the LCD, and an ASCII zero. For test purposes wit References Raynus, Abel, “Squeeze extra outputs from a pin-limited microcontroller,” EDN, Aug 4, 2005, pg 96. “Microcontroller provides low-cost analog-to-digital conversion, drives seven-segment displays,” EDN, May 10, 2007, pg 80. Niven, Rex, “RC lowpass filter expands microcomputer’s output port,” EDN, June 21, 2007, pg 74. |
|||||
| 文章录入:fengfeiyi 责任编辑:fengfeiyi | |||||
| 【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 | |||||
| 最新热点 | 最新推荐 | 相关文章 | ||
| 高性能定点DSP位处理单元(BM… 基于DSP的嵌入式TCP/IP协议的… 基于DSP的工频电量测试仪硬件… CY7C68001与TMS320VC5416的接… TMS320VC5410A I/O口的多种扩… 2812和2407的比较 用FPGA动态探头与数字VSA对D… 数字化应用中的多核DSP DSP器件的现场可编程技术 基于TMS320DM642的电视跟踪系… |
网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!) |
| | 设为首页 | 加入收藏 | 联系站长 | 友情链接 | 版权申明 | 管理登录 | | |
![]() |
Copyright © 2005www.21control.com 嵌入式控制技术研究室 版权所有 站长:康草科技 |