cancel
Showing results for 
Search instead for 
Did you mean: 

PWM by software

murassus
Associate II
Posted on April 01, 2004 at 22:26

PWM by software

4 REPLIES 4
murassus
Associate II
Posted on April 01, 2004 at 05:36

First of all, I'm sorry for my poor english.

I seek your understanding for that.

=======================================

I'm using Cosmic C , Indart-stx and ST72F5

I want to make 6 idependent PWM signals for 60seconds by a software.

(ex. Port E2 On : 50msec & Off : 0msec

Port E3 On : 50msec & Off : 10msec

Port E4 On : 50msec & Off : 20msec

Port E5 On : 50msec & Off : 40msec

Port E6 On : 50msec & Off : 60msec

Port E7 On : 50msec & Off : 80msec

Can it be made by programing function?

If it can be fullfilled, Would anybody teach me that?

Would do so, I will be oblieged to you.

Help~

[ This message was edited by: musu on 01-04-2004 09:09 ]

marco32
Associate II
Posted on April 01, 2004 at 06:12

Hello Musu,

You can make a software PWM output

Make a (by example) 5mS timer on interrupt

For each PWM output a 'Output on' counter

Every timer interrupt you check the 'Output on' counter and decrease it.

Counter zero? PWM output to '0'

After 60mS all PWM output to '1' and relaos the 'Output On' counter

I hope it will be clear?

Also my english is not very good

Succes,

Moppie

jatin
Associate II
Posted on April 01, 2004 at 08:25

Yes, you can manage it by using the timer interrupt e.g 10 msec as in your case the minimum time period is 10 msec(OFF time). You can maintain a count for each PWM and modify each PWM o/p at the desired count.

murassus
Associate II
Posted on April 01, 2004 at 22:26

Sir. moppie.

These days I'm watching the movie ''Band of brothers.''

In it, at sixth chapter, I saw your netherland's country town.

It was looks like a Lego block town.

Untill now, Is the landscape of town same with the present?

(Is that town scene same with present's one?)

If it is so, then you are very lucky man.

It is so blessed I think, that you are living in such a beautiful town.

In korea, most of residing type is a Apartment.

It's very dry as dust.(boring & uninteresting)

==========================================

And I thank you both for the very cool answer.

Have a nice day.

===============================================

[ This message was edited by: Jatin on 02-04-2004 08:56 ]