Search found 4 matches
- Wed Oct 15, 2014 6:17 pm
- Forum: Software development
- Topic: Atmega328 with fet output for motor brushed
- Replies: 39
- Views: 29578
Re: atmega32u4 with fet output for motor brushed
I've finally managed to get my brushed 32u4 hexacopter to fly fairly well. For anyone else who might be interested in trying an 32u4 brushed hexacopter, here is the EXT_MOTOR_8KHz code I am using in output.cpp. #if defined (EXT_MOTOR_8KHZ) OCR1A = (motor[0] - 1000) << 1; // pin 9 OCR1B = (motor[1] -...
- Wed Oct 15, 2014 4:43 pm
- Forum: Software development
- Topic: Atmega328 with fet output for motor brushed
- Replies: 39
- Views: 29578
Re: Atmega328 with fet output for motor brushed
@mj666 I am using a prototype board featuring an "atmega32u4" so your baseflight/cleanflight suggestions are not compatible. I do have the hexacopter setup working with multiwii on EXT_MOTOR_8KHz. However, I do not think my code is quite right for the two additional motor pins as the hexac...
- Wed Oct 15, 2014 4:27 am
- Forum: Software development
- Topic: Atmega328 with fet output for motor brushed
- Replies: 39
- Views: 29578
Re: atmega32u4 with fet output for motor brushed
I see what was missing. Forgot to connect the pins to the timers (in case anyone else is interested). TCCR1A |= _BV(COM1C1); // connect pin 11 to timer 1 channel C TCCR4A |= (1<<COM4A1)|(1<<PWM4A); // connect pin 13 to timer 4 channel A pins 11 and 13 and related motors are working now.
- Tue Oct 14, 2014 2:28 am
- Forum: Software development
- Topic: Atmega328 with fet output for motor brushed
- Replies: 39
- Views: 29578
Re: atmega32u4 with fet output for motor brushed
I'm currently trying to use EXT_MOTOR_8KHz for 6 motors on the 32u4. I've had a look at the code, but can't seem to get it right. I've added the following to output.cpp #if (NUMBER_MOTOR > 4) #if defined(EXT_MOTOR_8KHZ) OCR1C = (motor[4]-1000) << 1; TC4H = (motor[5]-1000) << 1; // pin 13 ... But sti...