EDABOSS电子论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 509|回复: 0

[资料共享] proteus课程设仿真16*16LED点阵动态显示,动态显示汉字

[复制链接]

7

主题

0

回帖

16

E币

技术员

Rank: 2

积分
14
发表于 2017-3-28 14:22:45 | 显示全部楼层 |阅读模式
proteus课程设仿真16*16 LED点阵动态显示,动态显示汉字。
仿真原理图+程序都在里面。
142911s87vppthp7abpzen.png

单片机源程序:
  1. #include
  2. #define  uchar unsigned char
  3. #define  uint unsigned int

  4. uchar code col[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};  

  5. uchar code row[][32]={
  6. {0x80, 0x00,
  7. 0x40, 0x00,
  8. 0xf0, 0x7f,
  9. 0x2c, 0x00,
  10. 0x43, 0x10,
  11. 0x20, 0x0c,
  12. 0x98, 0x03,
  13. 0x0f, 0x21,
  14. 0x0a, 0x40,
  15. 0xe8, 0x3f,
  16. 0x08, 0x00,
  17. 0x88, 0x00,
  18. 0x28, 0x03,
  19. 0x1c, 0x1c,
  20. 0x08, 0x08,
  21. 0x00, 0x00 },    //显示字码:你

  22. {0x10, 0x80,
  23. 0x10, 0x43,
  24. 0xf0, 0x22,
  25. 0x1f, 0x14,
  26. 0x10, 0x0c,
  27. 0xf0, 0x73,
  28. 0x80, 0x20,
  29. 0x82, 0x00,
  30. 0x82, 0x40,
  31. 0x82, 0x80,
  32. 0xf2, 0x7f,
  33. 0x8a, 0x00,
  34. 0x86, 0x00,
  35. 0x82, 0x00,
  36. 0x80, 0x00,
  37. 0x00, 0x00}       //显示字码:好


  38. };
  39.          

  40. void delayms(uint t)                           //每1延时1ms
  41. {
  42.      uint x,y;
  43.      for(x=t;x>0;x--)
  44.          for(y=124;y>0;y--);
  45. }                                                

  46. void display(uint n)          //n为显示字码的序数
  47. {
  48.      uint i,j;
  49.          for(j=0;j<10;j++)   
  50.      for(i=0;i<16;i++)
  51.          {
  52.              if(i<8) P2=col[i],P3=0xff;
  53.                  else  P2=0xff, P3=col[i-8];         
  54.              P0=row[n][2*i];
  55.                  P1=row[n][2*i+1];
  56.                  delayms(3);                                   
  57.          }                                   
  58. }                        


  59. void main()
  60. {
  61.      while(1)         
  62.          {
  63.                  display(0);
  64.                  delayms(50);
  65.              display(1);
  66.                  delayms(50);        
  67.          }         
  68. }
  69.                                 
复制代码


LED点阵屏.rar

46 KB, 下载次数: 0, 下载积分: E币 -5 元

积分规则
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|EDABOSS电子论坛

GMT+8, 2024-4-23 18:55 , Processed in 0.045759 second(s), 23 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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