欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136
標(biāo)題:
單片機(jī)電子賀卡源程序(紅外+串口屏+MP3)
[打印本頁(yè)]
作者:
絕版
時(shí)間:
2019-11-6 19:20
標(biāo)題:
單片機(jī)電子賀卡源程序(紅外+串口屏+MP3)
#include "stc12c5a60s2.H"
#include "hongwai.h"
#include "him.h"
#include "speek.h"
extern unsigned char irtime;//紅外用全局變量
extern unsigned char IRcord[4];
extern unsigned char irdata[33];
extern bit irpro_ok,irok;
extern bit fasong;
extern uchar receive[35];
extern unsigned char jm;
extern unsigned char TF_MP3_2[] = {"E:\\1-歌曲\\緣分一道橋.mp3"};//泡沫
extern unsigned char TF_MP3_3[] = {"E:\\1-歌曲\\泡沫.mp3"}; //攀登
extern unsigned char TF_MP3_1[] = {"E:\\1-歌曲\\攀登.mp3"}; //緣分
void Delay1000ms() //@11.0592MHz 延時(shí)1s
{
unsigned char i, j, k;
i = 43;
j = 6;
k = 203;
do
{
do
{
while (--k);
} while (--j);
} while (--i);
}
void main()
{
EA = 1;
EX0init();
TIM0init();
init();
while(1)//主循環(huán)
{
// if(receive[2] == 0x02) //第一首
// {
// Delay1000ms();
// UartInit();
// SYN_VOL_Control(0x01);
// Delay1000ms();
// SYN_MP3(TF_MP3_3);
// Delay1000ms();
// Delay1000ms();
// Delay1000ms();
// Delay1000ms();
// receive[2] = 0x00;
// }
// if(receive[2] == 0x06) // 第二首
// {
// Delay1000ms();
// UartInit();
// SYN_VOL_Control(0x01);
// Delay1000ms();
// SYN_MP3(TF_MP3_2);
// Delay1000ms();
// Delay1000ms();
// Delay1000ms();
// Delay1000ms();
// receive[2] = 0x00;
// }
// if(receive[2] == 0x04) // 第三首
// {
// Delay1000ms();
// UartInit();
// SYN_VOL_Control(0x01);
// Delay1000ms();
// SYN_MP3(TF_MP3_1);
// Delay1000ms();
// Delay1000ms();
// Delay1000ms();
// Delay1000ms();
// receive[2] = 0x00;
// }
// if(receive[2] == 0x03) //暫停
// {
// Delay1000ms();
// UartInit();
// SYN_VOL_Control(0x01);
// Delay1000ms();
// SYN_TTS("已暫停");
// Delay1000ms();
// Delay1000ms();
// Delay1000ms();
// Delay1000ms();
// receive[2] = 0x00;
// }
if(irok) //如果接收好了進(jìn)行紅外處理
{
Ircordpro();
irok=0;
}
if(irpro_ok) //如果處理好后進(jìn)行工作處理,如按對(duì)應(yīng)的按鍵后顯示對(duì)應(yīng)的數(shù)字等
{
Ir_work();
}
if((jm == 0x0C) || (receive[2] == 0x02)) //1
{
send_string("page 1"); //第一首
UART_Send_END();
Delay1000ms();
UartInit();
SYN_VOL_Control(0x01);
Delay1000ms();
SYN_MP3(TF_MP3_3);
Delay1000ms();
Delay1000ms();
Delay1000ms();
Delay1000ms();
receive[2] = 0x00;
jm = 0;
}
if((jm == 0x18) || (receive[2] == 0x06) ) //2
{
send_string("page 4"); //第2
UART_Send_END();
Delay1000ms();
UartInit();
SYN_VOL_Control(0x01);
Delay1000ms();
SYN_MP3(TF_MP3_2);
Delay1000ms();
Delay1000ms();
Delay1000ms();
Delay1000ms();
receive[2] = 0x00;
jm = 0;
}
if((jm == 0x5E) || (receive[2] == 0x04)) //3
{
send_string("page 2"); //第三首
UART_Send_END();
Delay1000ms();
UartInit();
SYN_VOL_Control(0x01);
Delay1000ms();
SYN_MP3(TF_MP3_1);
Delay1000ms();
Delay1000ms();
Delay1000ms();
Delay1000ms();
receive[2] = 0x00;
jm = 0;
}
if(jm == 0x09) //EQ
{
send_string("page 0"); //返回主頁(yè)面
UART_Send_END();
jm = 0;
}
if(jm == 0x44) //<< 錄音
{
send_string("page 5");
// Delay1000ms();
// UartInit();
// SYN_VOL_Control(0x01);
// Delay1000ms();
// SYN_MP3(TF_MP3_2);
// Delay1000ms();
// Delay1000ms();
// Delay1000ms();
// Delay1000ms();
UART_Send_END();
jm = 0;
}
if((jm == 0x43) || (receive[2] == 0x03)) //停
{
send_string("page 3"); //
UART_Send_END();
Delay1000ms();
UartInit();
SYN_VOL_Control(0x01);
Delay1000ms();
SYN_TTS("已暫停");
Delay1000ms();
Delay1000ms();
Delay1000ms();
Delay1000ms();
receive[2] = 0x00;
jm = 0;
}
if(jm == 0x40) // >> 播音
{
send_string("page 6"); //
UART_Send_END();
jm = 0;
}
}
}
復(fù)制代碼
電子賀卡.zip
2019-11-6 19:20 上傳
點(diǎn)擊文件名下載附件
下載積分: 黑幣 -5
53.29 KB, 下載次數(shù): 17, 下載積分: 黑幣 -5
歡迎光臨 (http://www.raoushi.com/bbs/)
Powered by Discuz! X3.1