单片机C语言程序执行顺序问题,求解,

high=921.6;
HighRH = (unsigned char)(high>>8);这个值是多少?
HighRL = (unsigned char) high; 这个值又是多少?
懂行的解释下,
这个程序是PWM LED灯逐渐变亮的过程,

HighRH = (unsigned char)(high>>8) 书上注解,高电平的重载值拆分为高低字节,
HighRL = (unsigned char) high;

执行顺序是,while(1)循环中,当中断返回flag1s=1时,此时不会发生跳转,将继续执行完以前的程序部分,直到循环的边界,再返回到while(1)首部开始。
while(1)
{
if(flag1s == 1)
{
flag1s = 0;
sec++;
LedBuff[0] = LedChar[sec%10];
LedBuff[1] = LedChar[sec/10%10];
LedBuff[2] = LedChar[sec/100%10]; //比如此时flag1s=1,则继续往下执行
LedBuff[3] = LedChar[sec/1000%10];
LedBuff[4] = LedChar[sec/10000%10];
LedBuff[5] = LedChar[sec/100000%10];
} //到此返回从头开始,因此这段时间显示的还是之前的数据。
温馨提示:内容为网友见解,仅供参考
第1个回答  2018-06-26
明白你的意思,执行顺序是,while(1)循环中,当中断返回flag1s=1时,此时不会发生跳转,将继续执行完以前的程序部分,直到循环的边界,再返回到while(1)首部开始。
while(1)
{
if(flag1s == 1)
{
flag1s = 0;
sec++;
LedBuff[0] = LedChar[sec%10];
LedBuff[1] = LedChar[sec/10%10];
LedBuff[2] = LedChar[sec/100%10]; //比如此时flag1s=1,则继续往下执行
LedBuff[3] = LedChar[sec/1000%10];
LedBuff[4] = LedChar[sec/10000%10];
LedBuff[5] = LedChar[sec/100000%10];
} //到此返回从头开始,因此这段时间显示的还是之前的数据。
}
第2个回答  2016-07-17
high 是什么类型的变量。。。本回答被提问者采纳
相似回答