精品国产人成在线_亚洲高清无码在线观看_国产在线视频国产永久2021_国产AV综合第一页一个的一区免费影院黑人_最近中文字幕MV高清在线视频

您好,歡迎來電子發(fā)燒友網(wǎng)! ,新用戶?[免費注冊]

您的位置:電子發(fā)燒友網(wǎng)>源碼下載>單片機編程>

C51鬧鈴程序

大小:4.61 KB 人氣: 2011-06-03 需要積分:0

51study實例-C51鬧鈴程序
MCUBLOG 發(fā)表


#i nclude
#i nclude

#define comdir P3_2
#define wirespeaker P1_3
#define wiret0 T0
#define wiret1 T1
#define adr_delay1s 0x1086
#define adr_print10ms 0x1000
#define adr_print80ms 0x101A
#define adr_screen_black 0x10BA
#define adr_screen_clear 0x10CD
#define adr_key_search 0X10EB
#define adr_sound500hz 0x109E
#define max_timer 24*3
void (* pFunc)(void); //定義指向函數(shù)的指針
void (* Print80ms)(void);
int CodeChange(int i);
/*define a struct*/
struct time_str{
unsigned char hour;
unsigned char min;
unsigned char sec;
}today;
int depart=20;
int t0int_flag=0;
unsigned char data dispbuf[8] _at_ 0x30;
unsigned char code Sound_Date[max_timer]={
0x00,0x00,0x0a, 0x00,0x00,0x1e, 0x00,0x01,0x00, 0x00,0x02,0x00,
0x0b,0x00,0x00, 0x0b,0x00,0x00, 0x0b,0x00,0x00, 0x0b,0x00,0x00,
0x0b,0x00,0x00, 0x0b,0x00,0x00, 0x0b,0x00,0x00, 0x0b,0x00,0x00,
0x0b,0x00,0x00, 0x0b,0x00,0x00, 0x0b,0x00,0x00, 0x0b,0x00,0x00,
0x0b,0x00,0x00, 0x0b,0x00,0x00, 0x0b,0x00,0x00, 0x0b,0x00,0x00,
0x0b,0x00,0x00, 0x0b,0x00,0x00, 0x0b,0x00,0x00, 0x0b,0x00,0x00,
};
/*TIMER0 INTERRUPT*/
void timer0(void) interrupt 1{
wiret1=!wiret1;
TH0=0X3C;
TL0=0XB0;
depart-=1;

?

非常好我支持^.^

(2) 100%

不好我反對

(0) 0%

      發(fā)表評論

      用戶評論
      評價:好評中評差評

      發(fā)表評論,獲取積分! 請遵守相關(guān)規(guī)定!

      ?