Continue to Site

Welcome to

Welcome to our site! 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.

Ac 3 Phase Motor Speed Control with PIC

Not open for further replies.


Full Member level 4
Mar 8, 2004
Reaction score
Trophy points
Activity points
motor ac speed control with pic

I want to make a 3 PHASE AC MOTOR SPEED CONTROLER (V/F VARIABLE VOLTAGE AND FREQUENCY METHOD (3 HP power) ). I Found an article in Microchip web site an00843a (application note) PWM code for 3 phase generation is in Assembly language. Any one have C or Basic code implementation to solve this problem.

If some one have knowledge or experience regarding this taskt then please share.


pic ac speed

Hi, try looking for application notes at the Microchip website. The notes normally include application explanation and PIC code.


    Points: 2
    Helpful Answer Positive Rating
3-phase motor speed control

Oh dear dani,
You are trying a really tough matter. I have worked with three phase inverters during my graduation project and the difficulty lies in power section no in the control section. Regarding the PIC micro, it has only two CCP modules and you need three. You will have to perform PWM in software. The simplest PWM is square wave PWM with high harmonic content. I suggest you refere to a book on power electronics like that by Rashid (available in the download section) or that by Mohan.

Good Luck

picli 3phase diriver

There is no a problem with pwm modules... you can use a PIC16F777 or 18F4431, the real problem is that in Argentina you just CANT find those pic :cry: , so if you can send me pair of 18F4431 .. I'll make the soft for you, and de power stage too

Gustavo Tasquer jast send me a mail: gustavo_tasquer yahoo com ar

variable frequency motor controller pic18f

Hello and Thanks for your reply..

In microchip's application note 0843a which is PIC18F452 based three phase induction motor(AC) driver application a technicque is described briefly and ASM code is also given.

But the problem that i am facing is to understand that assambly code and modify it.
So i want if some one have C code or Basic code to perform same function i.e generation of SINE waves from three 120 degree out pwm outputs to drive 3 phase inverter.


3 phase motor speed control

Here's some code I wrote (not C, but assembly) to generate 3-phase sine waves 120 degrees apart. Haven't gotten a chance to put it into hardware, but the simulation works nicely.

I noticed you're in the UK. Unfortunately, this code generates 60 Hz waves with a 4 MHz oscillator. You could use a 3.33 MHz (if they make them) to get 50 Hz.

I haven't tried variable frequency or voltage.

3 phase ac motor speed controller

Asambler code it´s not that hard, give it a chance

how to build 3phase drive3 phase motor


I am also having same problem. Have you solved the problem now? I also can share my knowledge with on AN843. I have CCS C compiler, and I found it is impossible to use for the same. Because Interrupt latency is not supported that fast.

As you know there was a software PWM is incoporated, for correct operation you have to go with ASM:cry:

I talked with CCS guys and they also recommed to go with ASM..!

Fortunately Mikroelektronika people says it is possible. will see (www.mikroelektronika.yu ??) I have their Basic and Pascal Compilers.

I would like to hear from you.

ac three phase microchip

not yet dear...
  • Like
Reactions: perumal_nt


    Points: 2
    Helpful Answer Positive Rating


    Points: 2
    Helpful Answer Positive Rating
Not open for further replies.

Part and Inventory Search

Welcome to