Cov txheej txheem:

Arduino rau Pib: Arduino Interface Nrog 16x2 LCD piav qhia: 5 Kauj Ruam
Arduino rau Pib: Arduino Interface Nrog 16x2 LCD piav qhia: 5 Kauj Ruam

Video: Arduino rau Pib: Arduino Interface Nrog 16x2 LCD piav qhia: 5 Kauj Ruam

Video: Arduino rau Pib: Arduino Interface Nrog 16x2 LCD piav qhia: 5 Kauj Ruam
Video: Computer Vision with Python! Resizing Images 2024, Kaum ib hlis
Anonim
Arduino rau Cov Pib: Arduino Kev Sib Tham Nrog 16x2 LCD piav qhia
Arduino rau Cov Pib: Arduino Kev Sib Tham Nrog 16x2 LCD piav qhia

Nyob Zoo Sawv Daws, Niaj hnub no, Arduino tau dhau los ua neeg nyiam heev thiab txhua leej txhua tus lees txais nws ib yam vim tias yooj yim-ness ntawm coding.

Kuv tau tsim cov ntu ntawm Arduino Basics uas pab cov pib tshiab, cov neeg tshiab thiab txawm tias cov tsim tawm kom tau txais cov haujlwm ua haujlwm. Cov koob no tau hais txog qhov yooj yim ntawm cov qauv, cuam tshuam siv ntawm cov qauv thiab Arduino thiab kev sau npe.

Cia pib..

Kauj ruam 1: Pinout ntawm 16x2 LCD

Pinout ntawm 16x2 LCD
Pinout ntawm 16x2 LCD

16x2 LCD yog 16 tus cim thiab 2 kab lcd uas muaj 16 tus pin txuas. Lub LCD no xav tau cov ntaub ntawv lossis ntawv hauv ASCII hom los tso saib. Thawj kab Pib nrog 0x80 thiab kab thib ob pib nrog 0xC0 chaw nyob.

LCD tuaj yeem ua haujlwm hauv 4-ntsis lossis 8-ntsis nyob rau hauv 4 hom me me, Cov Ntaub Ntawv/Cov Lus Hais tau xa hauv Nibble Hom Ua Nibble Ua Ntej Siab Nibble thiab tom qab ntawd Nibble qis dua

Piv txwv li, xa 0x45 Thawj 4 yuav raug xa Tom qab ntawd 5 yuav xa mus.

Kauj Ruam 2: Kev sib txuas ntawm 16x2 LCD Interface Nrog Arduino

Kev sib txuas ntawm 16x2 LCD Interface Nrog Arduino
Kev sib txuas ntawm 16x2 LCD Interface Nrog Arduino

Kauj Ruam 3: Pin Tswj thiab Flow

Muaj 3 tus tswj hwm tus pin uas yog RS, RW, E.

Yuav Siv RS Li Cas: Thaum Hais Kom Xa Lus, ces RS = 0 Thaum Cov Ntaub Ntawv raug xa mus, tom qab ntawd RS = 1

RW tus pin yog Nyeem/Sau.

qhov twg, RW = 0 txhais tau tias Sau Cov Ntaub Ntawv ntawm LCD

RW = 1 txhais tau tias Nyeem Cov Ntaub Ntawv los ntawm LCD

Yuav siv RW li cas:

Thaum peb sau rau LCD cov lus txib/Cov Ntaub Ntawv, peb tau teeb tus pin li LOW.

Thaum peb nyeem los ntawm LCD, peb teeb tus pin li HIGH.

Hauv peb qhov xwm txheej, peb tau siv nws nyuaj rau qib LOW, vim tias peb yuav sau mus rau LCD ib txwm.

Yuav siv E (Pab kom):

Thaum peb xa cov ntaub ntawv mus rau LCD, peb tab tom muab mem tes rau lcd nrog kev pab ntawm E tus pin.

Kauj Ruam 4: Qib Siab Txaus

Qhov no yog qib ntws peb yuav tsum ua raws thaum xa COMMAND/DATA rau LCD.

Siab Nibble Enable Pulse,

Tus nqi RS kom raug, Raws li COMMAND/DATA

Sab Nibble

Pab kom Pulse,

Tus nqi RS kom raug, Raws li COMMAND/DATA

Pom zoo: