?? remote_control.h
字號:
#ifndef SUBSTRUCT
#include <Substruct.h>
#endif
sbit IR=P3^2;
unsigned char i;
unsigned char ch;
void Init_interrupt()
{
IR=1;
IT0=0; //touch off mode is low-level
PX0=0; //set the INT0 popedom is low
PT0=1; //set the TIMER0 popedom is high
TMOD=0x01; //select mode 1
//standred value is 0xFFD0
TH0=0xFD; //set Timer0 touch off times' 560us
TL0=0xD0;
EA=1; //open the all interrupt
ET0=1; //open the TIMER0
EX0=1; //open the INT0
}
void Remote_Control(void) interrupt 0
{
EX0=0;
TR0=1;
TR0=0;
EX0=1;
}
void TIMER(void) interrupt 1
{
TH0=0xFD;
TL0=0xD1;
i++;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -