// PWM frequency:
// 0 - 48 kHz
// 1 - 12 kHz
// 2 - 3 kHz
enum { MOTOR_FREQUENCY = 1 };
// Configure Timer 2 w. 250x period.
T2CON = 1 << 2 | MOTOR_FREQUENCY /* << 0 */;
Have i understood this right?
11111111 Arithmetic left-shift-by-two of 0 or 1 or 2
Means:
T2CON = 1 << 2 | 0 = 1111 1100
T2CON = 1 << 2 | 1 = 1111 1000
T2CON = 1 << 2 | 2 = 1111 0000
Kind Regards, Sonite