What is the expected resolution of the sensor?
For example it gives 75mV from 1mm, can it give 82.5mV for 1.1mm ?
As I said by doing this you will loose accuracy because what is currently 5v/1023=4.88mV per ADC step will become 4.88mV*2=9.76mV
void init_Ex2(void)
{
TIMSK|=(1<<TOIE1); // enabled global and timer overflow interrupt;
TCCR1A = 0x00; // normal operation page 148 (mode0);
TCNT1=0x0000; // 16bit counter register
TCCR1B = 0x04; // start timer/ set clock
}
ISR(TIMER1_OVF_vect) {
isr for display different character when switch pressed
if(!(PINC&(1<<PINC1))&&(PINC&(1<<PINC2)))
{
PORTB=(1<<PB0);SEVEN_SEGMENT_PORT=values[10];
}
else if(!(PINC&(1<<PINC2))&&(PINC&(1<<PINC1)))
{
PORTB=(1<<PB0);SEVEN_SEGMENT_PORT=values[11];
}
}
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?