Counters in 8051.

Counters in 8051:

      We can use a counter by keeping C/T bit high, i.e., logic ‘1’ in the TMOD register. For better understanding, we have given one program which uses timer 1 as a counter. Here the LEDs are connected to 8051 Port 2, and the switch to the timer1 pin P3.5; and therefore, if the switch is pressed, the value will be counted. Otherwise, an externally connected sensor to this counter pin as input does this counting operation.
Digital Counter with 8051:
     The Digital counter with 8051 is achieved by programming the microcontroller as discussed above and by attaching a sensor system to it. This object counter uses IR sensor that detects the obstacle near to it and also enables the pin of the microcontroller 06. When an object passes through the sensors, then the microcontroller gets an interrupt signal from the IR sensors and increment the count which is displayed in the7-segment display.
Digital Counter with 8051

Time delay circuit Using 8051 microcontroller:

The below figure shows how the timer operation can be implemented for switching the LEDs in an effective way. The time delay operation for the set of LEDs is programmed in a microcontroller in the manner discussed above. Here, a set of LEDs are connected to the port 2 with a common supply system. When this circuit is turned on based on the time delay program in the microcontroller appropriately, these LEDs are switched on.
Time delay circuit
Time delay circuit
This is all about the 8051 microcontroller timer and counters with basic programming and application circuits. We hope that the information of this article might have given you sufficient data to understand the concept better. Furthermore, any technical doubts on programming 8051 and its circuits, you can contact us by commenting below.
   I hope you understand pragmatic and clearly on this counters. Keep looking into this and you will get good things. It will useful to sustain your knowledge.

Comments

Popular posts from this blog

General puprose registers in 8051.

TCON Special Function register.

TMOD Special Function Register.