Principle of LCD display controller based on PIC microcontroller HT1621

Publisher:JoyfulSunflowerLatest update time:2012-09-29 Source: 21ic Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The HT1621 LCD display controller is a display component of a multifunctional fully automatic intelligent switch, which can monitor the operation of the power supply line in real time, accurately and online. Once the line has leakage, overload, short circuit, overvoltage, undervoltage and phase loss, the intelligent safety power switch can immediately start the protection program and display it on the HT1621 LCD display controller. In intelligent buildings, medium and high-end family residences, power systems, industrial and mining enterprises, national key fire units, as well as petrochemicals, culture, education, health, finance, telecommunications and other fields. The HT1621 LCD display controller based on a single-chip microcomputer is widely used, and its principle block diagram is shown in Figure 1.

The main features of the PIC series of microcontrollers produced by MICROCHIP of the United States are as follows: (1) Harvard bus structure; (2) single-byte instructions; (3) reduced instruction set; (4) simple addressing method; (5) high code compression rate; (6) high operating speed; (7) low power consumption; (8) strong driving capability, reaching 20 mA current driving capability; (9) built-in hardware watchdog; (10) simple external circuit; (11) easy development; These features have made the PIC series of microcontrollers widely used in different fields such as industrial control, consumer electronics, office automation equipment, intelligent instruments and meters, automotive electronics, etc.

PIC16F877A Features

PIC16F877A microcontroller is a dual in-line 40-pin processor. In addition to the basic input/output functions, all interface pins are generally designed with a second function or even a third function. It uses pin multiplexing technology to increase functions without increasing the size and number of pins. In addition to the common features of the PIC series microcontrollers, the PIC16F877A microcontroller also has 8K×14-bit Flash program memory, 512 B data memory, 256×8-bit EEP-ROM, 33 I/O lines, 8-way 10-bit A/D channels, etc. It can be seen that PIC16F877A is very suitable for HT1621 LCD display control.

HT1621 LCD Driver

Overview

The HT1621 is a 128-dot memory-mapped and multifunctional LCD driver. The software configuration feature of the HT1621 makes it suitable for a variety of LCD applications, including LCD modules and display subsystems. The bottom board socket configuration diagram of the HT1621 is shown in Figure 2. There are only 4 or 5 pins used to connect the host controller and the HT1621. The HT1621 also has a power-saving command to reduce system power consumption.

characteristic

(1) Operating voltage: 2.4 ~ 5.2 V;
(2) Embedded 256 kHz RC oscillator;
(3) Can be connected to an external 32 kHz chip or 256 kHz frequency source input;
(4) Optional 1/2 or 1/3 bias and 1/2 1/3 or 1/4 duty cycle;
(5) On-chip time base frequency source;
(6) Buzzer can select two frequencies;
(7) Power saving command can be used to reduce power consumption;
(8) Embedded time base generator and watchdog timer (WDT);
(9) Time base or watchdog timer overflow output;
(10) Eight time base/watchdog timer clock sources;
(11) A 32×4 LCD driver;
(12) An embedded 32×4 bit display RAM memory;
(13) A four-wire serial interface;
(14) On-chip LCD driver frequency source;
(15) Software configuration features;
(16) Data mode and command mode instructions;
(17) Three data access modes;
(18) Provide VLCD pin to adjust LCD operating voltage. [page]

System Structure

(1) Display memory (RAM)

Static display memory (RAM). Stores displayed data in a 32×4 bit format. See Figure 3. RAM data is directly mapped to the LCD driver and can be accessed using READ, WRITE, and READZ-MODIFY-WRITE commands.

(2) LCD driver

The HT1621 is a 128 (32×4) dot LCD driver. It can be configured by software to 1/2 or 1/3 LCD driver bias and 2, 3 or 4 common ports. This feature makes the HT1621 suitable for a variety of LCD applications. The LCD drive clock is generated by dividing the system clock. The frequency of the LCD drive clock is maintained at 256 Hz and is generated by a crystal oscillator with a frequency of 32.768 kHz, an on-chip RC oscillator or an external clock. For LCD driver related commands, see Table 1 below.

The bold 100, i.e. "100", indicates the command mode type. If consecutive commands are executed, except for the first command, the mode type codes of other commands will be ignored. The LCD OFF command disables the LCD bias generator, thereby turning off the LCD display; the LCD ON command enables the LCD bias generator, thereby turning on the LCD display. BIAS&COM is an LCD module related command that can make the HT1621 compatible with most LCD modules.

