找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 31918|回复: 89
收起左侧

酷!用51单片机在16×16LED 点阵上玩俄罗斯方块游戏 程序+PCB+电路图

  [复制链接]
ID:16982 发表于 2009-9-8 20:14 | 显示全部楼层 |阅读模式
很酷的16×16LED俄罗斯方块游戏制作资料分享给51黑电子论坛的朋友:
pads画的图:
51hei.png 51hei.png

所有程序源码包含工程文件: 源程序.rar (59.23 KB, 下载次数: 969)

评分

参与人数 7黑币 +49 收起 理由
liang1314 + 5 回帖助人的奖励!
chit100 + 5
huang917500 + 5 很给力!
51黑ren + 12 很给力!
1liwen + 5
liwenjieli + 5
红尘有你 + 12 共享资料的积分奖励!

查看全部评分

回复

使用道具 举报

ID:15033 发表于 2009-9-9 11:09 | 显示全部楼层
good,给大家省点黑币 楼主的源码如下:
  1. /*********************************************************************************************************
  2. **                                             俄罗斯方块
  3. **                                    基于8位51系列MCU(SST89E516)
  4. **

  5. **                                           All Rights Reserved
  6. **
  7. **                                                  V0.00
  8. **
  9. **
  10. **--------------文件信息--------------------------------------------------------------------------------
  11. **文   件   名: ELS.c
  12. **最后修改日期: 2009年5月20日
  13. **描       述: 基于51单片机的俄罗斯方块游戏   显示屏幕为16*16 双色高亮点阵模块
  14. **
  15. **--------------历史版本信息----------------------------------------------------------------------------
  16. ** 修改人: 赵同阳
  17. ** 版  本: V0.00
  18. ** 日 期:
  19. ** 描 述: 原始版本
  20. **------------------------------------------------------------------------------------------------------
  21. **--------------当前版本修订------------------------------------------------------------------------------
  22. ** 修改人:
  23. ** 日 期:
  24. ** 描 述:
  25. **
  26. **------------------------------------------------------------------------------------------------------
  27. ********************************************************************************************************/


  28. #include"reg52.h"                 //包含51 特殊功能寄存器资源变量声明文件
  29. #include <intrins.h>                 //KEILC51 自带的左右移库函数
  30. #include <stdlib.h>                         //包含  KEILC51 的随机数产生函数
  31. #include"font.h"

  32. #define uchar unsigned char         // 将常用的数据类型 缩写
  33. #define uint  unsigned int         // 将常用的数据类型 缩写

  34. #define H_H   P2                            // 定义显示屏的高8行选择位
  35. #define H_L   P0                         // 定义显示屏的低8行选择位

  36. sbit SUOCUN = P3^3;                         // 定义移位寄存器74HC595的锁存端口
  37. sbit CLOCK = P3^2;                         // 定义移位寄存器74HC595的时钟端口
  38. sbit DI = P3^5;                                 // 定义移位寄存器74HC595的数据端口
  39. sbit OE = P3^4;                                 // 定义移位寄存器74HC595的使能端口

  40. uchar idata  disp_buff[32];         // 定义显示直接送往74HC595 的显示缓存

  41. uchar idata  disp_buff1[32]; // 定义显示直接送往74HC595 的显示缓存备份 因为处理显示缓存在中断中完成,而缓存中数据的处理

  42.                                                          // 在前台,这样显示会有点错乱,所以做了备份.这样在加工显存中数据的时候,送备份中的数据到显示屏

  43. uchar rec_line[16];                         // 记录堆满一行的行编号数组

  44. uchar  cur_mod=0;                         //  当前形状编号

  45. uchar color=0;

  46. uchar  cur_mod_sty=0;                 //  当前形状变化的四种状态编号

  47. uchar time_down=0;                         //  设置自动下降标志,由定时器触发

  48. uint time_count=0;                     //  记录中断次数,为了得到更长的定时时间

  49. uchar need_redraw_temp=0;         //  是否需要刷新显存中的数据,太频繁刷新会降低系统性能,如在程序中需刷新,请置此标志

  50. uchar need_save2_loc=0;                 //  当前方块因为无法下降,而停下来.这时候需将 "显示阵列"数字的数据dis_pos[20][16] 保存 (显示窗内所有方块的位置)到"记录数组阵列"LOC_pos[20][16]

  51. uchar done_line_num=0;                 //  记录本次方块下降结束,成就多少行满

  52. char els_cur_x=1;                         //  记录当前方块的X位置

  53. char els_cur_y=3;                         //  记录当前方块的Y位置

  54. uchar cur_key=0;                         //  记录本次按键扫描得到的按键号

  55. uchar old_key=0;                         //  记录上次按键扫描得到的按键号

  56. uchar key_time=0;                         //  记录按键按下去多长时间

  57. uchar char_move_time=0;      //


  58. #define game     1
  59. #define logo     2

  60. uchar  sys_st =logo;

  61. #define max_long_pre 50                 //  定义按键按下去多少个循环监测周期才算"常按",根据实际测量一次按键扫描15MS执行一次,那这里就50*15MS 执行第二
  62.                              //  功能比如  下降按键  短按为下降一格 如果常按 就触发迅速下降功能

  63. uchar  data  temp_els[16]=         //  方块的固定形状是保存到ROM区域的(els_sty[6][4][4][4]),但是为了加工的方便,将固定ROM 内的基本形状取出放到本数组
  64. {
  65.    0xff,0xff,0xff,0xff,

  66.    0xff,0xff,0xff,0xff,

  67.    0xff,0xff,0xff,0xff,

  68.    0xff,0xff,0xff,0xff,
  69. };

  70. uchar  data  temp_test[16]=              //在当前形状变形(旋转)前要先判断当前方块如果变成下一个形状能否造成碰触
  71. {
  72.    0xff,0xff,0xff,0xff,

  73.    0xff,0xff,0xff,0xff,

  74.    0xff,0xff,0xff,0xff,

  75.    0xff,0xff,0xff,0xff,
  76. };

  77. uchar xdata font_1[32]=
  78. {0x00,0x01};

  79. uchar xdata font_2[32]=
  80. {0x00,0x01};

  81. uchar code  temp_els_empty[16]=          //定义个4*4 的空方块,主要是为了清除上次方块动作留下的痕迹
  82. {
  83.    0x00,0x00,0x00,0x00,

  84.    0x00,0x00,0x00,0x00,

  85.    0x00,0x00,0x00,0x00,

  86.    0x00,0x00,0x00,0x00,
  87. };

  88. uchar data_led[4]={0xff,0xff,0xff,0xff}; //显示在定时器中断中调用,每次只显示一行,一行中是16位(2个字节)本屏幕时双色所以定义四个字节

  89. uchar  xdata  loc_pos[20][16]=                 //定义记录每个已经固定点的位置                           为了简化计算,每个点用一个字节代替,可以减少运算时间和复杂性
  90. {
  91.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  92.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  93.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  94.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  95.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  96.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  97.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  98.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  99.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  100.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  101.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  102.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  103.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  104.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  105.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  106.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  107.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  108.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  109.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  110.    0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,

  111. };

  112. uchar  xdata  dis_pos[20][16]=
  113.                                //显示屏幕要刷新的数据  所对应的阵列,为了简化计算,每个点用一个字节代替,可以减少运算时间和复杂性
  114.                                //但是送到屏幕上的数据是由这些数据转过来的,最终转成每个点对应一位.由数组disp_buff[32]接收
  115. {
  116.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  117.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  118.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  119.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  120.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  121.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  122.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  123.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  124.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  125.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  126.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  127.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  128.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  129.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  130.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  131.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  132.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  133.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  134.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  135.    0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,

  136. };

  137. uchar  code  dis_ini[20][16]=        //初始化固定点的记录情况,每次游戏开始前调用
  138. {
  139.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  140.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  141.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  142.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  143.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  144.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  145.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  146.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  147.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  148.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  149.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  150.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  151.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  152.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  153.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  154.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  155.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  156.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  157.    0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,

  158.    0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,

  159. };

  160.                                   //种 形 行        列
  161.                                  //类 状 号        号
  162. uchar code els_sty[6][4][4][4]=                   //定义游戏中用到的方块形状种类  本种类的四种角度  每种方块由4*4点组成
  163. {                                                                           //可以轻易加新形状,如果自己加新的形状,要靠X轴和Y轴!!
  164. {
  165.   {
  166.    {0xff,0x00,0x00,0x00},

  167.    {0xff,0x00,0x00,0x00},

  168.    {0xff,0x00,0x00,0x00},

  169.    {0xff,0x00,0x00,0x00},
  170.   },

  171.   {
  172.    {0x00,0x00,0x00,0x00},

  173.    {0x00,0x00,0x00,0x00},

  174.    {0x00,0x00,0x00,0x00},

  175.    {0xff,0xff,0xff,0xff},
  176.   },
  177.   {
  178.    {0xff,0x00,0x00,0x00},

  179.    {0xff,0x00,0x00,0x00},

  180.    {0xff,0x00,0x00,0x00},
  181.          
  182.    {0xff,0x00,0x00,0x00},
  183.   },

  184.   {
  185.    {0x00,0x00,0x00,0x00},

  186.    {0x00,0x00,0x00,0x00},

  187.    {0x00,0x00,0x00,0x00},

  188.    {0xff,0xff,0xff,0xff},
  189.   },
  190. },
  191. //////////////////////////////////////////////////////////以上为形状1所对应的四种状态///////////////////////////////////////
  192. {
  193.   {
  194.    {0x00,0x00,0x00,0x00},

  195.    {0x00,0xff,0x00,0x00},

  196.    {0x00,0xff,0x00,0x00},

  197.    {0xff,0xff,0xff,0x00},
  198.   },

  199.   {
  200.    {0x00,0x00,0x00,0x00},

  201.    {0xff,0x00,0x00,0x00},

  202.    {0xff,0xff,0xff,0x00},

  203.    {0xff,0x00,0x00,0x00},
  204.   },
  205.   {
  206.    {0x00,0x00,0x00,0x00},

  207.    {0xff,0xff,0xff,0x00},

  208.    {0x00,0xff,0x00,0x00},

  209.    {0x00,0xff,0x00,0x00},
  210.   },

  211.   {
  212.    {0x00,0x00,0x00,0x00},

  213.    {0x00,0x00,0xff,0x00},

  214.    {0xff,0xff,0xff,0x00},

  215.    {0x00,0x00,0xff,0x00},
  216.   },
  217. },
  218. //////////////////////////////////////////////////////////以上为形状2所对应的四种状态///////////////////////////////////////
  219. {
  220.   {
  221.    {0x00,0x00,0x00,0x00},

  222.    {0x00,0x00,0x00,0x00},

  223.    {0xff,0xff,0x00,0x00},

  224.    {0xff,0xff,0x00,0x00},
  225.   },

  226.   {
  227.    {0x00,0x00,0x00,0x00},

  228.    {0x00,0x00,0x00,0x00},

  229.    {0xff,0xff,0x00,0x00},

  230.    {0xff,0xff,0x00,0x00},
  231.   },
  232.   {
  233.    {0x00,0x00,0x00,0x00},

  234.    {0x00,0x00,0x00,0x00},

  235.    {0xff,0xff,0x00,0x00},

  236.    {0xff,0xff,0x00,0x00},
  237.   },

  238.   {
  239.    {0x00,0x00,0x00,0x00},

  240.    {0x00,0x00,0x00,0x00},

  241.    {0xff,0xff,0x00,0x00},

  242.    {0xff,0xff,0x00,0x00},
  243.   },
  244. },
  245. //////////////////////////////////////////////////////////以上为形状3所对应的四种状态///////////////////////////////////////
  246. {
  247.   {
  248.    {0x00,0x00,0x00,0x00},

  249.    {0x00,0x00,0x00,0x00},

  250.    {0x00,0xff,0x00,0x00},

  251.    {0xff,0xff,0xff,0x00},
  252.   },

  253.   {
  254.    {0x00,0x00,0x00,0x00},

  255.    {0xff,0x00,0x00,0x00},

  256.    {0xff,0xff,0x00,0x00},

  257.    {0xff,0x00,0x00,0x00},
  258.   },
  259.   {
  260.    {0x00,0x00,0x00,0x00},

  261.    {0x00,0x00,0x00,0x00},

  262.    {0xff,0xff,0xff,0x00},

  263.    {0x00,0xff,0x00,0x00},
  264.   },

  265.   {
  266.    {0x00,0x00,0x00,0x00},

  267.    {0x00,0xff,0x00,0x00},

  268.    {0xff,0xff,0x00,0x00},

  269.    {0x00,0xff,0x00,0x00},
  270.   },
  271. },
  272. //////////////////////////////////////////////////////////以上为形状4所对应的四种状态///////////////////////////////////////
  273. {
  274.   {
  275.    {0x00,0x00,0x00,0x00},

  276.    {0xff,0x00,0x00,0x00},

  277.    {0xff,0xff,0xff,0x00},

  278.    {0x00,0x00,0xff,0x00},
  279.   },

  280.   {
  281.    {0x00,0x00,0x00,0x00},

  282.    {0x00,0xff,0xff,0x00},

  283.    {0x00,0xff,0x00,0x00},

  284.    {0xff,0xff,0x00,0x00},
  285.   },
  286.   {
  287.    {0x00,0x00,0x00,0x00},

  288.    {0xff,0x00,0x00,0x00},

  289.    {0xff,0xff,0xff,0x00},

  290.    {0x00,0x00,0xff,0x00},
  291.   },

  292.   {
  293.    {0x00,0x00,0x00,0x00},

  294.    {0x00,0xff,0xff,0x00},

  295.    {0x00,0xff,0x00,0x00},

  296.    {0xff,0xff,0x00,0x00},
  297.   },
  298. },
  299.   //////////////////////////////////////////////////////////以上为形状5所对应的四种状态///////////////////////////////////////
  300. };

  301. //自己做的汉子库

  302. uchar code zhi[] =          // 数据表
  303. {
  304.       0x01,0x00,0x01,0x00,0x01,0x04,0xFF,0xFE,
  305.       0x01,0x00,0x01,0x00,0x01,0x00,0x3F,0xFC,
  306.       0x00,0x00,0x02,0x00,0x11,0x80,0x50,0x84,
  307.       0x50,0x12,0x90,0x12,0x0F,0xF0,0x00,0x00,
  308. };

  309. uchar code bo[] =          // 数据表
  310. {

  311.       0x10,0x50,0x10,0x48,0x17,0xFC,0x10,0x40,
  312.       0xFB,0xF8,0x12,0x48,0x13,0xF8,0x1A,0x48,
  313.       0x33,0xF8,0xD2,0x48,0x10,0x10,0x1F,0xFE,
  314.       0x12,0x10,0x11,0x10,0x51,0x50,0x20,0x20,

  315. };
  316. uchar code dian[] =          // 数据表
  317. {

  318.       0x1F,0xF0,0x41,0x04,0x7F,0xFE,0x81,0x02,
  319.       0x3D,0x74,0x01,0x00,0x3D,0x70,0x01,0x00,
  320.       0x3F,0xF8,0x21,0x08,0x3F,0xF8,0x21,0x08,
  321.       0x3F,0xF8,0x01,0x02,0x01,0x02,0x01,0xFE,

  322. };
  323. uchar code zi[] =          // 数据表
  324. {
  325.       0x00,0x10,0x3F,0xF8,0x00,0x10,0x00,0x20,
  326.       0x00,0x40,0x01,0x80,0x01,0x04,0xFF,0xFE,
  327.       0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,
  328.       0x01,0x00,0x01,0x00,0x05,0x00,0x02,0x00
  329. };

  330. void font_round()
  331. {
  332.    uchar a=0,b=0;
  333.    for(a=0;a<16;a++)
  334.    {
  335.      font_1[a*2]<<=1;
  336.      if(font_1[a*2+1]&0x80)
  337.             font_1[a*2]+=1;

  338.          font_1[a*2+1]<<=1;
  339.          if(font_2[a*2]&0x80)
  340.            font_1[a*2+1]+=1;

  341.          font_2[a*2]<<=1;
  342.          if(font_2[a*2+1]&0x80)
  343.            font_2[a*2]+=1;
  344.          
  345.          font_2[a*2+1]<<=1;
  346.    }

  347.    for(a=0;a<32;a++)
  348.    {
  349.     disp_buff[a]=font_1[a];
  350.    }
  351. }

  352. void send_595(uchar dat)  //向595发一个字节数据
  353. {
  354.   uchar a=0;
  355.   for(a=0;a<8;a++)                  //将一个字节数据分8次依次移入595
  356.   {         
  357.     CLOCK=0;
  358.     if(dat&0x01)
  359.         DI=1;
  360.         else
  361.         DI=0;
  362.         dat=dat>>1;
  363.         CLOCK=1;
  364.   }

  365. }

  366. void ini_int(void)                  //初始化中断和定时系统,本程序只用到了定时器1  
  367. {
  368.                         // D7    D6  D5 D4              D3    D2  D1 D0
  369.   TMOD=0X11;//GATA  C/T  M1 M0         -------   GATA  C/T  M1 M0          定时器工作模式设置为 GATA=0关闭门控使能  C/T=0  M1=0   M0=1,选择时钟源来自外部晶体12分频.

  370.   ET0=0;    //打开外部中断0的使能开关
  371.   ET1=1;        //打开外部中断1的使能开关

  372.   PT0=0;    //设置外部中断0的中断优先等级为0
  373.   PT1=0;    //设置外部中断1的中断优先等级为0

  374.   TH0=63;        //设置定时器0的高8位初始化值
  375.   TL0=0xcd;        //设置定时器0的低8位初始化值 精确10毫秒溢出

  376.   TH1=0XE0;        //设置定时器1的高8位初始化值
  377.   TL1=0X00;        //设置定时器1的低8位初始化值  大约3MS 左右溢出


  378.   TR0=0;        //让定时器0开始工作
  379.   TR1=1;        //让定时器1开始工作

  380.   EA =1;        //打开中断允许总开关
  381. }


  382. void send_data_led(uchar *p)   //将一行的数据送出到595  包括绿色和红色
  383. {
  384.    uchar a=0;
  385.    send_595(*(p+3));
  386.    send_595(*(p+2));
  387.    send_595(*(p+1));
  388.    send_595(*p);
  389. }

  390. uint rond_k=0x8000;                           //因为采用动态扫描,每次只能让一行亮,这里控制行的是P2 口和P0 口,两个字节.声明个两字节的变量,依次循环在每位上


  391. void  dis_pos2dis_buff()           //将显示阵列的数据(每点对应一个字节对应每点对应一位)
  392. {
  393.    uchar a=0;
  394.    uchar b=0;
  395.    uchar c=0;
  396.    uchar *t=dis_pos;
  397.    t+=64;
  398.    for(c=0;c<32;c++)
  399.    {
  400.     for(a=0;a<8;a++)
  401.     {
  402.      if(*t)                                                                  //将dis_pos的数据(每个点对应一字节)转成(每点一个位)disp_buff
  403.           disp_buff1[b]=(disp_buff1[b]<<1)+1;
  404.          else
  405.           disp_buff1[b]=(disp_buff1[b]<<1);
  406.           t++;
  407.     }
  408.     b++;
  409.    }                                                                        //对临时缓冲操作
  410.    for(c=0;c<32;c++)
  411.    {
  412.      disp_buff[c]=disp_buff1[c]        ;            //将临时缓冲加到32字节的刷新缓冲
  413.    }
  414. }

  415. void add_els_temp2dis_pos(uchar *p,char x_start,char y_start) //将当前俄罗斯显示到窗口的指定位置
  416. {
  417.    uchar aa=0,bb=0;
  418.    for(;(y_start>=0)&&(aa<4);aa++,y_start--)
  419.    {
  420.     for(bb=0;bb<4;bb++)
  421.         {
  422.            if(p[(3-aa)*4+bb])
  423.             dis_pos[y_start][x_start+bb]=0xff;
  424.         }
  425.    }
  426. }

  427. void save_dis2loc()            //将显示阵列保存 到记录阵列                                                            
  428. {
  429.    uchar a,b;
  430.    for(a=0;a<20;a++)
  431.     for(b=0;b<16;b++)
  432.           loc_pos[a][b]=dis_pos[a][b];
  433. }

  434. uchar test_down(uchar *p)          //测试是否有下降的可能
  435. {
  436.    uchar a=0,b=0;
  437.    for(a=0;a<4;a++)
  438.     for(b=0;b<4;b++)
  439.      if(p[a*4+b])
  440.       if(loc_pos[els_cur_y+1-(3-a)][els_cur_x+b])
  441.          return 0xff;
  442.    return 0;
  443. }
  444. uchar test_left(uchar *p)         //测试是否有左移的可能
  445. {
  446.    uchar a=0,b=0;
  447.    for(a=0;a<4;a++)
  448.     for(b=0;b<4;b++)
  449.      if(p[a*4+b])
  450.       if(loc_pos[els_cur_y-(3-a)][els_cur_x+b-1])
  451.          return 0xff;
  452.    return 0;
  453. }
  454. uchar test_right(uchar *p)        //测试是否能右移可能
  455. {
  456.    uchar a=0,b=0;
  457.    for(a=0;a<4;a++)
  458.     for(b=0;b<4;b++)
  459.      if(p[a*4+b])
  460.       if(loc_pos[els_cur_y-(3-a)][els_cur_x+b+1])
  461.          return 0xff;
  462.    return 0;
  463. }
  464. uchar find_line(uchar *p)   //每次下降结束就监测是否凑够一行,是否满,以及记录凑成了几行,和凑满一行的行号
  465. {
  466.   uchar a=0,b=0,c=0;
  467.   for(a=0;a<19;a++)
  468.   {
  469.     c=0;
  470.     for(b=0;b<16;b++)
  471.          if(loc_pos[a][b])
  472.            c++;
  473.         if(c==16)
  474.          {
  475.           *p=a;
  476.            p++;
  477.           done_line_num++;
  478.          }
  479.          if((a==4)&&(c>2))
  480.          return 1;
  481.   }
  482.   return 0;
  483. }
  484. void copy_s_d()                         //将当前方块的下个形状4*4 装到测试方块存储中,以便测试当前是否能变形
  485. {
  486.   uchar a=0,b=0,c=0;
  487.   if(cur_mod_sty<4)
  488.   c=cur_mod_sty+1;
  489.   else
  490.   c=0;
  491.   for(a=0;a<4;a++)
  492.    for(b=0;b<4;b++)
  493.    {
  494.     temp_test[a*4+b]=els_sty[cur_mod][c][a][b];
  495.    }
  496. }

  497. void copy_d_s()                    //将下一个方块的形状调出放到 当前方块装载
  498. {
  499.   uchar a=0,b=0,c=0;
  500.   if(cur_mod_sty<3)
  501.   c=cur_mod_sty+1;
  502.   else
  503.   c=0;
  504.   for(a=0;a<4;a++)
  505.    for(b=0;b<4;b++)
  506.    {
  507.     temp_els[a*4+b]=els_sty[cur_mod][c][a][b];
  508.    }
  509. }
  510. void copy_d_s1()           //和上面一样用途一样,只是一个在中断中调用,一个在后台调用
  511. {
  512.   uchar a=0,b=0,c=0;
  513.   if(cur_mod_sty<3)
  514.   c=cur_mod_sty+1;
  515.   else
  516.   c=0;
  517.   for(a=0;a<4;a++)
  518.    for(b=0;b<4;b++)
  519.    {
  520.     temp_els[a*4+b]=els_sty[cur_mod][c][a][b];
  521.    }
  522. }
  523. unsigned char get_key()//得到当前按键数据在1-16之间,无按下,返回0
  524. {
  525. unsigned char a=0;
  526. unsigned char b=0;
  527. unsigned char c=0;
  528. unsigned char key=0;
  529. for(a=0;a<4;a++)
  530. {
  531.     P1=~(0X80>>a);
  532.         c=(P1&0XFF);
  533.     if((P1&0x0f)!=0x0f)
  534.          {
  535.            for(b=0;b<4;b++)
  536.            {
  537.              P1=~(0X08>>b);
  538.          if((P1>>4)!=0X0F)
  539.                  {
  540.                  key=a*4+b+1;
  541.          break;
  542.                  }
  543.            }
  544.          }
  545. }
  546. return key;
  547. }

  548. void ex1_int(void) interrupt 3        /*外部中断1的服务函数  即外部中断1发生后单片机自动调转到本函数处执行*/
  549. {

  550.                          static unsigned char index_disp=0;           //定义一个静态变量来记录现在显示哪一位
  551.                          static unsigned char move_count=0;
  552.                          static unsigned char font_count=0;
  553.                          uchar h=0,l=0;

  554.              TH1=0xfa;         //溢出后重新给定时器付初值   1MS 溢出一次
  555.              TL1=0X00;


  556.                          ///////////////////////////////////////////////////刷新一行点阵开始/////////////////////////////////////

  557.              if(color)
  558.                          {
  559.              data_led[2]=~disp_buff[index_disp*2];                   //将当前行的显存送到指定区域准备一次性发送
  560.              data_led[3]=~disp_buff[index_disp*2+1];
  561.              data_led[0]=0xff;                                                           //红色不显示
  562.              data_led[1]=0xff;                                                           //红色不显示
  563.                          }
  564.                          else
  565.                          {
  566.                          data_led[0]=~disp_buff[index_disp*2];                   //将当前行的显存送到指定区域准备一次性发送
  567.              data_led[1]=~disp_buff[index_disp*2+1];
  568.              data_led[2]=0xff;                                                           //红色不显示
  569.              data_led[3]=0xff;
  570.                          }

  571.              SUOCUN=0;
  572.                          if(index_disp<16)                                                           //一画面分16次送完,每次中断只送一行
  573.                           {
  574.                           OE=1;
  575.               send_data_led(data_led);
  576.               H_H=~(rond_k/0XFF);
  577.               H_L=~(rond_k&0XFF);
  578.               SUOCUN=1;
  579.                           OE=0;
  580.               rond_k=_iror_(rond_k,1);
  581.                           index_disp++;
  582.                              }
  583.                          /////////////////////////////////////////////////刷新一行点阵结束////////////////////////////////////

  584.                          else                                                                                 //16次送完,第17次用来处理其他要在中断处理的动作,比如按键扫描
  585.                           {
  586.                            rond_k=0x8000;                                          
  587.                            index_disp=0;                               //否则扫描一次结束继续重头再来
  588.                           if(sys_st==logo)
  589.                           {
  590.                           if(char_move_time<20)
  591.                            char_move_time++;
  592.                           else
  593.                            {
  594.                             char_move_time=0;
  595.                                 if(move_count<16)
  596.                                 {
  597.                              font_round();
  598.                                  move_count++;
  599.                                 }
  600.                                  else
  601.                                  {
  602.                                   move_count=0;
  603.                                   for(h=0;h<32;h++)
  604.                                   font_2[h]=GB_16[font_count].Msk[h];
  605.                                   if(font_count<25)
  606.                                    font_count++;
  607.                                   else
  608.                                   {
  609.                                    color=!color;
  610.                                    font_count=0;
  611.                                   }
  612.                                    font_round();
  613.                                    move_count++;
  614.                                  }
  615.                            }
  616.                            if(get_key())
  617.                            sys_st=game;
  618.                          }
  619.                           if(time_count<100)                           //自动下降时间大概1秒  
  620.                           {
  621.                                    time_count++;
  622.                           }
  623.                           else
  624.                           {
  625.                             if(test_down(temp_els))                  //判断是否还能下降
  626.                                 {
  627.                                   need_save2_loc=1;                          //下降不了,要保存 显存数据到固定阵列
  628.                                 }
  629.                                 else
  630.                                 {
  631.                                  if(need_redraw_temp==0)          //看现在是否后台在刷新,不是则允许刷新
  632.                                  {
  633.                                   time_down=1;                                  //时间造成的自动下降标志
  634.                                   els_cur_y++;                                  //当前方块可以下降
  635.                                   need_redraw_temp=1;                  //要重新刷新所有
  636.                                  }
  637.                             }
  638.                             time_count=0;
  639.                            } //时间引起的下降判断结束



  640.                           cur_key=get_key();              //扫描现在按键

  641.                           if(cur_key)                                          //有按键按下
  642.                           {
  643.                              if(cur_key==old_key)                  //判段是连续按下
  644.                                  {
  645.                                     if(key_time<max_long_pre) //连续按下的时间小于常按时间
  646.                                         {
  647.                                      key_time++;                          //按下的时间自动加1
  648.                                         }
  649.                                         else
  650.                                         {                                                  //常按处理
  651.                                            if(cur_key==14)                  //下降按键常按,快速下降
  652.                                             {
  653.                                                    cur_key=0;
  654.                                                                          if(test_down(temp_els))         //每次快速下降后判断是否降到底
  655.                                                          {
  656.                                                           need_save2_loc=1;
  657.                                                          }
  658.                                                         else
  659.                                                          {

  660.                                                              time_down=1;
  661.                                                              els_cur_y++;
  662.                                                              need_redraw_temp=1;
  663.                                                            
  664.                                                           }
  665.                                               }
  666.                                         }
  667.                                  }
  668.                                  else                                                //否则记录下现在的按键到OLD_KEY
  669.                                  {
  670.                                    old_key=cur_key;
  671.                    cur_key=0;                                //
  672.                                  }
  673.               }
  674.                           else                                                         //手松开
  675.                           {                                                            //清常按标志
  676.                              key_time=0;                                
  677.                              if(old_key)                            //假如按键不是0,执行记录下的按键功能  HAVE BUG
  678.                                  {
  679.                                    switch (old_key)
  680.                                    {                                                //变形处理
  681.                                       case 10:
  682.                                                  copy_s_d();                 //将下个形状装到temp_test中,
  683.                                                    
  684.                                               if((!test_left(temp_test))&&(!test_right(temp_test)))        //测试是否能变形
  685.                                                {
  686.                                                  if(cur_mod_sty<3)                                                                    //变形为下个状态
  687.                                                           cur_mod_sty++;
  688.                                                          else
  689.                                                           cur_mod_sty=0;
  690.                                                           copy_d_s();                                                                            //能变形,则调下个方块到现在的方块中                                                                                                                                                            
  691.                                                   need_redraw_temp=1;                                                                //设需要重新刷新标志
  692.                                                }
  693.                                               break;
  694.                                       case 13:  
  695.                                               if(!test_left(temp_els))                                                            //左键被按下
  696.                                                {
  697.                                                  els_cur_x--;
  698.                                                  need_redraw_temp=1;
  699.                                                }
  700.                                               break;
  701.                                           case 14:                                                                                                         //下降按键被按下,并松开后执行 下降一格命令
  702.                                               if(!time_down)
  703.                                                   {
  704.                                               if(test_down(temp_els))
  705.                                           {
  706.                                              need_save2_loc=1;
  707.                                           }
  708.                                            else
  709.                                           {
  710.                                             if(need_redraw_temp==0)
  711.                                             {
  712.                                              els_cur_y++;
  713.                                              need_redraw_temp=1;
  714.                                             }
  715.                                           }
  716.                                                   }
  717.                                                   else
  718.                                                   time_down=0;
  719.                                               need_redraw_temp=1;
  720.                                               break;
  721.                                          case 15:  
  722.                                              if(!test_right(temp_els))
  723.                                              {
  724.                                               els_cur_x++;
  725.                                               need_redraw_temp=1;
  726.                                              }
  727.                                               break;
  728.                                         };
  729.                                   }
  730.                                   key_time=0;
  731.                                   old_key=0;
  732.                           }  
  733.                         }

  734.                         
  735. }

  736. void ini_gui()                                  //重新初始化游戏界面
  737. {
  738.   uchar a=0,b=0;
  739.   for(a=0;a<20;a++)
  740.    for(b=0;b<16;b++)
  741.      loc_pos[a][b]=dis_ini[a][b];
  742. }  

  743. main()
  744. {
  745. uint a=0;
  746. uchar h=0,l=0;
  747. uint i;
  748.       
  749. uchar s_h=0,s_l=0;
  750. uchar d_h=0,d_l=0;

  751. i = (TH1<<8)|TL1;   
  752. srand(i);                                  //利用随机函数得到下一个方快形状
  753.      
  754. ini_gui();                                  //初始化游戏界面

  755. for(h=0;h<4;h++)
  756.   for(l=0;l<4;l++)
  757.     temp_els[h*4+l]=els_sty[cur_mod][cur_mod_sty][h][l];        //换新的形状到临时方块区域

  758. ini_int();

  759. while(1)
  760. {
  761.             switch(sys_st)
  762.                         {
  763.                           case game:

  764.                if(need_redraw_temp)
  765.                            {
  766.                             need_redraw_temp=0;
  767.                             for(h=0;h<20;h++)
  768.                              for(l=0;l<20;l++)
  769.                               dis_pos[h][l]= loc_pos[h][l];                             //按照已分布方块内容  重新刷新显存区域
  770.                             add_els_temp2dis_pos(temp_els,els_cur_x,els_cur_y);         //在显存中重新画临时方块
  771.                                 dis_pos2dis_buff();                                                                         //
  772.                            }

  773.                            if(!need_redraw_temp)  //因为每次方块坐标动作都引起重画 ,并且坐标值会变动,如果坐标值变动了,但没来的及重画,这个时候显存的值
  774.                                                   //如果被保留到方块位置记录阵列中,显然是错误的.
  775.                if(need_save2_loc)     //假如触底
  776.                            {
  777.                               key_time=0;                         //释放常按功能,例如常按引起迅速下降,这个结果是本次方块下降到碰触, 那么将引起下一个方块的重新开始,
  778.                                                          //因为下个方块重新开始的时候,我们显然不希望它也迅速下降到底.因此要释放和常按关系的变量key_time

  779.                               save_dis2loc();        //保存显存内容到纪录数组
  780.                                   els_cur_y=3;                 //重设方块位置         X 坐标
  781.                                   els_cur_x=6;                         //重设方块位置         Y 坐标
  782.                                   cur_mod = TL1%5;                         //调用随机函数得到下一个将要出现的方块形状编号
  783.                                   copy_d_s1();                         //将下一个形状,从固定ROM 调 到RAM 中


  784.                                   if(find_line(rec_line))//每次下降都检查是否本次下降结束引起堆满!!也就是:是否游戏结束
  785.                                   {
  786.                                     sys_st=logo;
  787.                                     els_cur_y=3;                 //游戏结束后你可以设置任意你要的动作,在这里只是重新开始游戏
  788.                                     ini_gui();                         //重新初始化界面
  789.                                   }
  790.                                   else
  791.                                   {
  792.                                     if(done_line_num)         //如果本次下落引起凑满一行或多行
  793.                                         {
  794.                                           d_h=19;

  795.                                           for(s_h=19;s_h>0;s_h--)                           //将目前 位置阵列数组中(排除已凑满一行)外的所有行,从最后一行往上拷
  796.                                           {
  797.                                            if((s_h!=rec_line[0])&&(s_h!=rec_line[1])&&(s_h!=rec_line[2])&&(s_h!=rec_line[3]))//凑满行后,从倒数第一行开始拷贝(排除已经堆满的行)
  798.                                            {
  799.                                            for(s_l=0;s_l<16;s_l++)
  800.                                             {
  801.                                               dis_pos[d_h][s_l]=loc_pos[s_h][s_l];           //重新建立各方快坐标        到显示内存暂存
  802.                                             }
  803.                                                 d_h--;
  804.                                            }
  805.                                           }

  806.                                           for(h=0;h<20;h++)                                                          //将暂存的数据 拷贝到方快位置关系数组中
  807.                                            for(l=0;l<16;l++)
  808.                                            {
  809.                                              loc_pos[h][l]=dis_pos[h][l];
  810.                                            }

  811.                                            for(h=0;h<5;h++)                                                          //本次处理凑成N行结束 清除一些中间变量
  812.                                            rec_line[h]=0x00;                                            
  813.                                            done_line_num=0;
  814.                                            need_redraw_temp=1;
  815.                                     }
  816.                               }
  817.                                   need_save2_loc=0;                                             //需要刷新
  818.                            }
  819.                          break;
  820.                                                                                                                                  //游戏结束显示滚动LOGO
  821.                          case  logo:

  822.                          break;
  823.                         }  
  824.                            
  825.                              
  826. }

  827. }
