31 lines
544 B
C
31 lines
544 B
C
|
#ifndef _MAIN_H_
|
|||
|
#define _MAIN_H_
|
|||
|
|
|||
|
unsigned long int count = 0;
|
|||
|
#define RELOAD (65535-46080)
|
|||
|
unsigned int TH, TL;
|
|||
|
const unsigned char num_var[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};
|
|||
|
unsigned int ge,ui,bd,qm,wj,num;
|
|||
|
void setConfig()
|
|||
|
{
|
|||
|
TH = RELOAD / 256;
|
|||
|
TL = RELOAD - (RELOAD / 256) * 256;
|
|||
|
|
|||
|
|
|||
|
TMOD = 0x51; //T0 16λ<36><CEBB>ʱ T1 16λ<36><CEBB><EFBFBD><EFBFBD>
|
|||
|
TH0 = 0X4C;
|
|||
|
TL0 = 0X0D;
|
|||
|
TH1 = 0X00;
|
|||
|
TL1 = 0X00;
|
|||
|
EA = 1; //<2F><><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><D0B6>ܿ<EFBFBD><DCBF><EFBFBD>
|
|||
|
ET0 = 1; //<2F><EFBFBD>ʱ<EFBFBD><CAB1>0<EFBFBD>жϿ<D0B6><CFBF><EFBFBD>
|
|||
|
|
|||
|
|
|||
|
TR0 = 1; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>0
|
|||
|
TR1 = 1; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>1
|
|||
|
|
|||
|
|
|||
|
P1 = 0X00;
|
|||
|
}
|
|||
|
|
|||
|
#endif
|