PWM in assembly code

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,169件の閲覧回数
CristinaMares
Contributor I

Hi, I'm working with an evaluation board CSM-12C32 (HCS12C32) and I'm having some problems using PWM, here is my code:

 

Entry:

        MOVB  $01, MODRR  

        MOVB  $00, PWMPOL

        MOVB  $01, PWMCLK 

        MOVB  $01, PWMPRCLK

        MOVB  $00, PWMCAE 

        MOVB  $00, PWMSCLA

        MOVB  $80, PWMDTY0

        MOVB  $FF, PWMPER0

        MOVB  $01, PWME   

      

Spin:    BRA   Spin 

 

But I get nothing in the Bit0, Port T.... Is there anything else I should set or configure besides MODRR to enable PWM in Port T??
Please help me
Regards

ラベル(1)
タグ(3)
0 件の賞賛
返信
1 解決策
682件の閲覧回数
kef2
Senior Contributor V

Cristina,

MOVB $01, MODRR

and

MOVB #$01, MODRR

are different like hell and heaven :-)

Edward


元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
683件の閲覧回数
kef2
Senior Contributor V

Cristina,

MOVB $01, MODRR

and

MOVB #$01, MODRR

are different like hell and heaven :-)

Edward


0 件の賞賛
返信
682件の閲覧回数
CristinaMares
Contributor I

My God.. Do not code at 3am!!! Thank you

0 件の賞賛
返信
682件の閲覧回数
Wlodek_D_
Senior Contributor II

Hello,

Thank you for your post, however please consider moving it to the right community place (e.g. 16-bit Microcontrollers ) to get it visible for active members.

For details please see general advice Where to post a Discussion?

Thank you for using Freescale Community.

0 件の賞賛
返信