复制代码
回复

使用道具 举报

ID:14745 发表于 2009-9-12 11:59 | 显示全部楼层
高手啊!!!!!!!!!
回复

使用道具 举报

ID:17130 发表于 2009-9-12 21:38 | 显示全部楼层
太强大了 牛气
回复

使用道具 举报

ID:16856 发表于 2009-9-14 20:18 | 显示全部楼层
我看了视频了,真是太厉害了,高人啊
回复

使用道具 举报

ID:17077 发表于 2009-9-17 20:54 | 显示全部楼层

东西呢?

回复

使用道具 举报

ID:17313 发表于 2009-9-17 22:17 | 显示全部楼层
下来没用的啊!电路图没东西的啊
回复

使用道具 举报

ID:17313 发表于 2009-9-17 22:37 | 显示全部楼层

怎么搞的啊

回复

使用道具 举报

ID:17381 发表于 2009-9-19 22:38 | 显示全部楼层
等我也要学习
回复

使用道具 举报

ID:16015 发表于 2009-9-22 21:23 | 显示全部楼层
等我也要学习
回复

使用道具 举报

ID:16982 发表于 2009-9-26 15:09 | 显示全部楼层

回小山东,原理图和PCB 是PADS2005格式的。用PROTEL打不开的!

回复

使用道具 举报

