You are on page 1of 4

PWM USING 8051 MICROCONTROLLER

By: Harsha Subramaniam Akik Biswas VIT University(SELECT)

Apparatus Required:
Keil Microvision Software Flashmagic

Program:

Algorithm:
Initialize the TMOD command (Timer 1 ,Mode 2) Move the higher bit and lower bit into TH1 and TL1 respectively Set the timer Jump if bit not set using overflow flag TF1 Clear port P2.0 Clear the Timer1 Clear the overflow flag TF1 Make a short jump to l1: to form a continuous wave

Procedure: First build and compile using Microvision Start the debug command Go to logic analyzer window and select port 2.0 Get the graph Next we have to convert the asm file to hex file For that we need to select Options For Target and we have to change the XTAL frequency to 11.0592 Hz and select on chip ROM and next select Output icon and select create Hex File Then we have to go to Flashmagic select the Hex file and start the Flashmagic for interfacing the microcontroller kit

Result:

Applications: We were able to generate 5V which can be used to trigger the GATE of Mosfet used in Half Wave Rectifier and Inverter.

You might also like