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] How to Generate 2 alternate Software Pwm In Pic Micro-controller which have no CCP

Status
Not open for further replies.

online79

Member level 1
Member level 1
Joined
Jun 12, 2013
Messages
37
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,510
Please help me to generate 2 alternate pwm with variable duty (by preset) for a square wave inverter by those pic microcontroller, which have no hardware pwm. please guide me.
 

square wave inverter

This implies ordinary switching off and on, 50 times a second. Perhaps you'll want to vary the On time. Possibly include dead time between mosfet switching.

PWM can imply a carrier, several kHz. Does your design have this? This is sometimes a means to allow use of a smaller, lighter transformer. I'm not familiar with all topologies, however.
 

online79;inverter Please help me to generate 2 alternate pwm with variable duty (by preset) for a square wave inverter by those pic microcontroller said:
For square wave inverter you need not require 2 alternate pwm. Only one pwm, be it hardware or software, will switch alternate channels of a square wave inverter.
 

What is the Inverter topology to be used?

Since you need to change the state of the switches every 10 ms, you can initialize a timer interrupt ticking at 50 Hz.And in the timer interrupt ISR, you can set/reset the required port pins as per your Inverter topology.
 

Let's say that s/w pwm is a bad idea :smile:
For 8 bit 50 Hz PWM you have to use timer for frequency 50*256 = 12800 Hz. For 16Mhz crystal it will have to implement interrupt every 1250 ticks. It is possible, yes, but don't expect much. Free resources will be much less and no any other interrups can be used.
 

I upload the diagram. I want the output frequency is fixed at 50Hz with variable duty which vary by RV1 Pic16F676 50Hz.JPG
 
Last edited:

Now i update the proper Schematic......Pic16F676 Squarewave Control.JPG
 

Well done! :grin:
Huge part of work done. Now lets code. Do you have anything to show?
 

Easyrider83 aptly asked if you have anything to show. It is known that you want to write the code. Now write it. If you find any problem, experts will surely help you.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top