![]() |
|||
Microcontroller Kits Simple
Mikrokontroller 89s51 Trainer
Super
Mikrokontroller Trainer 89s51
|
Generate a Square Wave with C Programming
/* ******************************** ** ** This is a program to generate a ** square wave without using interrupt ** The frequency of the square wave depends ** upon the frequency of crystal used ** Compiler : MIDE-51 ************************************/ #include <8051.h> bit PinStatus=1; void Toggle(void)
{
PinStatus = !PinStatus;
P1_1 = PinStatus;
return;
}
void main(void)
{
while (1)
Toggle();
return;
}
|
||