cancel
Showing results for 
Search instead for 
Did you mean: 

Can you tell me why not generate the PWM warefore ?

gzh_2000748
Associate II
Posted on February 12, 2004 at 00:19

Can you tell me why not generate the PWM warefore ?

2 REPLIES 2
gzh_2000748
Associate II
Posted on February 11, 2004 at 22:18

The following is the relative code.It is used in the T72324,TIMERA Init_PWM

bset PFDDR,#4

bset PFOR,#4

ldb TAOC2HR,#$34

ldb TAOC2LR,#$E2 ;the period of pulse

ldb TAOC1HR,#$3E

ldb TAOC1LR,#$D0 ;the period of singal

ldb TACR1,#%00000000 ;disable TimeA interrupt ,enable ICIE interrupt

ldb TACR2,#%10010000 ;OC1E enable ,PWM mode

bres TACSR,#2

gzh_2000748
Associate II
Posted on February 12, 2004 at 00:19

I have solved it.

Quote:

On 2004-02-12 02:48, Rayon wrote:

The following is the relative code.It is used in the T72324,TIMERA Init_PWM

bset PFDDR,#4

bset PFOR,#4

ldb TAOC2HR,#$34

ldb TAOC2LR,#$E2 ;the period of pulse

ldb TAOC1HR,#$3E

ldb TAOC1LR,#$D0 ;the period of singal

ldb TACR1,#%00000000 ;disable TimeA interrupt ,enable ICIE interrupt

ldb TACR2,#%10010000 ;OC1E enable ,PWM mode

bres TACSR,#2