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.
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)