I have a dsPIC30F4012, a brushless motor and this ESC
After reading the web, I understood that ESC require servo pulse (1-2ms up then 18-19 ms down) so I made this code:
If my understandings are correct, it should start the motor at 0 speed (1ms pulse) for a few seconds, then go to full speed ( 2ms pulse)
I'm using a 16MHz crystal, powering my ESC at 12V, 2A plug and my pic at 5V, 1A.
The 3 wire cable from the ESC I connected like this:
brown - vss
red - 5v
yellow - RB0 port
The esc details specify that it 480Hz+ high refresh rates but I did not understood how to use this
The motor doesn't start, it sometimes starts beeping in pairs of two
Can anyone tell me where did I go wrong?
sorry if I'm a hard-headed newb in advance
After reading the web, I understood that ESC require servo pulse (1-2ms up then 18-19 ms down) so I made this code:
Rich (BB code):
int16_t main(void){
TRISB = 0x00;
PORTB = 0x00;
int i=0;
for(i=0;i<300;i++){
PORTB=0x01;
__delay32(30000); // 1 ms?
PORTB=0x02;
__delay32(600000-30000); // 19 ms?
}
while(1){
PORTB = 0x01;
__delay32(60000); // 2 ms?
PORTB = 0x00;
__delay32(600000-60000); // 18 ms?
}
}
I'm using a 16MHz crystal, powering my ESC at 12V, 2A plug and my pic at 5V, 1A.
The 3 wire cable from the ESC I connected like this:
brown - vss
red - 5v
yellow - RB0 port
The esc details specify that it 480Hz+ high refresh rates but I did not understood how to use this
The motor doesn't start, it sometimes starts beeping in pairs of two
Can anyone tell me where did I go wrong?
sorry if I'm a hard-headed newb in advance