ID:17294 发表于 2009-10-3 10:25 | 显示全部楼层
楼主很厉害啊
回复

使用道具 举报

ID:17725 发表于 2009-10-14 14:10 | 显示全部楼层

回帖是一种美德!  楼主好强大

回复

使用道具 举报

ID:18166 发表于 2009-10-16 13:40 | 显示全部楼层
好厉害!
回复

使用道具 举报

ID:18001 发表于 2009-10-19 13:08 | 显示全部楼层
高手,我几时才有这水平?努力啊!!!
回复

使用道具 举报

ID:18304 发表于 2009-10-20 15:51 | 显示全部楼层

很神奇啊,看得我有点心痒痒,还是有点思路,有空做做看

回复

使用道具 举报

ID:21971 发表于 2010-3-6 15:57 | 显示全部楼层

很好,不错!!!

回复

使用道具 举报

ID:22056 发表于 2010-3-9 16:54 | 显示全部楼层
 高手也!下载下来学习。 
回复

使用道具 举报

ID:10353 发表于 2010-3-17 18:41 | 显示全部楼层
有点意思啊,值得学习。
回复

使用道具 举报

ID:22213 发表于 2010-3-19 22:19 | 显示全部楼层
利害啊,我是新手,大开眼界啊
回复

使用道具 举报

