Skip to main content
gzh_2000748
Associate
February 11, 2004
Question

Can you tell me why not generate the PWM warefore ?

  • February 11, 2004
  • 2 replies
  • 762 views
Posted on February 12, 2004 at 00:19

Can you tell me why not generate the PWM warefore ?

This topic has been closed for replies.

2 replies

gzh_2000748
Associate
February 11, 2004
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
February 11, 2004
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