Skip to main content
barak
Associate III
August 7, 2007
Question

MC PWM a few pulses at a timer

  • August 7, 2007
  • 2 replies
  • 689 views
Posted on August 07, 2007 at 13:38

MC PWM a few pulses at a timer

This topic has been closed for replies.

2 replies

barak
barakAuthor
Associate III
May 17, 2011
Posted on May 17, 2011 at 09:45

Hi,

I use the MC to preform pulsess between 1-20 at a time and then stop

untill the next pulses request.

the first pulses i generate is acurate.

I start the PWM in software mode then load a 0 value to one of the pulses preloaders and move back to hardware mode, when the repetition counter reaches 0 the MC will load 0 value to the counter and the output will then be 0.

but when i try to do that again it seems that the repetition preloader

was not updated and i recive less pulsess then i expected.

has any body used MC for a specific amout of pulsess at a time?

B.R

barak
barakAuthor
Associate III
May 17, 2011
Posted on May 17, 2011 at 09:45

Hi,

I implemented the pulses as folow:

1.set classical mode.

2.set the pulse and cycle.

3.set software mode.

4.enable the PWM counter.

5.fource data from preloader to comerators by setind SDT.

6.load 0 to the pulse preloader.

7.load 0 to the repetition register.

8.move back to hardware mode.

when the MC repetition counter reachers 0 and the PWM counter reaches 0

as well the MC will load the preloader values and the output will be 0.