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.

[SOLVED] Invert the outputs of DSPIC30f3010

Status
Not open for further replies.

Mohammad Zubair

Junior Member level 3
Joined
Jan 13, 2015
Messages
25
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
214
Hi, I am using dspic30f3010's PWM in complentary mode. I want to invert both the outputs i.e. PWM1L and PWM1H from the coding. It is the requirement of my hardware. I have gone through its datasheet but I have not found a definitive solution to invert the output.

Please do guide. Thanks in advance
 

You want it to be done in code ? That is you want ON time and OFF time to be inverted ? Can you do it in hardware using a NOT gate ? If you have to do it in code then you have to change the duty cycle like if you want 80% ON and 20% OFF to be converted into 20% ON and 80% OFF.
 

Yes I do want to do it in the code. I am using PWM modules of DSPIC30f3010. It will have to be some bit or some value in the PWM registers but I am not sure how to do it

No, NOT gate is causing problems at this high frequency switching so I will have to do it in the code

- - - Updated - - -

Yes I do want to do it in the code. I am using PWM modules of DSPIC30f3010. It will have to be some bit or some value in the PWM registers but I am not sure how to do it

No, NOT gate is causing problems at this high frequency switching so I will have to do it in the code
 

Please zip and post the complete project files. I will have a look at the code and check the datasheets and see what duty cycle the code is generating and I will tell you what values you should use for PWM registers to get the required duty cycle.

This might help you.

https://www.mikroe.com/chapters/view/54/chapter-6-output-compare-module/#ch6.4.2

PRx registers are used to set the duty cycle.
 
Last edited:

Hi,

If you just use the 100% -x% code solution:
Check if there is any adjust on deadtime necessary.

Klaus
 

Hi
Thanks a lot to everyone, I had some idea that I had to do it with some configuration bits but I was not aware of the exact macros until I found out that we could learn about the macros in its header files.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top