newday

's profile
image

Biography has not been added


newday

's contributions
  • 05.31.2017
  • Double µC’s PWM frequency & resolution
  • Good post! Gould I ask a question about PWM here? my code is this: int main(void) { SYSTEMConfig(SYSTEM_FREQ_HZ, SYS_CFG_WAIT_STATES | SYS_CFG_PCACHE); INTConfigureSystem(INT_SYSTEM_CONFIG_MULT_VECTOR); OpenOC1( OC_ON | OC_TIMER2_SRC | OC_PWM_FAULT_PIN_DISABLE, 0, 0); OpenTimer2( T2_ON | T2_PS_1_1 | T2_SOURCE_INT, 0xFFFF); SetDCOC1PWM(0x4000); // 50% duty cycle while(1) { } } This simple PWM output to work at all on a PIC32MX775F512H. ( [url=http://www.kynix.com/uploadfiles/pdf8798/PIC32MX775F512H-80I2fMR_9143.pdfurl] PIC32MX775F512H-80I/MR Datasheet[/url] )Looking online, this seems to be all I need to get something working as above code. However, the OC1 pin (pin 46 on the 64 QFN package) doesn't seem to be doing anything. Can you help me? Thanks a lot.