PIC12F675 SineWave Using SPWM

Category: PIC12F675

Designer: RANA MUHAMMAD ADNAN KHALIL

Notes

In this circuit you will learn how to make sine wave signal using PIC12F675. Before understanding this circuit first see previous circuits "PIC12F675 PWM using Bit Banging" in PICF675 category. Working: 1. First of all we need PWM signal. PWM is generated using bit banging. 2. We need to change the duty cycle in the form of sine wave. 3. The sine wave duty cycle table is generated using sine wave equation in MATLAB. 4. This table is called sine table. 5. The PWM generated using sine table is called sine PWM or SPWM. 6. The frequency of PWM signal should be 10 times greater than the fundamental frequency. 7. The SPWM signal can be seen at GP5 (pin2) of PIC12F675. 8. The sine wave is made by filtering this SPWM signal using low pass RC (R1 and C1) filter as shown in animation. 9. The code of this frequency is self explanatory. Applications: 1. This circuit can be used to generate SPWM signal. 2. This circuit can also be used to generate sinewave signal. Notes: 1. This circuit is simulated Proteus 7.10. 2. The code is written in MPLAB X IDE 5.35 and compiler used is XC8. 3. More circuits and projects related to sine wave will be added soon.

Back to all circuits