Cov txheej txheem:

LCD Shifter rau Arduino: 7 Kauj Ruam
LCD Shifter rau Arduino: 7 Kauj Ruam

Video: LCD Shifter rau Arduino: 7 Kauj Ruam

Video: LCD Shifter rau Arduino: 7 Kauj Ruam
Video: ESP8266 Diesel Injector Purging Station - PWM NodeMCU pump flow Control (Subtittled) 2024, Kaum ib hlis
Anonim
LCD Shifter rau Arduino
LCD Shifter rau Arduino

Thawj lub tswv yim yog los tsim lub tsev qiv ntawv uas yooj yim siv IC 74HC595 ntawm Arduino thiab lwm yam khoom siv. Hauv Cov Lus Qhia Kuv yuav qhia qhov no rau koj siv piv txwv li kev tswj hwm 16x2 LCD. Qhov piv txwv yuav qhia ntawm LCD lub vib nas this uas tau dhau mus txij li Arduino rov pib dua. Kuv vam tias nws yuav muaj txiaj ntsig rau koj. Koj xav tau dab tsi rau qhov piv txwv no? - Arduino - Arduino IDE teeb tsa - LCD - Ib IC 74HC595 - Ib qho 4.7Kohm resistor lossis zoo sib xws - Ib "104" capacitor - Cov xov hlau!

Kauj Ruam 1: Muab Lub Tsev Qiv Ntawv Hauv qab Arduino Folder

Kuv tau hu lub tsev qiv ntawv "ShiftOut". Nws mus hauv qab %arduino-directory %/hardware/librariesQhov no yog lub tsev qiv ntawv uas kuv tau ua haujlwm. Lus pom zoo.

Kauj Ruam 2: LCD Lub Tsev Qiv Ntawv

Lub tsev qiv ntawv thib ob xav tau yog qhov uas sib txuas lus rau LCD. Kuv tau siv qhov no thiab tsis yog qhov uas tuaj nrog Arduino vim tias nws yog qhov pib ua kab mob. yuav tsum tsis txhob sib zog hauv qab %arduino-directory %/hardware/libraries ib yam nkaus.

Kauj Ruam 3: Qhib Arduino IDE

Qhib Arduino IDE
Qhib Arduino IDE

Tam sim no nws yog lub sijhawm los sau cov cai. Qhib Arduino IDE thiab sau qhov no:

#ncig #ncig ShiftOut sOut (8, 12, 11, 1); Lcd lcd = Lcd (16, FUNCTION_4BIT | FUNCTION_2LINE | FUNCTION_5x11, & sOut); teeb tsa tsis muaj dab tsi () {lcd.set_ctrl_pins (CTRLPINS (1, 2, 3))); // RS-> 1, RW-> 2, E-> 3 lcd.set_data_pins (_4PINS (4, 5, 6, 7)); // D4-> 4, D5-> 5, D6-> 6, D7-> 7 lcd.setup (); lcd.clear (); } tsis muaj dab tsi voj () {lcd.home (); lcd.print ((ntev) millis () / 1000); } Daim duab yooj yim no qhia ntawm LCD lub vib nas this uas tau dhau mus txij li Arduino rov pib dua.

Kauj ruam 4: Muab tso ua ke

Muab tso ua ke
Muab tso ua ke
Muab tso ua ke
Muab tso ua ke
Muab tso ua ke
Muab tso ua ke

Nws yog ib qho tseem ceeb uas cov tsev qiv ntawv tau theej ua ntej Arduino IDE qhib. Txwv tsis pub qhov muab tso ua ke yuav swb.

Yog tias txhua yam ua tau zoo, koj tuaj yeem txuas Arduino mus rau 74HC595 thiab qhov no mus rau LCD tom qab cov duab schematic kos duab siv Fritzing. Kev sib txuas yuav tsum yog raws li hauv qab no:

Kauj ruam 5: Khiav Sketch ntawm Arduino

Yog tias txhua yam txuas nrog txoj cai, koj yuav tsum pom cov suav vib nas this ntawm LCD.

Kauj Ruam 6: Xaus

Kuv vam tias lub tsev qiv ntawv no yuav muaj txiaj ntsig zoo rau ib tus neeg. Nws yog rau kuv vim tias Arduino code tau yooj yim thiab zoo, yam tsis tau sau nws nrog cov khoom pov thawj coding messing tus kos duab lub hom phiaj tseem ceeb.

Kauj Ruam 7: Khiav Ntxiv: Lwm Yam Piv Txwv

Nov yog Arduino siv ShiftOut los tswj ob qhov xya ntu qhia hauv cascade: Cov ntaub ntawv ntxiv tuaj yeem pom ntawm no:

Pom zoo: