Cov txheej txheem:

Mloog Digital Siv Microcontroller (AT89S52 Tsis Muaj RTC Circuit): 4 Cov Kauj Ruam (nrog Duab)
Mloog Digital Siv Microcontroller (AT89S52 Tsis Muaj RTC Circuit): 4 Cov Kauj Ruam (nrog Duab)

Video: Mloog Digital Siv Microcontroller (AT89S52 Tsis Muaj RTC Circuit): 4 Cov Kauj Ruam (nrog Duab)

Video: Mloog Digital Siv Microcontroller (AT89S52 Tsis Muaj RTC Circuit): 4 Cov Kauj Ruam (nrog Duab)
Video: Moog One - A Meditation On Listening 2024, Hlis ntuj nqeg
Anonim
Mloog Digital Siv Microcontroller (AT89S52 Tsis Muaj RTC Circuit)
Mloog Digital Siv Microcontroller (AT89S52 Tsis Muaj RTC Circuit)
Mloog Digital Siv Microcontroller (AT89S52 Tsis Muaj RTC Circuit)
Mloog Digital Siv Microcontroller (AT89S52 Tsis Muaj RTC Circuit)

Cia piav qhia lub moos … "Lub moos yog lub cuab yeej uas suav thiab qhia lub sijhawm (txheeb ze)" !!!

Kwv yees kuv tau hais yog lawm yog li cia ua CLOCK nrog ALARM feature.

NCO TSEG: nws yuav siv sijhawm li 2-3 feeb hauv kev thov thov nyeem tag nrho txoj haujlwm lossis lwm yam kuv yuav tsis muaj lub luag haujlwm rau ib feem puas

Kauj Ruam 1: YUAV TSUM MUAJ NTAUB NTAWV

NTAWV YUAV TSUM MUAJ
NTAWV YUAV TSUM MUAJ
NTAWV YUAV TSUM MUAJ
NTAWV YUAV TSUM MUAJ
NTAWV YUAV TSUM MUAJ
NTAWV YUAV TSUM MUAJ

6 yam xav tau:

1. Microcontroller (Kuv tau siv AT89S52-8051 tsev neeg), txhua lub programmable microcontroller tuaj yeem siv tau.

2.7 ntu tso saib

3. Crystal oscillator (12MHz)

4. Capacitor (10uF, 33pF/22pF)

5. LWD

6.resistances (330 Ohm)

7.zoo (piezo)

8.push hloov

Thiab kuv tsis suav nrog cov hlau txuas, xaim, flux….. hluav taws xob !!! pab kuv tawm:)

Kauj Ruam 2: Daim duab Circuit Court

Daim duab Circuit Court
Daim duab Circuit Court
Daim duab Circuit Court
Daim duab Circuit Court

Nov yog daim duab qhia chaw ntawm lub moos digital siv 8051 microcontroller.

Raws li peb tuaj yeem pom lub microcontroller txuas nrog peb 7 ntu ntu nrog cov chaw nres nkoj sib txawv tsis sib npaug thiab cov teev teev kawg tsuas yog txuas rau tus pin raws li nws qhia tau 1.

LED thiab buzzer yog tus kheej piav qhia raws li txoj cai.

1 ntawm LED yog rau AM thiab kuv tau txuas nrog lwm LED tsis pom hauv daim duab rau tswb.

Crystal Oscillator ntawm 12MHz txuas nrog lub moos nrawm thiab ua tiav qhov tseeb 1second suav nrog siv cov cuab yeej cuam tshuam ntawm microcontroller.

MIDDLE LEDS DENOTING SECOND tau txuas rau "28TH THIAB 32ND" PIN

Thov zam txim rau kuv, 3 LEDs tsis tau qhia hauv daim duab qhia chaw rau kuv kev tub nkeeg

28th tus pin LED: thawj 30 thib ob ntsais muag

32nd pin LED: so 30 thib ob ntsais muag

**** pab txhawb rau tag nrho feeb !! *** Kuv paub tseeb tom qab qhov haujlwm no kuv tau los paub 60 thib ob ua rau feeb !!! WOW

Kauj ruam 3: Coding

Coding
Coding
Coding
Coding
Coding
Coding

Kuv tau siv keil software los tsim C code rau RTC siv microcontroller thiab tau txais cov ntaub ntawv hex.

NCO NTSOOV CODING PORTION ntawm qhov no kom paub ntau ntxiv !!

Qhov tseem ceeb hauv ntu coding yog, thaum tus pin ntawm txhua qhov chaw nres nkoj yuav hloov pauv rau qhov qhia tus lej cuam tshuam nrog txhua 7 ntu saib.

Cov cuab yeej cuam tshuam ntawm 8051 tau siv los suav thiab rov ua dua ib pliag. piv txwv nkaus xwb, Ib yam li tsim kev ncua sijhawm nrog kev sib cav 1 ua rau 1second ncua. (TMOD, TL0, TH0, IE txhua qhov txiaj ntsig txhawb rau lub sijhawm ua)

LED rau AM tau npaj rau lwm 12 teev.

Ntxiv rau lub tswb kuj tseem tuaj yeem teev rau AM lossis PM tshwj xeeb thiab tus lej buzzer tau dhau nrog cov lej zaus rau lub suab ntawm lub tswb sijhawm. Tswb khawm nrog min, teev & txuag hloov tau siv los teeb tsa lub tswb. Ntawm ob zaug nyem lub tswb tsis ua haujlwm lub tswb nrov

CODE: C code kom tau txais lub tswv yim nkaus xwb (cov ntawv hex yog qhov tseeb ntawm ib qhov haujlwm)

github.com/abhrodeep/Arduino_projs/blob/master/digitalclock.c

Kauj ruam 4: Thaum kawg…

Thaum kawg…
Thaum kawg…

TXHOB ua tiav !!! Tam sim no yog lub sijhawm txaus siab rau lub moos uas ci thiab meej.

Pom zoo: