Society of Robots - Robot Forum

Software => Software => Topic started by: orchid on April 29, 2008, 01:44:14 AM

Title: question regarding PWM controller sequent
Post by: orchid on April 29, 2008, 01:44:14 AM
I have some source code that control PWM for my dsp mck 2812 board. The problem is, the motor didnt rotate well and after rotating half (or maybe less) cycle, my ccs show error sign and needed me to disconnect the board from pc. is there any way else i can use or somebody can repair my source code i've made.

Code: [Select]
void Gpio_PortBF(void)
{

while(1)
{
DelayUs(2000);
EvaRegs.ACTRA.all = 0x00C2;
DelayUs(2000);
EvaRegs.ACTRA.all = 0x0C02;
DelayUs(2000);
EvaRegs.ACTRA.all = 0x0C20;
DelayUs(2000);
EvaRegs.ACTRA.all = 0x00C8;
DelayUs(2000);
EvaRegs.ACTRA.all = 0x0C08;
DelayUs(2000);
EvaRegs.ACTRA.all = 0x0C80;
DelayUs(2000);
EvaRegs.ACTRA.all = 0x0000;

}
}