Cov txheej txheem:

LCD cuam tshuam nrog 8051 (AT89S52): 4 Cov Kauj Ruam
LCD cuam tshuam nrog 8051 (AT89S52): 4 Cov Kauj Ruam

Video: LCD cuam tshuam nrog 8051 (AT89S52): 4 Cov Kauj Ruam

Video: LCD cuam tshuam nrog 8051 (AT89S52): 4 Cov Kauj Ruam
Video: Casio G-Shock Mudmaster против Gulfmaster | G Shock GWG-1000 Mudmaster против G Shock GW... 2024, Hlis ntuj nqeg
Anonim
LCD cuam tshuam nrog 8051 (AT89S52)
LCD cuam tshuam nrog 8051 (AT89S52)

Nyob zoo qhov no yog pib ntawm 8051. LCD tuaj yeem ua haujlwm los ntawm 8-ntsis thiab 4-ntsis, tab sis hauv 8051 8-ntsis feem ntau yog siv, 4-ntsis siv thaum siv arduino, AVR thiab PIC. 8-ntsis hom txhais tau tias nws siv 8 xaim rau xa chaw nyob thiab cov ntaub ntawv.

Kauj Ruam 1: Cov Cheeb Tsam Yuav Tsum Tau:

LCD 16*2

Micro-maub los AT89S52

Crystal oscillator 11.0592MHz

Capacitor 10 uf

Ceramic capacitor 22pf

40 tus pin IC puag

Jumper Hlau

Potentio-meter 10k

Kauj Ruam 2: Teeb Kho Vajtse:

Kho vajtse teeb
Kho vajtse teeb

Kev kho vajtse txuas qhia hauv daim duab

Txuas qhov chaw nres nkoj 2 mus rau LCD cov ntaub ntawv pins.

Chaw nres nkoj 0.0 RS thiab Chaw Nkag 0.1 rau ENABLE.

RW rau hauv av.

Resistor thiab capacitor rau RESET tus pin.

Kauj ruam 3: Teeb Software:

Nruab KEIL4 ntawm koj lub PC

Program rau LCD cuam tshuam:

#suav nrog sbit rs = P0^0;

sbit ib = P0^1;

void ncua ();

tsis muaj dab tsi cmd ();

void dat ();

void lub ntsiab ()

{

char name [10] = "INSTRUCTABLES";

tsis kos npe rau hauv b;

P1 = 0x38;

cmd ();

P1 = 0x80;

cmd ();

P1 = 0x0f;

cmd ();

rau (b = 0; b <= 10; b ++)

{

P1 = npe ;

cov ();

ncua ();

}

}

tsis muaj dab tsi cmd ()

{

rs = 0;

ib = 1;

ncua ();

ib = 1;

}

void dat ()

{

rs = ib;

ib = 1;

ncua ();

ua = 0;

} void ncua ()

{

unsigned nyob rau hauv;

rau (a = 0; a <= 500; a ++);

}

Koj tuaj yeem rub tawm los ntawm no:

Kauj Ruam 4: KEV KAWM

electrosome.com/interfacing-lcd-with-8051-using-keil-c-at89c51/

Pom zoo: