35
35
#define VOLTAGE_PIN PB2 // pin 7, voltage ADC
36
36
#define VOLTAGE_CHANNEL 0x01 // MUX 01 corresponds with PB2
38
40
// 1.1V reference, left-adjust, ADC1/PB2
39
41
//#define ADMUX_VOLTAGE_DIVIDER ((1 << V_REF) | (1 << ADLAR) | VOLTAGE_CHANNEL)
40
42
// 1.1V reference, no left-adjust, ADC1/PB2
41
43
#define ADMUX_VOLTAGE_DIVIDER ((1 << V_REF) | VOLTAGE_CHANNEL)
45
47
// Raw ADC readings at 4.4V and 2.2V (in-between, we assume values form a straight line)
55
55
#define FAST 0xA3 // fast PWM both channels
56
56
#define PHASE 0xA1 // phase-correct PWM both channels