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.

to generate 4 pwm signals with fixed frrequency and varying duty cycle using a pic

Status
Not open for further replies.
hi horace, if i use timer2, i need to fill in PR value. then what do you think my OCxR AND OCxRS WOULD BE.
iPPSOutput(OUT_PIN_PPS_RP2, 19); // set OC2 output to pin RP2 ,CAN U EXPLAIN THIS STAEMENT ALSO.
so if i am using timer 2 ,what would be my ocxr and ocxrs value for 1khz.
 

have a look at the Microchips example project
https://ww1.microchip.com/downloads/en/DeviceDoc/CE320 Output Compare - Simple PWM.zip

which has eight PWM outputs four using the system clock and four using timer1

with PPS you have to tell the processor which pins are input and which are output for pheripherals such as UARTS, SPI, etc (some are fixed pins, e.g. USB and I2C)
Code:
iPPSOutput(OUT_PIN_PPS_RP2, 19); // set OC2 output to pin RP2 ,CAN U EXPLAIN THIS STAEMENT ALSO.
this specifies pin RP2 is PPS output function 19 OC2 (in this case the PWM output)
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top