Dab tsi yog kev siv timer hom tswj sau npe hauv 8051?
Dab tsi yog kev siv timer hom tswj sau npe hauv 8051?

Video: Dab tsi yog kev siv timer hom tswj sau npe hauv 8051?

Video: Dab tsi yog kev siv timer hom tswj sau npe hauv 8051?
Video: Qhov Kev Sib Txheeb Ntawm Vajtswv thiab phau Vajluskub Yog Dab Tsi? 2024, Tej zaum
Anonim

Timer Hom Tswj (TMOD): TMOD yog 8-ntsis sau npe siv rau xaiv sijhawm los yog counter thiab hom ntawm sijhawm . Tsawg 4-ntsis yog siv rau tswj kev ua haujlwm ntawm sijhawm 0 lossis counter0, thiab seem 4-ntsis yog siv rau tswj kev ua haujlwm ntawm timer1 lossis counter1.

Ib yam li ib tug yuav nug, dab tsi yog kev siv timer hauv 8051 microcontroller?

Timers hauv 8051 microcontroller . Cov sijhawm yog ib qho tseem ceeb daim ntawv thov hauv Embedded systems, nws tswj lub sijhawm ntawm kev ua haujlwm hauv sync nrog lub moos lossis lub moos sab nraud. Cov sijhawm muaj ntau yam kev siv xws li ntsuas lub sij hawm tsim qeeb, lawv tuaj yeem ua tau siv rau tsim baud tus nqi.

Qhov thib ob, hom timer yog dab tsi? Hauv timer hom , lub voj voog hauv tshuab yog suav. Yog li no cov npe no tau nce ntxiv hauv txhua lub voj voog tshuab. Yog li thaum lub moos zaus yog 12MHz, ces tus sijhawm sau npe yog nce nyob rau hauv txhua millisecond. Hauv no hom nws ignores sab nraud sijhawm pin input.

Ib yam li ntawd, nws tau nug, qhov haujlwm ntawm TMOD sau npe yog dab tsi?

Lub npe TMOD yog siv los xaiv qhov kev khiav hauj lwm hom thiab timer/counter ua haujlwm ntawm timers. Cov hom ntawv ntawm TMOD sau npe yog, Qhov qis dua plaub ntawm TMOD sau npe yog siv los tswj timer-0 thiab plaub qhov saum toj yog siv los tswj timer-1.

Dab tsi yog siv timer thiab txee hauv microcontroller?

Cov txee / Timers . Cov txee , uas nyob rau hauv qee qhov kev nkag siab tuaj yeem hu ua sijhawm , yog ib qho tseem ceeb tshaj plaws sub-function ntawm a microcontroller . Cov no pab kom precisely lub sij hawm txheej txheem, tsim teeb liab thiab suav xwm txheej. A txee converts tus naj npawb ntawm input voj voog mus rau ib tug binary tus nqi siv ib tug array ntawm triggers.

Pom zoo: