Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

motor driver

Status
Not open for further replies.

jayanthyk192

New Member
hi,
i'm building a 3phase brushless motor controller using P89V51RD2.i'm new to this field.i wrote a code myself.

#include<reg51.h>
#define port P0

int main(void)

{
int n=1000,i;
while(1)
{
port=0x90;
for(i=0;i<=n;i++);
if(n>10)
n--;


port=0x24;
for(i=0;i<=n;i++);
if(n>10)
n--;


port=0x48;
for(i=0;i<=n;i++);
if(n>10)
n--;

}
}

the program works,but not completely.first the motor starts,gains speed,then stops,only to make a squealing sound.what might be the problem?please help.
info:i'm not using back emf sensing.

thank you.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top