//#include "STC89C51_wsc.h"
#include "reg52.h"
#include "config.h"
#include "main.h"
#include "io.h"
#include "SJA1000.h"
#include "INTRINS.H" // _nop_();
void Delay10ms();
u16 wsc, wsc1, wsc2 = 1, flag; //flag 1 tx 0 rx
sbit BG = P2 ^ 5; //背景开关
typedef struct time_struct
{
unsigned char time_miao;
unsigned char time_fen;
unsigned char time_shi;
} time_num;
time_num time_ture;
void time_show(void);
unsigned char time_flag;
u16 data_shift(u8 data_can);
//timer init
void initTimer(void)//5ms 11.592m
{
TMOD = 0x0;
TH0 = 0x70;
TL0 = 0x19;
}
void Int1_int( void ) interrupt 0 //外部中断1
{
//接收数据函数,在中断服务程序中调用
receive_data();
}
//函数名称://timer0/counter0 interrupt
//函数功能:5ms中断
//输入参数:
//输入参数:
//备注其它:
void timer0(void) interrupt 1 //5ms
{
TH0 = 0x70;
TL0 = 0x19;
//add your code here.
if(time_.time_100ms++ >= 20) //置100ms到标志
{
time_.time_100ms = 0;