??? 06/25/08 03:07 Read: times |
#156175 - Code Architect Responding to: ???'s previous message |
Hi Erik,
Thanks for the reply. Yes I looked but Code Architect produced 6 pages of output just to initialize the PWM channels. I have since found the problem in the code. For those interested, the difference that made it work was to substitute the ORL statement for the MOV statement in the following bits of code: mov TOR2H,#00h ;16 bit timer reload value for PWM (Hi Byte) mov TOR2L,#0ffh ;16 bit timer reload value for PWM (Lo Byte) orl TCR21,#10000000b ;Latch in the TOR2H/L values mov OCRBH,#00h ;CCU channel B Compare value (Hi byte) mov OCRBL,#0fh ;CCU channel B Compare value (Lo byte) orl TCR21,#10000000b ;Update duty cycle mov OCRCH,#00h ;CCU channel C Compare value (Hi byte) mov OCRCL,#0fh ;CCU channel C Compare value (Lo byte) orl TCR21,#10000000b ;Update duty cycle |
Topic | Author | Date |
Could use some help with LPC983 PWM code | 01/01/70 00:00 | |
have you tried CodeArchitect? | 01/01/70 00:00 | |
http://www.codearchitect.org/ | 01/01/70 00:00 | |
Code Architect![]() | 01/01/70 00:00 | |
Code Architect | 01/01/70 00:00 |