Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

P89C51RD2 PWM (Resolved)

Status
Not open for further replies.

CMOS

Advanced Member level 3
Advanced Member level 3
Joined
Jan 6, 2004
Messages
862
Helped
94
Reputation
186
Reaction score
50
Trophy points
1,308
Location
USA
Visit site
Activity points
5,673
p89c51rd2 pwm

Hi,
Can anyone show me how to initialize PWM in P89C51RD2. How to change duty-cycle and what will be the frequency of generated PWM wave?
 

p89c51rd2 pwm

Ok I found it in Intel's 8XC51FA/FB/FC PCA Cookbook.
Code:
INIT_PWM:
MOV CMOD, #02H ; Clock input 4 250 nsec at 16 MHz
MOV CL, #00H ; Frequency of output 4 15.6 KHz
MOV CH, #00H
MOV CCAPM0, #42H ; Module 0 in PWM mode
MOV CCAP0L, #00H
MOV CCAP0H, #128D ; 50 percent duty cycle
SETB CR ; Turn on PCA timer
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top