Home > other >  Help: how to write four switch with interrupt mode control water lamp applications
Help: how to write four switch with interrupt mode control water lamp applications

Time:11-03

Help: how to write four switch with interrupt mode control water lamp applications

CodePudding user response:

Please specify is what kind of single chip microcomputer

CodePudding user response:

reference 1/f, the wise know already should good karma response:
please specify is what kind of single chip microcomputer

On STC microcontroller at89c51

CodePudding user response:

Say too general, can only give you see the interrupt button
Button https://blog.csdn.net/xianfajushi/article/details/82281411
Interrupt:
 
Void Int0Init ()
{
IT0=1;//set INT0 jump start along the way (low flat falling edge 1, 0)
EX0=1;//open INT0 interruption allows,
EA=1;//open the total interruption
}
Void main ()
{

Int0Init ();/* set external interrupt 0 */

While (1);
}

Void ZhongDuan () interrupt 1
{
+ + Ls;
TH0 +=0 x4c;
TL0 +=0 x00;
}
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Author: wise men know already should good karma
Source: CSDN
Original: https://blog.csdn.net/xianfajushi/article/details/80307175
Copyright statement: this article original articles for bloggers, reproduced please attach link to blog!
  • Related