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.

[PIC] PWM from PIC32MX250F128D

Status
Not open for further replies.

rajib.das

Member level 3
Joined
Oct 23, 2013
Messages
54
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
415
Hi Guys

I want to generate PWM from PIC32MX250F128D. I know I Have to select one of Five OCx pins. But have no clue which pin numbers are those represents OCx pins. And How to do that.

Thanks

- - - Updated - - -

Code:
   PWM_B7 = 0;                             // set PORTB7 to 0
   PWM_B7_Direction = 0;                 // designate RB7 pins as output
   Unlock_IOLOCK();
   PPS_Mapping(_RPB7, _OUTPUT, _OC1);  
   pwm_period = PWM_Init(10000, 1, 0, 2);
   Lock_IOLOCK();
 

if you require OC1 to output on RB7 you can try PPSOutput from pps.h
Code:
PPSOutput(1,RPB7,OC1);   //Assign OC1 to pin RPB7
 
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top