Hopefully my final ATtiny1616 question.
I've a circuit where there's no space for an op-amp and a requirement to do a very rough current usage approximation. As there's no space for a shunt either I'm utilising a low-side NMOS with a 55 mOhm Rds. I've worked out the following levels for the 'bands' and the DAC values when the ref is 0.55v.
// 0.055 ohm * 0.2A = 0.011v, /0.55*255 = 5
// 0.055 ohm * 0.6A = 0.033v, /0.55*255 = 15
// 0.055 ohm * 1A = 0.055v, /0.55*255 = 26
A timer will cycle through changing DAC values or ADC values to determine the current band. If I can get within 0.1A accuracy that would be fine.
My question is whether to implement using the CMP (it's so close to ground no hysteresis can be used) or the adc (which is potentially noisier)?
I'm inclined to go with the CMP but could be talked into either way!?!