资源简介
ISSI SN3731蜡烛灯完整资料,有PCB,SCH,源码。 STC12C5A60S2驱动资料
代码片段和文件信息
#define STC_MCU
#ifdef STC_MCU
#include “STC12C5A60S2.H“
#include “intrins.h“
#include “config.h“
#endif
#include “SN3731drv.h“
#ifndef uchar
#define uchar unsigned char
#endif
bit front_4_flag;
uchar wait_movie_int;
uchar modedemo_NO;
uchar timer_flag;
extern unsigned char g_fireworks_NO; //用于记录烟花动画播放到第几贞
extern unsigned int g_fireworks_Temp;
extern unsigned char g_lighting_NO;
extern unsigned char g_unlock_NO;
extern unsigned char g_water_NO;
extern unsigned char g_jingtaitu_NO;
extern unsigned char g_audio1_NO;
extern unsigned char g_audio2_NO;
extern unsigned char g_audio3_NO;
extern unsigned char g_CurrentMovie_NO;
extern unsigned char g_rail;
extern unsigned char g_times;
extern unsigned char g_MovieEnd_Flag;
extern unsigned char g_MovieRestart_Flag;
void init_g_parameter();
void delay(uchar t)
{
uchar tt;
for(;t>0;t--)
{
for(tt=250;tt>0;tt--);
for(tt=250;tt>0;tt--);
for(tt=250;tt>0;tt--);
}
}
void INT1_Serv() interrupt 7 //中断
{
EA=0;
IE1=0;
CCF1=0;
if(!KEY)
{
delay(150);
if(!KEY)
{
//EX0=0;
mode=1;
init_g_parameter();
g_MovieRestart_Flag=1;
demo_NO++;
if(demo_NO==9)
{demo_NO=1;}
wait_movie_int=0;
while(!KEY);
}
}
EA=1;
CCF1=0;
IE1=0;
}
void INT0_Serv() interrupt 0 //中断
{
EA=0;
IE0=0;
if(!chip_int)
{
if(!chip_int)
{
wait_movie_int=0; //等待中断标志位清零
front_4_flag=!front_4_flag; //1为播放前4贞标志,0为播放后4贞标志
}
}
EA=1;
IE0=0;
}
void init_g_parameter()
{
g_fireworks_NO=0; //用于记录烟花动画播放到第几贞
g_lighting_NO=0;
g_unlock_NO=0;
g_water_NO=0;
g_jingtaitu_NO=0;
g_audio1_NO=0;
g_audio2_NO=0;
g_audio3_NO=0;
g_CurrentMovie_NO=0;
g_rail=0;
g_times=0;
g_MovieEnd_Flag=0;
}
void Timer0() interrupt 1 //定时器0中断函数
{
//unsigned char i;
TH0=0X00;
TL0=0X00;
timer_flag++;
if(timer_flag==88)
{
timer_flag=0;
wait_movie_int=0;
//i=g_audio3_NO/8;
//if(data_flag==9)data_flag=0;
//break_timer=0;
}
TR0=1;
}
void InitTimer0(void)
{
TMOD =0x01; //定时器0工作在模式1(16位长度定时器模式)。
TR0 =0;
ET0 =1;
TH0=0X00;
TL0=0X00;
EA =1;
}
void main()
{
P0M1=0X40;//I/O口初始化
P0M0=0X40;
P1M1=0X06;
P1M0=0X06;
P2M1=0X00;
P2M0=0X00;
P3M1=0X00;
P3M0=0X00;
CMOD=0x80;//PCA在空闲模式下停止PCA计数工作,禁止计数器溢出中断
CCON=0x00;//CF=0,清0 PCA计数器溢出中断请求标志位,不允许 PCA计数,CCF1=0 中断请求标志位清
CCAPM1=0x11;//下降沿触发捕捉功能
IT0=1;
EX0=1;
IE0=0;
IE1=0;
IT1=1;
EX1=1;
EA=1;//总中断允许
SD=1;
front_4_flag=1;
mode=0;
g_fireworks_NO=0;
g_fireworks_Temp=0;
demo_NO=1;
g_MovieRestart_Flag=1;
init_g_parameter();
timer_flag=0;
InitTimer0();
while(1)
{
if(g_MovieRestart_Flag)
{
front_4_flag=1;
g_MovieRestart_Flag=0;
//SN3731_Init(); //完全初始化芯片
}
SN3731_DEM
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-01-13 12:21 IS3731_3D蜡烛灯\CANDLE_CODE\
文件 337 2011-11-15 10:26 IS3731_3D蜡烛灯\CANDLE_CODE\config.h
文件 3595 2014-04-03 16:36 IS3731_3D蜡烛灯\CANDLE_CODE\SN3731.c
文件 53726 2014-04-03 17:24 IS3731_3D蜡烛灯\CANDLE_CODE\SN3731drv.c
文件 12882 2012-05-22 10:42 IS3731_3D蜡烛灯\CANDLE_CODE\SN3731drv.h
文件 118127 2014-04-03 16:28 IS3731_3D蜡烛灯\CANDLE_CODE\SN3731res.h
文件 17735 2010-06-06 10:07 IS3731_3D蜡烛灯\CANDLE_CODE\STC12C5A60S2.H
文件 25298 2015-01-13 12:22 IS3731_3D蜡烛灯\CANDLE_CODE.zip
文件 79872 2014-10-08 17:43 IS3731_3D蜡烛灯\IS31FL3731_CANDLE_V2.3_3D(DC5V).xls
文件 126375 2014-04-22 11:40 IS3731_3D蜡烛灯\ISFL3731_CANDLE_V2.3_3D.pdf
文件 1312768 2014-04-22 11:40 IS3731_3D蜡烛灯\ISFL3731_CANDLE_V2.3_3D.SchDoc
目录 0 2015-01-13 12:21 IS3731_3D蜡烛灯\PCB_IS31FL3731_CANDLE-3D_V2.3\
文件 316928 2014-04-15 11:44 IS3731_3D蜡烛灯\PCB_IS31FL3731_CANDLE-3D_V2.3\IS31FL3731_CANDLE-3D_V2.3 LED.pcb
文件 1027072 2014-04-15 11:43 IS3731_3D蜡烛灯\PCB_IS31FL3731_CANDLE-3D_V2.3\IS31FL3731_CANDLE-3D_V2.3 MCU.PcbDoc
目录 0 2015-01-13 12:22 IS3731_3D蜡烛灯\
相关资源
- missile-rocket程序
- Mission Planner、APMPlanner2全部参数汉化版
- 6.0动态加载权限用PermissionGen
- 微信群裂变神器 wxlm_groupfission 1.6.4全
- AltovaMissionKitEnt2018rel2sp1_x64.zip
- vissim vap编程
- vissim(交真仿模拟软件)v5.3官方安装
-
Atomic-la
yer and Crystal-Orientation Resolv - Dissipation of carbendazim and chloramphenicol
- Intense and stable blue-light emission of Pb(
- A method for the prediction of gas emission ba
-
Radiated Emission Predictionof a SMPS ba
sed - idt71v416s10/ISSI IW6151216 SRAM Verilog 仿真
- missile datcom
- vissim仿真行程时间
- 十字路口的VISSIM仿真
评论
共有 条评论