#include <control.H>
ulong systick;
uchar POS;
uchar data_dly;
uchar key_dly;
uint temperture;
uint AD_read;
uchar mode_flage;
uchar old_num=1;
uchar new_num=1;
uchar Timer_num = 17;
uchar Led_num = 4;
uchar temp_num = 25;
uchar Rtc_time;
uchar key_num;
uchar key4_flage;
uchar key5_flage1;
uchar key5_flage2;
uchar key8_flage;
uchar key9_flage;
uint count1=0;
uint count2=0;
bit Buzzer;
bit Relay;
bit read_flage;
bit bright_flage;
//*******************************************
void devies_init() //外设初始化
{
if(data_dly < 50) return;
else data_dly = 1;
temperture = ds18b20_read_temp(1);
AD_read = PCF8591_Read(0x01)*100/51.0;
}
//*******************************************
void smg_working(uchar channel) //显示任务
{
switch(channel)
{
case 0:
SMG[0] = Timer_Read[2]/16;
SMG[1] = Timer_Read[2]%16;
SMG[2] = 10;
SMG[3] = Timer_Read[1]/16;
SMG[4] = Timer_Read[1]%16;
SMG[5] = 10;
第十一届蓝桥杯大赛电子赛国赛代码
于 2024-05-14 08:07:37 首次发布