ID:21968 发表于 2010-3-20 19:56 | 显示全部楼层
很强大  学习
回复

使用道具 举报

ID:22786 发表于 2010-4-2 18:13 | 显示全部楼层
请问刚开始时候LED是红色的,后来又是绿色的。是同一块板还是不同的板。
回复

使用道具 举报

ID:22649 发表于 2010-4-3 22:44 | 显示全部楼层

我的是8*8的点阵

回复

使用道具 举报

ID:22820 发表于 2010-4-4 01:46 | 显示全部楼层
真厉害啊
回复

使用道具 举报

ID:22867 发表于 2010-4-6 10:03 | 显示全部楼层

呵呵 抽空也做做玩

回复

使用道具 举报

ID:22809 发表于 2010-4-6 10:12 | 显示全部楼层

不错,学习

回复

使用道具 举报

ID:23180 发表于 2010-4-18 22:20 | 显示全部楼层

很强大,下来学习了,谢谢。

回复

使用道具 举报

ID:23045 发表于 2010-4-22 09:28 | 显示全部楼层

niu a

!!1

回复

使用道具 举报

ID:23404 发表于 2010-4-27 17:57 | 显示全部楼层

很好。我也在写

 

回复

使用道具 举报

ID:23708 发表于 2010-5-10 18:30 | 显示全部楼层

