TA的每日心情 | 开心 2014-5-26 11:29 |
---|
签到天数: 6 天 连续签到: 1 天 [LV.2]偶尔看看I
|
本帖最后由 judejie82 于 2013-8-29 13:34 编辑
unsigned char tm3_95[10]=
{
0x0f,0x00,0x0d,0x09,0x02,0x0b,0x0f,0x01,0x0f,0x0b, //95 96行的TIME3的0,1,,,,9 下同。
};
unsigned char tm3_96[10]=
{
0x0a,0x0a,0x06,0x0e,0x0e,0x0c,0x0c,0x0a,0x0e,0x0e,
};
unsigned char tm1_99[10]=
{
0x0f,0x00,0x0d,0x09,0x02,0x0b,0x0f,0x01,0x0f,0x0b,
};
unsigned char tm1_101[10]=
{
0x0a,0x0a,0x06,0x0e,0x0e,0x0c,0x0c,0x0a,0x0e,0x0e,
};
unsigned char tm4_95[3]=
{
0x00,0xa0,0xc0,
};
unsigned char tp_97[10]=
{
0x50,0x50,0x60,0x70,0x70,0x30,0x30, 0x50,0x70,0x70,
};
unsigned char tp_98[10]=
{
0xf0,0x00,0xb0,0x90,0x40,0xd0,0xf0,0x80,0xf0,0xd0,
};
void display_95_96(unsigned char tim3,unsigned char dot,unsigned char tim4,unsigned char snow ,unsigned char degrees )
// tim3 为时间3
//dot 为是否有: :
//tim4 为时间4
//snow 为是否有雪花
//是否显示摄氏温度
{
Set_Position(0,95);
Write_IIC_Data(tm3_95[tim3]|tm4_95[tim4]);
Write_IIC_Data(snow<<5|tm3_96[tim3]|dot|degrees<<6);
}
main()
{
......
while(1)
{
for(i=95;i>0;i--)
{
Write_IIC_Data(~eeb);
}
for(i=0;i<10;i++)
{
display_95_96(3,1,2,1,1); // tim3 ,dot ,tim4 ,snow,degree
display_97_98(2,i,1) ; //TIM2 ,TP2,degree
/*
*/
Delay_1ms(10000);
display_99_100_101(5,2,1,1); // tim1 ,tp3.负号,百位
Set_Position(0,102);
Write_IIC_Data(0x01);
}
}
}
|
|