From 2dd5f8aa2ef7832fc59979d5f76a7da53a2946dd Mon Sep 17 00:00:00 2001 From: Jan Michel Date: Fri, 21 Aug 2015 16:48:05 +0200 Subject: [PATCH] LCD can be switched off, automatic detection of connection threshold --- pt100/main.c | 4 +++- pt100/main.h | 1 + pt100/tempmeas.c | 14 +++++++++++--- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/pt100/main.c b/pt100/main.c index 523cd23..b192ea4 100644 --- a/pt100/main.c +++ b/pt100/main.c @@ -40,6 +40,7 @@ void read_calib() { calib_settings.nominal_offset = eeprom_read(8); calib_settings.gain_current = eeprom_read(9); calib_settings.period = eeprom_read(10); + calib_settings.uselcd = eeprom_read(11); } /****************** @@ -188,7 +189,8 @@ int main(void) { next_step = 0; if (measurement_active) {do_measurement_step();} if (next_second && !measurement_active) { - lcd_update(); + if(calib_settings.uselcd) + lcd_update(); next_second = 0; } if(key_was_pressed(1< compare to 2.27 V or (2.27/2.56)*2^16 = 58112 void do_measurement_step(void) { @@ -159,6 +159,14 @@ void do_measurement_step(void) { } current_channel += 1; } + else if(measurement_step == 33) { + ADCSRA |= (1<