好厉害哟

回复

使用道具 举报

ID:23945 发表于 2010-5-21 12:29 | 显示全部楼层
高手啊!!学习一下!!
回复

使用道具 举报

ID:24001 发表于 2010-5-22 10:35 | 显示全部楼层
正在找这方面的资料!谢了!
回复

使用道具 举报

ID:24319 发表于 2010-6-19 18:58 | 显示全部楼层
你的图呢?没图好像看懂呀?
回复

使用道具 举报

ID:24797 发表于 2010-6-30 01:44 | 显示全部楼层
酷,下载来学习下
回复

使用道具 举报

ID:24810 发表于 2010-6-30 16:34 | 显示全部楼层
有意思!就是算法难点。电路应不是很难。
回复

使用道具 举报

ID:39002 发表于 2012-4-22 19:08 | 显示全部楼层
牛啊在哪下砸
回复

使用道具 举报

ID:38157 发表于 2012-4-23 23:53 | 显示全部楼层
楼主能指导我做做这个不??
回复

使用道具 举报

ID:41422 发表于 2012-6-8 16:00 | 显示全部楼层
这个需要哪些器件啊   可以发清单给我吗  楼主感恩呐
回复

使用道具 举报

ID:43446 发表于 2012-7-30 20:30 | 显示全部楼层
多谢分享
回复

使用道具 举报

ID:43655 发表于 2012-8-5 12:31 | 显示全部楼层
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
回复

使用道具 举报

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

本版积分规则

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

Powered by 单片机教程网

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