Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Need help regarding AVR PWM

Status
Not open for further replies.

shoeb.eee

Member level 1
Joined
Mar 28, 2009
Messages
36
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,553
I'm new in AVR. But know some basic assembly language programming. I can program a square wave and simulate it. It is possible by using delay and output to the desired PORT. Increasing/decreasing time delay variable frequency will be obtained.

But I'm failed to program with PWM to do the same thing. I searched into the web and found some example of AVR PWM in asm code but the code also contains the delay function. If I use delay function, what is the actual task of PWM.

I need to know what thing the PWM actually do and why does time delay is used? I got the following link which contains an example of PWM.

https://www.gifford.co.uk/~coredump/ledpwm.htm

Please help me
 

shoeb.eee

Member level 1
Joined
Mar 28, 2009
Messages
36
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,553
Thanks a lot everybody.

Please suggest me some simulator software (except AVR Studio)
 

Naveed Ahmed

Member level 4
Joined
Aug 31, 2008
Messages
77
Helped
9
Reputation
18
Reaction score
9
Trophy points
1,288
Location
Singapore
Activity points
1,862
Dear it is not the efficient way for generating a PWM on the port using delay functions.

Use any AVR ATMEGA32 or any ATtiny MCU and using Timers in Fast PWM mode you can easily generate the PWM on that particular pin.

By just changing the value of one register OCR, you can vary the PWM easily.

Thanks.


Regards
Naveed Khowaja
 

shoeb.eee

Member level 1
Joined
Mar 28, 2009
Messages
36
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,553
Please suggest me some simulator software
 

nandhu015

Advanced Member level 5
Joined
Feb 11, 2006
Messages
1,965
Helped
300
Reputation
600
Reaction score
224
Trophy points
1,353
Location
India
Activity points
9,845
This is from avrfreaks

New VMLAB rel 3.15 available
Posted by amtools on Thursday, October 15, 2009

VMLAB rel 3.15 adds an important feature: a User Programming Interface that allows coding new AVR models and its peripherals, even if not currenty supported with internal models.

This software is fully freeware.

Download it from https://www.amctools.com
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top