1. gzyueqian
      13352868059
      首頁 > 新聞中心 > > 正文

      微處理器僅用一條線驅動LCD的實現

      更新時間: 2007-12-12 13:08:04來源: 粵嵌教育瀏覽量:890

        Microchip公司PIC10F系列微處理器使用單一I/O管腳驅動HD44780 LCD。
        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模塊的
        全注釋匯編程序源代碼;主程序由2?sec延時“刷屏”的顯示組成,然后進入死循環等待LCD的1字節命令,LCD數據為16個字節,和ASCII碼零。出于外部PIC微處理器嵌入式系統測試的目的,列表2為簡單的匯編源代碼發送另一個刷屏命令。

        英文原文:

        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
      h an external PIC microcontroller embedded system, Listing 2 is a simple assembler source code, which sends another splash screen.

        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.

      免費預約試聽課

      亚洲另类欧美综合久久图片区_亚洲中文字幕日产无码2020_欧美日本一区二区三区桃色视频_亚洲AⅤ天堂一区二区三区

      
      

      1. 久久6热热热综合精品 | 中文字幕在线2021一区 | 亚洲精品在线第一 | 婷婷在线视频免费播放 | 亚洲欧美久久天堂综合一区 | 亚洲国产综合视频 |