Lighting an LED with the 51 Microcontroller

This example uses the 51 microcontroller to light up an LED connected to pin P0.0. The code is as follows:

#include<reg52.h>
sbit LED = P0^0;
void main() {
  LED = 0;
  while(1)
  {
  }

Leave a Comment