### Pulse Width Modulation Tutorial

Pulse Width Modulation tutorial

Introduction to PWM
The theory behind pulse width modulation
and its working.

8051 PWM Example
Implementation of PWM on normal 8051
using timers, along with sample code.

AVR PWM Example
Using timers of AT90S8515 in 8-bit PWM
mode with non-inverting o/p, with sample code.

Posted on Mon Feb 18 2008, 08:55 PM

### An 8051 Based Temperature Controlled Fan project

PWM is Pulse width modulation.. it helps you to control the output voltage by varying the width of a square wave pulse..

A Brief Description:

```|¯¯|__|¯¯|__|¯¯|__ --->
A square wave

|¯¯¯¯¯¯|______
<-Ton->
<-Tof->
.
<---Ttotal--->
```

Ttotal = ton+toff

Duty cycle d = Ton/Ttotal

if Vin is the input voltage and Vo is the o/p voltage.. then

Vo = d x Vin
where d is the duty cycle..
now if we ... Read Compelte post
Other Tags:
Posted by ajay_bhargav on Mon Aug 20 2007, 12:45 PM

### RS232 Simulation?

actually speed of DC motor changes when you change the voltage of motor... and in digital world this is done with the help of Pulse width modulation.
So i think you should see this for learning about PWM.
I have no idea whether x86 processors have timers or not.. if not then it will be difficult to generate PWM, or you have to make use of some external thing to generate PWM.
Other Tags:
Posted by ajay_bhargav on Thu Jan 17 2008, 06:30 AM

### An 8051 Based Temperature Controlled Fan project

I think there is some problem with the attachment of file.. i need to check that..
By the time.. please try to paste the code..

here is a sample PWM code.. check it..
Other Tags:
Posted by ajay_bhargav on Thu Aug 30 2007, 01:05 PM

### Untitled

Forum ->
Other Tags:
Posted by on Thu Jan 01 1970, 12:00 AM

### Untitled

Forum ->
Other Tags:
Posted by on Thu Jan 01 1970, 12:00 AM

#### Conversation

Mon Oct 21 2019, 08:46 AM
charmdatemru
cooking
Sun Oct 13 2019, 02:02 AM
Aline Hutchinson
Hey there,
Sat Oct 12 2019, 10:23 PM
Sat Oct 12 2019, 10:18 AM
i am doing a countdown timer with 8051 for my project, unfortunately our professor had to take a leave of absence before he could teach us most of it.. can someone explain the .asm code of it for me?
Mon Sep 23 2019, 07:37 AM
Nathaniel
I am doing a project for my schools wireless security system with cameras,sensors and spot lights using 8051 micro controller, could you help me out with the design and its source code.
Wed Sep 18 2019, 08:48 PM
Caryn Kover
Mon Aug 05 2019, 07:09 PM
@Ismail ..post in forum, give details
Mon Aug 05 2019, 04:33 PM
Ismail balghmi
Wed Jul 24 2019, 12:47 AM
@BUSTER123 Please post in the forum
Tue Jul 23 2019, 06:13 PM
BUSTER123
hello! newbie here. i am kind of a guy who hates using ready - made existing libraries, so this helped a lot as i was trying to control and write to a character lcd display. however, i can't figure out how to set the cursor position. for example, i want to set it to the 5th column in the first row, so position 5. so according to the table, i am sending 10000101 on the 8 data lines of the lcd (register select pulled low). the cursor does not move there however. and i cant move the cursor left or right too. is it something wrong that i am doing? thank you.

### Recent

ilylily07
Tue Oct 15 2019, 04:32 PM
hientran123
Tue Oct 15 2019, 02:27 AM
Sat Oct 05 2019, 02:38 PM
zexalo
Thu Oct 03 2019, 09:53 AM
thanhle12345
Thu Oct 03 2019, 07:37 AM
ramon_vsc
Fri Sep 20 2019, 04:53 PM
youssoufba
Thu Sep 19 2019, 11:57 AM
Taiphan000
Tue Sep 17 2019, 04:21 AM

#### Online

Guests: 48, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 38097
Forum Activity
##### Posted By wimac
Mon Oct 21 2019, 09:18 AM
I’ve been following this thread and looking at the...
##### Posted By [email protected]
Sun Oct 20 2019, 03:09 PM
Thanks for support,
##### Posted By [email protected]
Sun Oct 20 2019, 03:02 PM
sir, when i on display ,sometime 3rd display is no...
##### Posted By [email protected]
Sun Oct 20 2019, 02:53 PM
sir, when i on display ,sometime 3rd display is no...
##### Posted By ExperimenterUK
Sun Oct 20 2019, 12:21 AM
Your code seems okay on my simulationTry my code o...
##### Posted By ExperimenterUK
Sun Oct 20 2019, 12:21 AM
Your code seems okay on my simulationTry my code o...
##### Posted By [email protected]
Sat Oct 19 2019, 07:13 PM
please find video attachment. 3rd & 4th displa...
##### Posted By [email protected]
Sat Oct 19 2019, 07:05 PM
sir, 3rd and 4th dot matrix display flickering, ...
##### Posted By ExperimenterUK
Fri Oct 18 2019, 09:18 PM
Hopefully you understand some of the program.Which...
##### Posted By [email protected]
Thu Oct 17 2019, 09:38 PM