PWM in assembly code

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PWM in assembly code

Jump to solution
954 Views
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

Labels (1)
Tags (3)
0 Kudos
1 Solution
467 Views
kef2
Senior Contributor IV

Cristina,

MOVB $01, MODRR

and

MOVB #$01, MODRR

are different like hell and heaven :-)

Edward


View solution in original post

0 Kudos
3 Replies
468 Views
kef2
Senior Contributor IV

Cristina,

MOVB $01, MODRR

and

MOVB #$01, MODRR

are different like hell and heaven :-)

Edward


0 Kudos
467 Views
CristinaMares
Contributor I

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

0 Kudos
467 Views
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 Kudos