#include "STC.h" //STC12C5A60S2头文件
#include "MyType.h" //常用数据类型定义
#include "led_do.h" //LED驱动头文件
#include "intrins.h"
#include "shuzu.h" //字模数据
int flag=0,flag1=0,a=0;
void LED_Init();
void ON_OFF();
void Delayms(uint16 n);
void Delay(uint16 z);
bit kk1;
//X 片选 Y 数据 Z 2803
void main()
{
uint8 i,j;
Z=0;
while(k2==1);
LED_Init();
for(i=0;i<2;i++)
DOT_PWM(0,0,0,120);
Delayms(800);
CUBE_LOG6(NUM2,3); // 倒数321
CLEAR();
while(1)
{
zimu(number,13,20,1); //LED CUBE
CLEAR();
denghuo(3); //逐亮逐灭
CUBE_LOG5(); //一个府面的LED,从下向上
Delayms(100);
LOG18(); //从顶层,向下一层层点亮,到全亮
Delayms(100);
LOG16(); //全亮
donghua(bianxing_table,11,1,24); //变形收缩,释放四个小正方形
Delayms(100);
FIRE(0,0);
FIRE(0,7);
FIRE(7,7);
FIRE(7,0);
CUBE_LOG5(); //逐面点亮一个府面的LED,从下向上流动
shalou1();
fn(4); //Delayms(8000); //沙漏痕迹
LOG12_1(); //落潮
for(i=0;i<1;i++)
for(j=0;j<3;j++)
cube(1,j,6); //空心立体放大缩小
LOG5(); //正方体收缩
LOG1(); //small cube //小正方体扩大,左右小正方体,四角小正体
CUBE_LOG5(); //逐面点亮一个府面的LED,从下向上流动
CLEAR();
LOG13(); // 下雨
rain(1,10,9);
CLEAR();
LOG22(); //雨滴
donghua(sin_cube_table,14,8,7);//波面起伏 //////
CUBE_LOG9();//雨帘
CUBE_LOG10();//音乐律动
LOG2(2,4);
LOG2(4,2);
CLEAR();
CUBE_LOG11();//水平表面顺时针环绕
link00(); //四个角收缩,全亮
LOG12(); //波浪
for(i=0;i<2;i++)
LOG17(); //从底层,一层层点亮,到全亮
donghua(bianxing_table,11,1,24); //变形收缩
LOG23(); //音柱 ////
FIRE(1,2);
shalou1();
LOG2(3,4);
FIRE(6,3);
flash0(2); //条状升降
fn(4); //Delayms(8000); //沙漏痕迹
flash0(5); //底面到顶面,led上下移动
xuanzhuantiao(0,8,3);//空心旋转
qumianxuanzhuan(1,10,3);
qumianxuanzhuan(0,10,3);
linkpc1(10); //一个Z面从上到下
pc1(4,3); //由下到上闪亮,再一个Z面从上到下
Delayms(100);
CLEAR();
denghuo(3); //逐亮逐灭
leitu(yc_table,3,2); //I LOVE U
CLEAR();
link_pingmian1(1); //一行LED从左到右
pingmian1(8,3); //水平面逆时针环绕
for(i=0;i<8;i++)
print(tab_print+i*8,0);
***0(10,3); //竖直面环绕
link(8); //旋转衔接
xuanzhuantiao(1,5,3);//平面旋转
xuanzhuantiao2(2,3); //移动旋转
qumianxuanzhuan(1,10,4);
qumianxuanzhuan(0,10,4);
qumianxuanzhuan2(13,8);//曲面摆动
xuanzhuantiao(1,3,7);
xuanzhuantiao(1,3,5);
xuanzhuantiao(1,5,3);
donghua(bianxing_table,11,1,24); //变形收缩,释放四个小正方形
xzcube(); //三方向旋转,再全亮
donghua(y_table,6,5,5); //四角小正方形旋转
donghua(x_table,6,5,5);
donghua(z_table,6,5,5);
link00();
shensuo(5);
donghua(sin_cube_table,14,8,5);//波面起伏
for(i=0;i<1;i++)
for(j=0;j<3;j++)
cube(0,j,6); //实心立体放大缩小
donghua(hart_table,2,10,32); //跳动的心 Delayms(8000);
rain(0,10,9);
LOG2(3,4);
CLEAR();
while(1);
}
}
void LED_Init()
{
IT0=1;
EX0=1;
EA=1;
kk1=1;
}
void EX_INT0() interrupt 0
{
Delayms(20);
kk1=~kk1;
}
void Delayms(uint16 n)
{
uint16 x,y;
for(x=n;x>0;x--)
for(y=0;y<600;y++);
}
void Delay(uint16 z)
{
uint8 i,t;
for(t=z;t>0;t--)
for(i=0;i<110;i++);
}