(3) Command format

The HT1621 can be configured using software. Two modes of commands can be used to configure the HT1621 and transmit data displayed on the LCD. The HT1621 configuration mode is called the command mode, and the command mode type code is 100. The command mode includes a system configuration command, a system frequency selection command, an LCD configuration command, a sound frequency selection command, a timer/WDT setting command, and an operation command. The data mode includes READ WRITE and READ-MODIFY_WRITE operations. The following table shows the data and command mode type codes Table 2.

(4) Interface

The HT1621 has only four pins for the interface. The pin /CS is used to initialize the serial interface circuit and terminate the communication between the host controller and the HT1621. When the pin /CS is set to "1", the data and commands between the host controller and the HT1621 are invalid and initialized. Before generating a mode command or mode switching, the serial interface of the HT1621 must be initialized with a high level pulse. The pin DATA is the serial data input/output pin. Read/write data and write commands are performed through the pin DATA. The pin /RD is the read clock input pin. At the falling edge of the /RD signal, data is output on the pins DA-TA. Between the rising edge of the /RD signal and the next falling edge, the host controller should read the corresponding data. The pin /WR is the write clock input pin. At the rising edge of the /WR signal, the data, address and command on the pin DATA are written to the HT1621. The optional pin /IRQ can be used as an interface between the host controller and the HT1621. The /IRQ can be set by software as a timer output or WDT overflow flag output. After the host controller is connected to the /IRQ of the HT1621, the time base or WDT function can be realized. [page]

Timing diagram

When writing data to the HT1621, set the pin /CS to "0", write the command mode code to 101, and then enter the 6-bit address code and 4-bit data. When writing each code, the data, address and command are written to the HT1621 only when the pin /WR is at a rising edge. When the pin /CS is set to "1", the current data writing is completed. As shown in the timing diagram of Figure 4 (a). If it is necessary to write addresses continuously, set the pin /CS to "0" all the time, as shown in the timing diagram of Figure 4 (b).

MCU interface circuit

The HT1621 LCD control circuit based on PIC16F877A microcontroller has a simple and clear structure. The chip select /CS of the HT1621 LCD is connected to the MCU RB5 port to initialize the serial interface circuit and end the communication between the main controller and the HT1621. The write signal /WR and write data DATA are connected to the MCU RD0 and RD1 ports respectively to achieve data writing.

Block Diagram

The RB5 port is used as the chip select signal input, the RD0 port is used as the write signal input, and the RD1 port is used as the data signal write. The program flowchart is shown in Figure 5.

This article uses the PIC16F877A microcontroller to implement the HT1621 LCD display control. The hardware circuit has few hardware, small size, simple structure, high stability, and can accurately display the leakage, overload, undervoltage and other indications of the multi-functional fully automatic intelligent switch.

Reference address:Principle of LCD display controller based on PIC microcontroller HT1621

Previous article:PIC16F84A MCU Tutorial (PCB Diagram and Schematic Diagram) Detailed Explanation
Next article:Design of Master-Slave Infrared Communication System Based on Single Chip Microcomputer

Recommended ReadingLatest update time:2024-11-16 19:48

Using PIC MCU HT1621 LCD display controller principle
The HT1621 LCD display controller is a display component of a multifunctional fully automatic intelligent switch, which can monitor the operation of the power supply line in real time, accurately and online. Once the line has leakage, overload, short circuit, overvoltage, undervoltage and phase loss, the intelligent
[Industrial Control]
Using PIC MCU HT1621 LCD display controller principle
PIC16F877A MCU realizes HT1621 LCD display control
Introduction: This article uses the PIC16F877A microcontroller to implement the HT1621 LCD display control. The hardware circuit has few hardware, small size, simple structure, high stability, and can accurately display the leakage, overload, undervoltage and other indications of the multi-functional fully automatic i
[Microcontroller]
PIC16F877A MCU realizes HT1621 LCD display control
Using PIC MCU HT1621 LCD display controller principle
The HT1621 LCD display controller is a display component of a multifunctional fully automatic intelligent switch, which can monitor the operation of the power supply line in real time, accurately and online. Once the line has leakage, overload, short circuit, overvoltage, undervoltage and phase loss, the intelligent
[Microcontroller]
Using PIC MCU HT1621 LCD display controller principle
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号