Sunday, January 11, 2015

To display a custom character, we must first obtain the desired graphics array or matrix of charact


Passing Qincheng
Today tried lcd1602 4-wire la bella baskets and 8-wire drive, let lcd1602 and STM32f0308 pin is directly connected; the physical connection as follows:
3 feet: V0 for LCD display contrast adjustment terminal. When connected la bella baskets to the positive supply weakest contrast, the contrast grounded power is highest. Will have a "ghosting" when the contrast is too high, you can pass a 10K potentiometer to adjust the contrast when used. Directly connected to the ground here. 4 feet: RS for the register la bella baskets selection, select the data register is high, select the instruction register is low. (R / S connection STM32F0 la bella baskets Discovery board PC13) 5 feet: R / W for read and write signal line, a read operation is high, the write operation is low. (R / W Connection STM32F0 Discovery board PC14) pin 6: E side to enable the end, when E Duanyou high jump into a low, the LCD module execute the command. (E connection STM32F0 Discovery board PC15) 7 to 14 feet: D0 ~ D7 for eight bidirectional data line. (4 line drive: la bella baskets D4 ~ D7 connection STM32F0 Discovery board PB4-PB7, D0-D4 can be connected to GND or floating). (8 line drive: D0 ~ D7 connection STM32F0 Discovery board PB0-PB7) 15 feet: Backlight positive power supply. 16 feet: Backlight negative power.
Specifically addressed the following three pins:
1
0x0F open display, display cursor blinking cursor
1. LCD1602 pin definitions, including RS, R / W, E. Here is defined as the pins which are respectively connected to the MCU I / O port.
(None of the above detection busy signal)
#include

P0 = i; // where i = 0, the write instruction; i = 1, the write data;
void init () // in full accordance with the requirements of the initialization process, the intermediate step written instructions omitted 38H
if (y) // appears in the second row (the first row if Y = 0, do not enter the IF statement, if in the second line, enter the IF statement
display_lcd_byte (y, x, table [z]); // display an array of characters in bit by bit

At this point, let the operating procedures and programming ideas LCD1602 display can basically come to an end, there is a complete display program can display two lines of English: http://www.51hei.com/mcu/723.html, everyone to follow like painting scoop, make changes to run, but 1602's functions to achieve la bella baskets much more. You can make use of 1602 display dynamic effects, and in addition to the general character display, 1602 also supports custom character, la bella baskets and so some of the other features, la bella baskets the following shows the dynamic effects and custom character la bella baskets in the final brief.
Here is how to get the string to add that from 1602 into the first 16 addresses, dynamically moving forward. la bella baskets In fact, by displaying the address table after the start position we know that 1602 can only display 16 characters in a row, but the line is far more than 16 addresses. We can see that the first line of the display address from 00 to 27, but can appear in the visible range of 1602 only 00 ~ 0F, the location is actually la bella baskets behind the play the role of a buffer, you can make the character data is present in 10 address After the RAM, but we can not see it wants, if the address la bella baskets exists 10 before we can see the display.
}
}
To display a custom character, we must first obtain the desired graphics array or matrix of characters, you can manually extract la bella baskets the method to obtain the appropriate font.
1. Establishment of an array of characters;
Golden Pen gift
<Before a diode model named


No comments:

Post a Comment