Date: "01 - February - 2016"

2 articles found.

How to Generate PWM in 8051 Microcontroller

8051 software PWM waveform in Proteus, 8051 software PWM, duty cycle measurement, Proteus oscilloscope

Hello friends! Today, we will generate a PWM signal with an 8051 microcontroller and inspect it in Proteus. We will begin with frequency and duty cycle, then use Timer 0 interrupts to control P2.0 without placing a long delay in the main program. The original project demonstrates software-generated PWM, which is useful for a classic device such as the AT89C51 that does not provide a dedicated PWM peripheral. Other 8051-compatible devices can include hardware PWM, so check the exact processor before deciding that software generation is necessary. We will keep the original circuit, waveforms and download, but make the timing assumptions and endpoint behavior explicit. The revised example uses a fixed timer interval and twenty duty steps, making the relationship between interrupt rate, PWM fr ...

Interrupt Based Digital Clock with 8051 Microcontroller

Interrupt-based 8051 digital clock on a character LCD, 8051 digital clock, Timer 0 timebase, LCD display

Hello friends! In this project, we will build an interrupt-based digital clock with an 8051 microcontroller and display the time on a character LCD. A hardware timer will provide the timing events, while the main program handles the display. We will start with the timer calculation, then build the seconds, minutes and hours counters. We will also correct two problems that commonly appear in beginner clocks: using the wrong timer reload and reading shared time counters while an interrupt is changing them. The original circuit images and downloadable project remain attached. The revised example assumes a classic twelve-clock 8051 running at 12 MHz. It starts at 00:00:00 after initialization and demonstrates elapsed-time counting; it does not retain the time when power is removed. Figure: Int ...