From: mukeshp11 on
DEAR ALL,

KINDLY CLARIFY THE FOLLOWING STATEMENT FOR ME:-

1) FOR PWM GENERATION:- IF MY T1CNT i.e counter for counting up/down starts
from say x that is in betweem 0 and T1PR value. So I suppose the counter
will start from x(value between 0 and T1PR) and goes up to T1PR and then
counts down to x. and then again goes to T1PR.

Am i correct? PLS reply.

2)How to generate Amplitude shifted traingular waveform for PWM
generation.

Rgds
Mukesh
From: Tim Wescott on
mukeshp11 wrote:
> DEAR ALL,
>
> KINDLY CLARIFY THE FOLLOWING STATEMENT FOR ME:-
>
> 1) FOR PWM GENERATION:- IF MY T1CNT i.e counter for counting up/down starts
> from say x that is in betweem 0 and T1PR value. So I suppose the counter
> will start from x(value between 0 and T1PR) and goes up to T1PR and then
> counts down to x. and then again goes to T1PR.
>
> Am i correct? PLS reply.
>
> 2)How to generate Amplitude shifted traingular waveform for PWM
> generation.

Depending on the mode of your counter, the register will count up to the
period register value then reset to zero and count up again, it will
count down to 0 then load the period register value and count down
again, or it will count up, then down, then up.

By default the chip starts in count up mode.

This is what generates the triangular waveform -- it is entirely
numeric, and internal to the processor.

--
Tim Wescott
Control system and signal processing consulting
www.wescottdesign.com
From: Jerry Avins on
On 4/20/2010 12:16 AM, mukeshp11 wrote:
> DEAR ALL,
>
> KINDLY CLARIFY THE FOLLOWING STATEMENT FOR ME:-
>
> 1) FOR PWM GENERATION:- IF MY T1CNT i.e counter for counting up/down starts
> from say x that is in betweem 0 and T1PR value. So I suppose the counter
> will start from x(value between 0 and T1PR) and goes up to T1PR and then
> counts down to x. and then again goes to T1PR.
>
> Am i correct? PLS reply.
>
> 2)How to generate Amplitude shifted traingular waveform for PWM
> generation.

You know what processor you're referring to, but I can only guess. Is it
too much to ask for a better hint?

Jerry
--
"It does me no injury for my neighbor to say there are 20 gods, or no
God. It neither picks my pocket nor breaks my leg."
Thomas Jefferson to the Virginia House of Delegates in 1776.
���������������������������������������������������������������������