The most popular single chip microcomputer dot mat

2022-07-30
  • Detail

Single chip microcomputer dot matrix LED simple graphic display technology

1. experimental task

in 8x8 dot matrix LED display ★, ● and cardiogram, select the graphic to be displayed by pressing the key

2. circuit schematic diagram

figure 4.26.1

3. hardware system connection

(1) connect P1 port in MCU system area to dr1-dr8 port in dot matrix module area with 8-core row

(2) connect the P3 port in the MCU system area to the dc1-dc8 port in the lattice module area with 8-core core row

(3) connect the p2.0/a8 terminal in the MCU system area to the Sp1 terminal in the independent keyboard area with wires

4. content of program design

wobbe used to be the chief technical officer and managing director of Engel group (1). ★ the display diagram on the 8x8LED lattice is shown in the following figure

1 2345678

12h, 14h, 3CH, 48h, 3CH, 14h, 12h, 00h

(2). ● the display diagram on the 8x8LED lattice is shown in the following figure

1 2345678

00h, and 00h, 38h, 44h, 44h, 44h, 38h, 00h

(3). The cardiogram is displayed on the 8x8LED lattice as shown in the following figure

1 234567 8

tab: DB 0feh, 0fdh, 0fbh, 0f7h, 0efh, 0dfh, 02 There is a problem with the software of the experimental machine; BFH, 07fh

graph: DB 12h, 14h, 3CH, 48h, 3CH, 14h, 12h, 00h

db 00h, 00h, 38h, 44h, 44h, 38h, 00h

db 30h, 48h, 44h, 22h, 44h, 48h, 30h, 00h

end

6.c language source program p>

unsigned char code tab[]={0xfe, 0xfd, 0xfb, 0xf7,0xef, 0xdf, 0xbf, 0x7f}

unsignedchar code graph[3][8]={{0x12,0x14,0x3c,0x48,0x3c,0x14,0x12,0x00},

{0x00,0x00,0x38,0x44,0x44,0x44,0x38,0x00},

{0x30,0x48,0x44,0x22,0x44,0x48,0x30,0x00}

};

unsignedchar can take advantage of the advantages provided by high-performance carbon fiber count

unsignedchar cnta;

voidmain(void)

{

unsigned char i,j;

TMOD=0x01;

TH0=()/256;

TL0=()%256;

TR0=1;

ET0=1;

EA=1;

while(1)

{

if(P2_0==0)

{

for(i=5;i i--)

for(j=248;j j--);

if(P2_0==0)

{

count++;

if(count==3)

{

count=0;

}

while(P2_0==0);

}

}

}

}

voidt0(void) interrupt 1 using 0

{

TH0=()/256;

TL0=()%256;

P3=tab[cnta];

P1=graph[count][cnta];

cnta++;

if(cnta==8)

{

cnta=0;

}

}

Copyright © 2011 JIN SHI