Artificial PWM & Sine Wave

Photo of author

By Jackson Taylor

Sine wave using timer only(no pwm used)

This program will help what is timer,pwm and its applications

#include<pic.h>
#define _XTAL_FREQ 16000000
__CONFIG(0x3f7a);
void main()
{
TRISA=0;
PORTA=0;
while(1)
{
PORTA=0xff;
__delay_us(5);
PORTA=0;
__delay_us(95);
PORTA=0xff;
__delay_us(10);
PORTA=0;
__delay_us(90);
PORTA=0xff;
__delay_us(15);
PORTA=0;
__delay_us(85);
PORTA=0xff;
__delay_us(20);
PORTA=0;
__delay_us(80);
PORTA=0xff;
__delay_us(25);
PORTA=0;
__delay_us(75);
PORTA=0xff;
__delay_us(30);
PORTA=0;
__delay_us(70);
PORTA=0xff;
__delay_us(35);
PORTA=0;
__delay_us(65);
PORTA=0xff;
__delay_us(40);
PORTA=0;
__delay_us(60);
PORTA=0xff;
__delay_us(45);
PORTA=0;
__delay_us(55);
PORTA=0xff;
__delay_us(50);
PORTA=0;
__delay_us(50);
PORTA=0xff;
__delay_us(55);
PORTA=0;
__delay_us(45);
PORTA=0xff;
__delay_us(60);
PORTA=0;
__delay_us(40);
PORTA=0xff;
__delay_us(55);
PORTA=0;
__delay_us(45);
PORTA=0xff;
__delay_us(50);
PORTA=0;
__delay_us(50);
PORTA=0xff;
__delay_us(45);
PORTA=0;
__delay_us(55);
PORTA=0xff;
__delay_us(40);
PORTA=0;
__delay_us(60);
PORTA=0xff;
__delay_us(35);
PORTA=0;
__delay_us(65);
PORTA=0xff;
__delay_us(30);
PORTA=0;
__delay_us(70);
PORTA=0xff;
__delay_us(25);
PORTA=0;
__delay_us(75);
PORTA=0xff;
__delay_us(20);
PORTA=0;
__delay_us(80);
PORTA=0xff;
__delay_us(15);
PORTA=0;
__delay_us(85);
PORTA=0xff;
__delay_us(10);
PORTA=0;
__delay_us(90);
PORTA=0xff;
__delay_us(5);
PORTA=0;
__delay_us(95);
}
}

Sine wave using timer only(no pwm used)

This program will help what is timer,pwm and its applications

Sine wave using timer only(no pwm used)

This program will help what is timer,pwm and its applications

Sine wave using timer only(no pwm used)

This program will help what is timer,pwm and its applications

Hardware Hack

Stop Buying New Batteries for Your Tech

Electronics are expensive, but their power sources don't have to be. Discover the simple engineering trick to recondition dead batteries and bring your gadgets back to 100% capacity.

Watch the Free Video

Sine wave using timer only(no pwm used)

This program will help what is timer,pwm and its applications

Sine wave using timer only(no pwm used)

This program will help what is timer,pwm and its applications

Sine wave using timer only(no pwm used)

This program will help what is timer,pwm and its applications

Sine wave using timer only(no pwm used)

This program will help what is timer,pwm and its applications

Sine wave using timer only(no pwm used)

This program will help what is timer,pwm and its applications

Sine wave using timer only(no pwm used)

This program will help what is timer,pwm and its applications

Sine wave using timer only(no pwm used)

This program will help what is timer,pwm and its applications

Sine wave using timer only(no pwm used)

This program will help what is timer,pwm and its applications

Sine wave using timer only(no pwm used)

This program will help what is timer,pwm and its applications

Sine wave using timer only(no pwm used)

This program will help what is timer,pwm and its applications

Sustainable Tech

Keep Toxic E-Waste Out of Landfills

Don't throw away your failing laptop, phone, or car batteries. Learn how to recondition them at home in just a few hours. It's better for the planet—and your wallet.

Learn How It Works
See also
BRUSH LESS DC MOTOR (BLDC ) INSIDE VIEW (USED E BIKE -36V ,250W)

Revive Your Dead Electronics

Got a drawer full of dead gadgets or a failing car battery? Instead of paying a premium for replacements, use this simple trick to easily recondition them right from home.

See How It Works