Tutorial Microcontroller MCS-51 ATMEL ISP

Pelatihan Mikrokontroller

 

Microcontroller Kits

Programmer and Target 89s51

Simple Mikrokontroller 89s51 Trainer


Standart
Mikrokontroller 89s51 Trainer

Super Mikrokontroller Trainer 89s51

 

 

 

BACK

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;
           }


Comments, questions and discussion about this topic

BACK