找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 3985|回复: 3
收起左侧

单片机8*8点阵全亮源程序+仿真图

[复制链接]
ID:250103 发表于 2018-4-8 21:16 | 显示全部楼层 |阅读模式
广告屏程序+仿真图
51hei.png
QQ截图20180408211300.png

单片机源程序如下:
  1. #include <reg52.h>
  2. unsigned char code
  3. tab[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f} ;
  4. unsigned char code digittab[21][8]={
  5. {0x00,0x7c,0x42,0x42,0x7c,0x40,0x40,0x40},
  6. {0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00},   //0
  7.          {0x00,0x00,0x3c,0x24,0x24,0x3c,0x00,0x00},   //1
  8.          {0x00,0x7e,0x42,0x42,0x42,0x42,0x7e,0x00},           //2
  9.      {0xff,0x81,0x81,0x81,0x81,0x81,0x81,0xff},           //3
  10.          {0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
  11.          {0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00},
  12.          {0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00},
  13.          {0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00},
  14.          {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff},
  15.          {0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00},
  16.          {0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00},
  17.          {0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00},
  18.          {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x80},
  19.          {0x04,0x02,0x01,0x00,0x00,0x80,0x40,0x20},
  20.          {0x10,0x08,0x04,0x82,0x41,0x20,0x10,0x08},
  21.          {0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01},
  22.           {0x10,0x08,0x04,0x82,0x41,0x20,0x10,0x08},
  23.            {0x04,0x02,0x01,0x00,0x00,0x80,0x40,0x20},
  24.            {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x80},
  25.            {0x00,0x7e,0x81,0x81,0x81,0x81,0x7e,0x00},
  26. };
  27. unsigned int timecount;
  28. unsigned char cnta;
  29. unsigned char cntb;

  30. void main(void)
  31. {
  32. TMOD=0X01;
  33. TH0=(65536-3000)/256;
  34. TL0=(65536-3000)%256;
  35. TR0=1;
  36. ET0=1;
  37. EA=1;
  38. while(1)
  39.    {;
  40.    }
  41. }
  42. void t0(void) interrupt 1 using 0
  43. {
  44. TH0=(65536-3000)/256;
  45. TL0=(65536-3000)%256;
  46. P3=tab[cnta];
  47. P1=digittab[cntb][cnta];
  48. cnta++;
  49. if(cnta==8)
  50. {
  51. cnta=0;
  52. }
  53. timecount++;
  54. if(timecount==333)
  55. {
  56. timecount=0;
  57. cntb++;
  58. if(cntb==21)
  59. {
  60. cntb=0;
  61. }
  62. }
  63. }
复制代码
51hei.png
所有资料51hei提供下载:
广告屏.rar (15.59 KB, 下载次数: 53)

评分

参与人数 2黑币 +60 收起 理由
zkele + 10 很给力!谢谢共享!
admin + 50 共享资料的黑币奖励!

查看全部评分

回复

使用道具 举报

ID:395462 发表于 2018-9-9 10:20 | 显示全部楼层
hex要怎么载入?
捕获.PNG
回复

使用道具 举报

ID:962941 发表于 2021-9-2 16:51 | 显示全部楼层
发现595点不亮
回复

使用道具 举报

ID:168911 发表于 2021-9-2 22:07 | 显示全部楼层

硬件和软件要配套,
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表