LCD 8x2 0802A: Skirtumas tarp puslapio versijų
Jump to navigation
Jump to search
(Naujas puslapis: = 0802-A LCD = 400px 400px = Pinai = {| class="wikitable" |+ 0802-A LCD 14pin pinout |- ! Pin nr !! Tipas !! Apibūdinimas...) |
|||
| 91 eilutė: | 91 eilutė: | ||
// Print a message to the LCD | // Print a message to the LCD | ||
lcd.print("Hello!"); | lcd.print("Hello!"); | ||
| + | } | ||
| + | |||
| + | void loop() { | ||
| + | // set the cursor to column 0, line 1 | ||
| + | lcd.setCursor(0, 1); | ||
| + | // print the number of seconds since reset: | ||
| + | lcd.print(millis() / 1000); | ||
| + | } | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | = Prijungimas prie Wemos D1 Mini (esp8266) = | ||
| + | |||
| + | {| class="wikitable" | ||
| + | |+ 0802-A LCD 14pin pinout Wemos D1 Mini | ||
| + | |- | ||
| + | ! Pin nr !! Tipas !! Apibūdinimas !! Jungimas | ||
| + | |- | ||
| + | | 1 || Vss || Power supply (GND) || GND | ||
| + | |- | ||
| + | | 2 || Vdd || Power supply (+) || 5V | ||
| + | |- | ||
| + | | 3 || Vo || Contrast adjust || GND su 2k-10k resistoriumi | ||
| + | |- | ||
| + | | 4 || RS || Register select signal || Wemos D1 | ||
| + | |- | ||
| + | | 5 || R/W || Data read / write || GND | ||
| + | |- | ||
| + | | 6 || E || Enable signal || Wemos D8 | ||
| + | |- | ||
| + | | 7 || DB0 || Data bus line || Neprijungtas | ||
| + | |- | ||
| + | | 8 || DB1 || Data bus line || Neprijungtas | ||
| + | |- | ||
| + | | 9 || DB2 || Data bus line || Neprijungtas | ||
| + | |- | ||
| + | | 10 || DB3 || Data bus line || Neprijungtas | ||
| + | |- | ||
| + | | 11 || DB4 || Data bus line || Wemos D4 | ||
| + | |- | ||
| + | | 12 || DB5 || Data bus line || Wemos D5 | ||
| + | |- | ||
| + | | 13 || DB6 || Data bus line || Wemos D6 | ||
| + | |- | ||
| + | | 14 || DB7 || Data bus line || Wemos D7 | ||
| + | |} | ||
| + | |||
| + | == Kodas == | ||
| + | |||
| + | <syntaxhighlight lang="cpp"> | ||
| + | #include <LiquidCrystal.h> | ||
| + | const int rs = D1, en = D8, d4 = D4, d5 = D5, d6 = D6, d7 = D7; | ||
| + | LiquidCrystal lcd(rs, en, d4, d5, d6, d7); | ||
| + | |||
| + | |||
| + | void setup() { | ||
| + | // set up the LCD's number of columns and rows: | ||
| + | lcd.begin(8, 2); | ||
| + | delay(3000); | ||
| + | // Print a message to the LCD | ||
| + | lcd.print("Helloa!"); | ||
} | } | ||
Dabartinė 20:52, 18 spalio 2023 versija
0802-A LCD[keisti]
Pinai[keisti]
| Pin nr | Tipas | Apibūdinimas | Jungimas |
|---|---|---|---|
| 1 | Vss | Power supply (GND) | GND |
| 2 | Vdd | Power supply (+) | 5V |
| 3 | Vo | Contrast adjust | GND su 2k-10k resistoriumi |
| 4 | RS | Register select signal | Skaitmeninis pin |
| 5 | R/W | Data read / write | GND |
| 6 | E | Enable signal | Skaitmeninis pin |
| 7 | DB0 | Data bus line | Neprijungtas |
| 8 | DB1 | Data bus line | Neprijungtas |
| 9 | DB2 | Data bus line | Neprijungtas |
| 10 | DB3 | Data bus line | Neprijungtas |
| 11 | DB4 | Data bus line | Skaitmeninis pin |
| 12 | DB5 | Data bus line | Skaitmeninis pin |
| 13 | DB6 | Data bus line | Skaitmeninis pin |
| 14 | DB7 | Data bus line | Skaitmeninis pin |
Prijungimas prie Arduino UNO[keisti]
| Pin nr | Tipas | Apibūdinimas | Jungimas |
|---|---|---|---|
| 1 | Vss | Power supply (GND) | GND |
| 2 | Vdd | Power supply (+) | 5V |
| 3 | Vo | Contrast adjust | GND su 2k-10k resistoriumi |
| 4 | RS | Register select signal | Arduino Pin 12 |
| 5 | R/W | Data read / write | GND |
| 6 | E | Enable signal | Arduino Pin 11 |
| 7 | DB0 | Data bus line | Neprijungtas |
| 8 | DB1 | Data bus line | Neprijungtas |
| 9 | DB2 | Data bus line | Neprijungtas |
| 10 | DB3 | Data bus line | Neprijungtas |
| 11 | DB4 | Data bus line | Arduino Pin 5 |
| 12 | DB5 | Data bus line | Arduino Pin 4 |
| 13 | DB6 | Data bus line | Arduino Pin 3 |
| 14 | DB7 | Data bus line | Arduino Pin 2 |
Kodas[keisti]
#include <LiquidCrystal.h>
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(8, 2);
delay(3000);
// Print a message to the LCD
lcd.print("Hello!");
}
void loop() {
// set the cursor to column 0, line 1
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print(millis() / 1000);
}
Prijungimas prie Wemos D1 Mini (esp8266)[keisti]
| Pin nr | Tipas | Apibūdinimas | Jungimas |
|---|---|---|---|
| 1 | Vss | Power supply (GND) | GND |
| 2 | Vdd | Power supply (+) | 5V |
| 3 | Vo | Contrast adjust | GND su 2k-10k resistoriumi |
| 4 | RS | Register select signal | Wemos D1 |
| 5 | R/W | Data read / write | GND |
| 6 | E | Enable signal | Wemos D8 |
| 7 | DB0 | Data bus line | Neprijungtas |
| 8 | DB1 | Data bus line | Neprijungtas |
| 9 | DB2 | Data bus line | Neprijungtas |
| 10 | DB3 | Data bus line | Neprijungtas |
| 11 | DB4 | Data bus line | Wemos D4 |
| 12 | DB5 | Data bus line | Wemos D5 |
| 13 | DB6 | Data bus line | Wemos D6 |
| 14 | DB7 | Data bus line | Wemos D7 |
Kodas[keisti]
#include <LiquidCrystal.h>
const int rs = D1, en = D8, d4 = D4, d5 = D5, d6 = D6, d7 = D7;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(8, 2);
delay(3000);
// Print a message to the LCD
lcd.print("Helloa!");
}
void loop() {
// set the cursor to column 0, line 1
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print(millis() / 1000);
}