Cov txheej txheem:

Tus Neeg Tuaj Ntsuam Xyuas Siv 8051 thiab IR Sensor Nrog LCD: 3 Kauj Ruam
Tus Neeg Tuaj Ntsuam Xyuas Siv 8051 thiab IR Sensor Nrog LCD: 3 Kauj Ruam

Video: Tus Neeg Tuaj Ntsuam Xyuas Siv 8051 thiab IR Sensor Nrog LCD: 3 Kauj Ruam

Video: Tus Neeg Tuaj Ntsuam Xyuas Siv 8051 thiab IR Sensor Nrog LCD: 3 Kauj Ruam
Video: Ua Tsis Tau Tus Neeg Koj Nyiam -2 SIAB (Official Audio Lyric ) 2024, Hlis ntuj nqeg
Anonim
Tus Neeg Tuaj Saib Xyuas Siv 8051 thiab IR Sensor Nrog LCD
Tus Neeg Tuaj Saib Xyuas Siv 8051 thiab IR Sensor Nrog LCD

Nyob Zoo Cov Phooj Ywg, Kuv tau piav qhia yuav ua li cas thiaj ua tus saib xyuas siv 8051 thiab IR sensor thiab nthuav tawm hauv LCD. 8051 yog ib lub microcontroller nrov tshaj plaws siv rau kev nyiam ua, kev lag luam thov thoob plaws ntiaj teb. Kuv tau ua tus neeg tuaj ntsib nrog lub nti ntawd.

Kuv tau siv 78E052 Nuvoton microcontroller ntawm kuv kho vajtse. koj tuaj yeem siv txhua yam ntawm 8051 microcontroller. Cov cai uas kuv tau siv yog sau rau hauv Embedded C thiab muab tso ua ke ntawm keil compiler.

Khoom siv:

89C51 microcontroller

IR sensor

16x2 LCD Zaub

Kauj Ruam 1: Tsim Kho Vajtse

Tsim Kho Vajtse
Tsim Kho Vajtse
Tsim Kho Vajtse
Tsim Kho Vajtse

Kuv tau tsim kho vajtse zoo li no. Raws li koj pom ntawm daim duab, Kuv tau kos cov duab raws li cov txheej txheem ntawm cov phiaj xwm phiaj xwm uas kuv tau muab rau ntawm daim duab. Koj tuaj yeem tsim koj tus kheej Circuit thiab hloov kho cov cai.

Kauj Ruam 2: Txoj Cai Txheej Txheem rau Tus Neeg Qhua

#ncig #ncig

swb rs = P3^6; sbit ib = P3^7; tsis muaj lcd (char a, int b); unsigned char msg = "Counter"; tus ch [4]; void ncua (); void counter (); koj k;. tsis kos npe rau hauv val; tsis muaj qhov tseem ceeb () {lcd (0x38, 0); lcd (0x0c0, 0); lcd (0x80, 0); TMOD = 0x05; txee (); } void ncua () {int kuv; rau (kuv = 0; kuv <= 2000; kuv ++); } void counter () {TL0 = 0; TR0 = 1; rau (k = 0; k <5; k ++) {lcd (msg [k], 1); } thaum (1) {lcd (0x88, 0); val = TL0 | TH0 << 8; sprintf (ch, "%ua", val); rau (k = 0; k <5; k ++) {lcd (ch [k], 1); }}} tsis muaj lcd (char a, int b) {P1 = a; rs = ib; ib = 1; ncua (); ua = 0; ncua (); }

Kauj Ruam 3: NTUJ

OUTPUT
OUTPUT

txuas IR sensor nrog lub microcontroller

download tau cov cai

txav ib qho khoom hla IR sensor

Koj tuaj yeem soj ntsuam qhov Object suav hauv LCD

Pom zoo: