Cov txheej txheem:

DS1302 Moos Nrog 2.4 TFT LCD: 5 Kauj Ruam
DS1302 Moos Nrog 2.4 TFT LCD: 5 Kauj Ruam

Video: DS1302 Moos Nrog 2.4 TFT LCD: 5 Kauj Ruam

Video: DS1302 Moos Nrog 2.4 TFT LCD: 5 Kauj Ruam
Video: [AVR]DS1302 clock settime 예외처리 2024, Kaum ib hlis
Anonim
DS1302 Moos Nrog 2.4 TFT LCD
DS1302 Moos Nrog 2.4 TFT LCD

Nyob zoo!

Hnub no kuv yuav qhia koj yuav ua li cas thiaj ua lub moos yooj yim nrog RTC thiab TFT LCD rau Arduino.

Txoj haujlwm yooj yim rau cov pib, nws tuaj yeem sib sau ua ke thiab teeb tsa tsawg dua 30 feeb.

Kauj Ruam 1: Lwm Lub Sijhawm

Ob peb lub hlis dhau los kuv txiav txim siab los ua kuv tus kheej lub moos yooj yim nrog 2.4 nti LCD.

Kuv siv nws hauv chav nyob thiab nws yog lub teeb pom kev zoo hmo ntuj. Nws tiv thaiv kuv ntawm ncaws hauv rooj tog los ntawm kev sib tsoo; thiab niam nyiam nws ib yam:)

Qhov RTC module no tsis kim thiab siv tau yooj yim heev nrog Arduino. Nws tsis zoo li cov uas siv I2C raws tu qauv (DS3231, 1307).

DS1302:

Tus qauv muaj 5 tus pin: VCC, Hauv av, RST, CLK, DAT 3 tus pin tuaj yeem txuas nrog txhua tus lej digital ntawm arduino.

Qhov zoo tshaj plaws ntawm rtc yog tias nws tsis siv I2C (SCL, SDA) BUS.

Qhov tsis zoo tshaj plaws: Rtc nti tsis tau them cua sov. Nws txhais li cas ?? Nws txhais tau tias qhov ntsuas kub feem ntau yuav muaj qhov cuam tshuam rau lub sijhawm drift. Hauv chav sov, lub sijhawm drift yog 2-4 feeb hauv ib hlis. Yog li peb tsis tuaj yeem hais qhov no yog qhov tseeb rtc.

Qhov TFT LCD no feem ntau xav tau A4 tus pin rau RESET, thiab kuv tau sim hloov kho qhov tshwj xeeb no (A4 kom rov pib dua tus pin) kom siv tus qauv DS3231. Txog tam sim no kuv tsis tuaj yeem ua haujlwm, tab sis kuv tseem tab tom nrhiav kev daws teeb meem.

Kauj Ruam 2: Cov Ntaub Ntawv thiab Kos Duab

Khoom siv thiab kos duab
Khoom siv thiab kos duab
Khoom siv thiab kos duab
Khoom siv thiab kos duab
Khoom siv thiab kos duab
Khoom siv thiab kos duab
Khoom siv thiab kos duab
Khoom siv thiab kos duab

Cov ntu xav tau rau txoj haujlwm no:

-Arduino Uno (Mega thiab lwm yam …)

-DS1302 RTC

-2.4 TFT LCD

-qee cov jumper xov hlau

-Arduino IDE, kos duab, tsev qiv ntawv thiab lub sijhawm pub dawb me ntsis

Kauj Ruam 3: Kev Sib Txuas

Kev sib txuas
Kev sib txuas

Nws yog teeb tsa yooj yim heev. Txuas lub LCD rau Arduino. Kuv tau siv cov pins rau txoj kev rov qab ntawm arduino, yog li rtc txuas nrog rau sab nraum qab ntawm lub rooj tsavxwm.

VCC: 3.3 lossis 5 volts

Av: Hauv av

RST: Cov Digital 10

DAT: Cov 11

CLK: Cov Digital 12

Kauj ruam 4: Tiav lawm

Tiav lawm
Tiav lawm
Tiav lawm
Tiav lawm
Tiav lawm
Tiav lawm
Tiav lawm
Tiav lawm

Tom qab txuas cov ntu upload cov duab kos rau lub rooj tsavxwm thiab koj tau ua tiav.

Hauv qhov kos duab koj tuaj yeem yooj yim teeb lub sijhawm rau tus qauv.

//rtc.setDOW(FRIDAY);

//rtc.setTime(17, 15, 00);

//rtc.setDate(15, 3, 2018);

Firts tsis pom zoo cov kab, tom qab ntawv teeb lub sijhawm, hnub thiab hnub tim raug.

Upload nws, tawm tswv yim kab dua thiab upload.

Qhov ntawd yog nws! Lub sijhawm tau teeb tsa thiab npaj mus.

Kauj ruam 5: Ua tiav

Koj ua tiav!

Siv nws li koj nyiam.

Muaj ib hnub zoo!

Pom zoo: