Re: Motor Shield on the Arduino MEGA 2560

by adafruit_support_bill on Thu Dec 06, 2012 8:10 am

I tested this on a Mega and it does work using the PWM frequencies for motors 3 & 4. You must use the "MOTOR34_xxKHz" constants for motors 3 & 4, not the "MOTOR12_xxKHZ" constants.
Code: Select all | TOGGLE FULL SIZE
    #define MOTOR34_64KHZ _BV(CS00) // no prescale
    #define MOTOR34_8KHZ _BV(CS01) // divide by 8
    #define MOTOR34_1KHZ _BV(CS01) | _BV(CS00) // divide by 64
User avatar
adafruit_support_bill
 
Posts: 28061
Joined: Sat Feb 07, 2009 9:11 am