Hi guys
So I want to improve my non-linear 10bit ADC reading on avr, I am thinking this:
uint16_t ideal; uint16_t actual; uint8_t offset; while(until all done) { ideal = ref(x); x++; actual = adc_reading(); offset = ideal - actual; //to-do: store actual to eeprom //to-do: store offset to eeprom }
then look for the corresponding offset from the eeprom
if (adc_reading() == actual_in_eeprom()) adc_actual = adc_reading() + offset_in_eeprom;
does it work? or do I need a better way?
and another question is, what counts as one write/ease in eeprom? is it every time I write a byte data into eeprom counts as one write cycle?
Thanks