![]() In the menu bar of Arduino IDE , you need to select the 【 Tools 】 - 【 Port 】 - select the port that the serial number displayed by the device manager just now.for example:COM6,as shown in the following figure.ģ). We need to open the code for this experiment: code-1602_display.ino, click “ √ ”under the menu bar,compile the code, and wait for the words of Done compiling in the lower left corner, as shown in the following figure.Ģ). Initialization is complete and the main loop is not need to do anythingsġ ). Lcd.setCursor(0,0) //Moving the cursor back to the upper left corner,output from the beginning Lcd.setCursor(0,1) //The cursor is positioned on line 1, column 0 Lcd.home() //Moving the cursor back to the upper left corner,output from the beginning The 1602 LCD display range is defined as 2 lines and 16 columns characters Declaring the Arduino digital port connected to the 1602 LCD pin, We need to connect the circuit as shown in the figure below. Pin 16: power negative pole of backlight. Pin 15: power positive pole of backlight. Pin 7 ~ Pin 14: D0 ~ D7 is 8-bit two-way data line. When this pin changes from high level to low level, the LCD module executes the command. Reading operation is carried out at high level and writing operation is carried out at low level. ![]() Pin 5: R/W is the signal line for reading and writing. ![]() Pin 4: RS is the register selection pin, data register is selected at high voltage and instruction register is selected at low voltage. 1602 possess 16 pins: Pin 1: VSS is ground power Pin 2: VDD is connected to 5V positive power supply Pin 3: V0 is the LCD contrast adjustment pin, which can be adjusted by a 10K adjustable resistor. Main specification of 1602LCD : Display capacity: 16 x 2 characters Working current: 2.0mA Operating voltage: 5.0v Size of character: 2.95 * 4.35 (W * H) mm.ģ. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |