• 基于89c51步进电机的源程序

    #include "AT89X51.h" int delay(); void inti_lcd(); void show_lcd(int); void cmd_wr(); void ShowState(); void clock(unsigned int Delay) ; void DoSpeed(); //计算速度 //正转值 #define RIGHT_RUN 1 //反转值

    0
    146
    1KB
    2010-12-28
    9
  • 基于89C51的步进电机的控制的设计

    1 设计目的 (1)熟悉单片机AT89C51。 (2)掌握驱动芯片L297、L298功能及使用方法。 (3)了解步进电机的组成及工作原理。 (4)熟悉Protel99SE和Proteus 7使用。 (5)熟悉步进电机控制器的设计与制作。 (6)熟悉电路的设计过程及设计方法。

    4
    141
    171KB
    2010-12-28
    19
  • 基于89C51俄罗斯方块游戏的设计的源程序

    #include<intrins.h> #define LcdData P0 sbit RS=P2^7; //并行的指令/数据选择信号, H数据, L命令 sbit RW=P2^6; //并行读写选择信号, H读, L写 sbit E=P2^5; //并行使能端, H有效, L无效 //sbit PSB=P2^3; //并/串接口选择, H并,L串 //sbit RET=P2^4; //复位, L有效

    0
    166
    82KB
    2010-12-28
    9
  • 基于AT89C51的俄罗斯方块的设计

    #include "reg51.h" #include "12864.h" #define uchar unsigned char #define uint unsigned int static unsigned long Seed = 1; //静态 #define A 48271L #define M 2147483647L #define Q (M / A) #define R (M % A) sbit K1=P1^2; sbit K2=P1^4; sbit K3=P1^3; sbit K4=P1^5; sbit K5=P1^6; sbit K6=P1^7; sbit SPE=P3^7; unsigned char youxiflag=0; unsigned int idata num[19+2]={ 0xfff,//第1行,最下面 0x801,0x801,0x801,0x801,0x801,0x801,0x801,0x801,0x801,0x801, 0x801,0x801,0x801,0x801,0x801,0x801,0x801,0x801,0x801,//第2行到第20行共19行 0xfff//第21行,最上面 };//定义共21行,其中num[0]为下墙壁行,num[20]为上墙壁行,每行12格,最左一格为左墙壁列,最右一格为右墙壁列 unsigned char code Block[28][2]={ /* * 口 口口口 口口 * 口 口 口 口 * 口口 口 口口口 */ {0x88,0xc0},{0xe8,0x00},{0x62,0x20},{0x02,0xe0}, /* * 口 口口 口口口 * 口 口 口 口 * 口口 口口口 口 */ {0x22,0x60},{0x08,0xe0},{0xc8,0x80},{0xe2,0x00}, /* * 口 * 口口 口口 * 口 口口 */ {0x8c,0x40},{0x6c,0x00},{0x8c,0x40},{0x6c,0x00}, /* * 口 口口 * 口口 口口 * 口 */ {0x4c,0x80},{0xc6,0x00},{0x4c,0x80},{0xc6,0x00}, /* * 口 口 * 口 口口 口口口 口口 * 口口口 口 口 口 */ {0x04,0xe0},{0x8c,0x80},{0xe4,0x00},{0x26,0x20}, /*口 * 口 * 口 口口口口 * 口 */ {0x44,0x44},{0x0f,0x00},{0x44,0x44},{0x0f,0x00}, /* * 口口 * 口口 */ {0x06,0x60},{0x06,0x60},{0x06,0x60},{0x06,0x60} };

    5
    182
    218KB
    2010-12-28
    13
上传资源赚积分or赚钱