单片机控制8 * 8点阵显示和心形图的编程图
答案:1 悬赏:70 手机版
解决时间 2021-07-26 23:44
- 提问者网友:姑娘长的好罪过
- 2021-07-26 00:17
单片机控制8 * 8点阵显示和心形图的编程图
最佳答案
- 五星知识达人网友:封刀令
- 2021-07-26 01:29
心形图在8X8LED点阵上显示图如下图所示
1 2 3 4 5 6 7 8
|
|
|
|
|
|
|
|
| ● | ● |
| ● | ● |
|
|
● |
|
| ● |
|
| ● |
|
● |
|
|
|
|
| ● |
|
| ● |
|
|
| ● |
|
|
|
| ● |
| ● |
|
|
|
|
|
| ● |
|
|
|
|
|
|
|
|
|
|
|
|
30H,48H,44H,22H,44H,48H,30H,00H
#include <AT89X52.H>
unsigned char code tab[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};
unsigned char code graph[]={0x30,0x48,0x44,0x22,0x44,0x48,0x30,0x00};
unsigned char cnta;
void main(void)
{
unsigned char i,j;
TMOD=0x01;
TH0=(65536-4000)/256;
TL0=(65536-4000)%256;
TR0=1;
ET0=1;
EA=1;
while(1)
{
}
}
void t0(void) interrupt 1 using 0
{
TH0=(65536-4000)/256;
TL0=(65536-4000)%256;
P3=tab[cnta];
P1=graph[cnta];
cnta++;
if(cnta==8)
{
cnta=0;
}
}
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