PWM in assembly code

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

PWM in assembly code

跳至解决方案
1,170 次查看
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 解答
683 次查看
kef2
Senior Contributor V

Cristina,

MOVB $01, MODRR

and

MOVB #$01, MODRR

are different like hell and heaven :-)

Edward


在原帖中查看解决方案

0 项奖励
回复
3 回复数
684 次查看
kef2
Senior Contributor V

Cristina,

MOVB $01, MODRR

and

MOVB #$01, MODRR

are different like hell and heaven :-)

Edward


0 项奖励
回复
683 次查看
CristinaMares
Contributor I

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

0 项奖励
回复
683 次查看
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 项奖励
回复