ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING A device for testing LCD modules based on the HD44780 controller. Encyclopedia of radio electronics and electrical engineering Encyclopedia of radio electronics and electrical engineering / Ham Radio Technologies The alphanumeric LCD modules popular with radio amateurs are mostly assembled on the basis of the HD44780 controller from Hitachi, which can be considered the industry standard. Analogues of this controller and modules based on them are produced by many companies. A device is proposed for operational verification of the operability of such modules and the contents of their character generators. On fig. 1 shows the most common in our country, but not the only, version of the LCD module character generator code table, which contains not only Latin, but also Russian letters. After receiving each of these codes (a two-digit hexadecimal number), the module displays the corresponding character on its screen. For example, the code 0x4E (decimal value 78) is the Latin letter N, and the code OxVO (decimal value 176) is the Russian letter Yu.
The symbols are divided into two groups. The first one (codes from 0x20 to 0x7F) contains numbers, letters of the Latin alphabet and special characters. This group is always the same, and the codes of the characters in it correspond to the well-known ASCII code table. In the second group (codes from 0xA0 to 0xFF), in this case, there are letters of the Russian alphabet and various icons. However, in modifications of even the same type of LCD modules produced for different countries, here, instead of Russian letters, there may be letters of other national alphabets and, in general, any symbols. Codes from 0x00 to 0x07 are given to programmers to create their own symbols, images of which can be loaded into the module's memory using special commands. If an LCD module without "identification marks" or one for which it is impossible to find reference data (for example, used or even bought in an online store) fell into the hands of a radio amateur, it is good to have a device to quickly check its performance and determine the contents of the character generator. Such a device, the scheme of which is shown in Fig. 2 is built on the DD1 microcontroller (PIC16F84A-04/P, the description of which can be found at http://datasheet.su/datasheet/Microchip/PIC16F84A-04/P). It allows you to test character LCD modules with an integrated HD44780 controller and the following combinations of the number of characters per line (first factor) and the number of lines (second factor) on the screen: 8x1, 8x2, 16x1, 16x2, 16x4, 20x1, 20x2, 20x4, 32x2, 40x2 .
Resistor R1 maintains a high logic level at the MCLR input of the microcontroller. This prevents this high-resistance input from being affected by interference that could cause unwanted restarts of the microcontroller. Resistor R2 and capacitor C2 are the frequency-setting elements of the clock RC generator built into the microcontroller. The resistance of the resistor R2 can be in the range of 5 ... 100 kOhm, and the capacitance of the capacitor C2 must be at least 20 pF. With their ratings indicated in the diagram, a clock frequency of about 4 MHz was obtained. Its stability, of course, is worse than that of a crystal oscillator, but in the case under consideration it is not required. From this frequency depends only on the speed of automatic repetition of "clicks" on the button SB1 while holding it down. Resistor R3 regulates the contrast of characters on the screen of the tested LCD module HG1. Resistors R1 and R3 can have a resistance of 1 ... 10 kOhm. Due to the simplicity of the circuit, the printed circuit board for the device was not developed; it was assembled on a breadboard. Button SB1 - KM 1-1V or any other. Resistors R1 and R2 - MLT-0,125, R3 - SP3-4, capacitors - any ceramic. Microcontroller PIC16F84A-04/P can be replaced by PIC16F84A-20/P or PIC16F84 with the same indices after the hyphen. You can use similar microcontrollers with the /SO index (in a surface mount package), but then it is desirable to replace other parts of the device with those intended for surface mounting. The power supply of the device must provide a stabilized voltage of 5 V at a load current of at least 100 mA. When the supply voltage is applied to the device with the LCD module under test connected, all elements of the image in all familiar spaces of the screen should become visible, as shown in Fig. 3. This checks their integrity and the overall performance of the module.
Please note that most LCD modules have a plus supply voltage (Vdd) should be applied to pin 1, and minus (Vss) - to conclusion 2. However, it also happens vice versa. For example, for the WH1602D-TML-CT module. If power is supplied in the wrong polarity, the module will not work, and after a while it will be irretrievably damaged. The author had such a sad experience. But the module still withstands a short-term (several seconds) polarity reversal. Therefore, if the module does not respond to the supply voltage, the device must be immediately disconnected from the power source and the cause of the module failure should be searched for. The first press of the SB1 button after turning on the power will turn off the rectangles on the screen, and the inscription "z 122" will be displayed in its top line. This means that the character generator of the module controller contains the character "z" with the code 122 (hereinafter, the values of the codes are decimal). With further pressing or while holding the button pressed, characters with codes 123-255 are displayed alternately on the screen, then the cycle repeats endlessly, starting with code 122. This makes it possible to view all the characters contained in the second part of the code table and find out their codes for use in developed programs. On fig. 4 on the screen of the LCD module 20x4 manufactured by OPTREX, whose character generator does not contain Russian letters, the inscription "in 226" is displayed. And in fig. 5 on the screen of the Russified 16x2 LCD module of an unknown type, the inscription "Shch 226" is displayed. This confirms that for modules of different modifications, different symbols can correspond to the same code from the second part of the table.
The microcontroller program can be downloaded from ftp://ftp.radio.ru/pub/2015/09/testLCD.zip. Author: G. Nyukhtilin See other articles Section Ham Radio Technologies. Read and write useful comments on this article. Latest news of science and technology, new electronics: Artificial leather for touch emulation
15.04.2024 Petgugu Global cat litter
15.04.2024 The attractiveness of caring men
14.04.2024
Other interesting news: ▪ Synchronous DC-DC Regulators Texas Instruments LM76002/3 ▪ Development of technology for capturing greenhouse gases News feed of science and technology, new electronics
Interesting materials of the Free Technical Library: ▪ site section Power regulators, thermometers, heat stabilizers. Article selection ▪ article Fly, pigeons, fly! Popular expression ▪ article What is a dam? Detailed answer ▪ article Dislocations. Health care ▪ article Improved probe 1-400 volts. Encyclopedia of radio electronics and electrical engineering
Leave your comment on this article: All languages of this page Home page | Library | Articles | Website map | Site Reviews www.diagram.com.ua |