Index: firmware/FSC/src/FSC.c
===================================================================
--- firmware/FSC/src/FSC.c	(revision 10706)
+++ firmware/FSC/src/FSC.c	(revision 10753)
@@ -8,5 +8,5 @@
 #include "macros.h"
 #include "interpol.h"
-#include "w5100_spi_interface.h"
+//#include "w5100_spi_interface.h"
 #include <avr/interrupt.h>
 #include <avr/wdt.h>
@@ -28,5 +28,5 @@
 void print_ad7719_nicely();
 void print_adc_nicely();
-
+void print_temp_nicely();
 // end of function definition:
 //-----------------------------------------------------------------------------
@@ -54,5 +54,5 @@
 	#define TEMP_CHANNELS 64
 	#define CHANNEL_BITMAP 8
-	#define AD7719_READINGS_UNTIL_SETTLED 5 // bei3:480ms
+	#define AD7719_READINGS_UNTIL_SETTLED 3 // bei3:480ms
 	U32 ad7719_values[TEMP_CHANNELS];
 	U08 ad7719_enables[CHANNEL_BITMAP];
@@ -106,9 +106,17 @@
   PORTB &= ~(1<<PB2);
   
+ad7719_enables[0]=0x00;
+ad7719_enables[1]=0x00;
+ad7719_enables[2]=0x00;
+ad7719_enables[3]=0x00;
+ad7719_enables[4]=0x00;
+ad7719_enables[5]=0x00;
+ad7719_enables[6]=0x00;
+ad7719_enables[7]=0x00;  
 for ( U08 i=0; i<CHANNEL_BITMAP; ++i ) {
-	ad7719_enables[i]=0x00;
 	ad7719_channels_ready[i]=0;
-	}
-	ad7719_enables[0]=0x01;
+}
+ad7719_current_channel = increase_ad7719 (ad7719_current_channel);
+
 for ( U08 i=0; i<V_BITMAP + I_BITMAP; ++i ) {
 	adc_enables[i]=0xFF;
@@ -343,5 +351,5 @@
 		// just wait until ADC is redy -- really bad code here!
 		}	    			
-   									//Start a new A/D Conversion
+   		//Start a new A/D Conversion
     	//temp = 	readandsendtemp();
 		//adcword = getadc();
@@ -905,4 +913,7 @@
 			break;
 
+		case 'T':
+			print_temp_nicely();
+			break;
 
 
@@ -999,29 +1010,29 @@
 	float value;
 
-	usart_write_str((pU08)"\n printing measured resistance in kohms:\n");
-
-for (U08 i=0; i< TEMP_CHANNELS;++i) {
-	if (i%8 == 0) usart_write_char('\n');
-
-	// print channel name:
-	usart_write_str((pU08)"R:"); //R for resistance
-	usart_write_char('A'+i/8); // Letters A,B,C,D,E,F,G,H
-	//usart_write_char(' '); 
-	usart_write_U08(i%8+1,1); // Numbers 1...8
-	usart_write_char(':'); 
-
-	// check if this channel is enabled in the bitmap
-	if (ad7719_enables[i/8] & (1<<i%8))
-	{
-		value = (6.25 * 1.024 * ad7719_values[i]) / ((U32)1 << 25);
-		usart_write_float(value, 3,6);
-		//usart_write_U32(ad7719_values[i],8);
-		//usart_write_U32_hex(data); //data
-		usart_write_str((pU08)"  ");	
-	} else {
-		usart_write_str((pU08)"        ");	
-	}
-	//usart_write_char('\n');
-}
+		usart_write_str((pU08)"\n printing measured resistance in kohms:\n");
+
+	for (U08 i=0; i< TEMP_CHANNELS;++i) {
+		if (i%8 == 0) usart_write_char('\n');
+
+		// print channel name:
+		usart_write_str((pU08)"R:"); //R for resistance
+		usart_write_char('A'+i/8); // Letters A,B,C,D,E,F,G,H
+		//usart_write_char(' '); 
+		usart_write_U08(i%8+1,1); // Numbers 1...8
+		usart_write_char(':'); 
+
+		// check if this channel is enabled in the bitmap
+		if (ad7719_enables[i/8] & (1<<i%8))
+		{
+			value = (6.25 * 1.024 * ad7719_values[i]) / ((U32)1 << 25);
+			usart_write_float(value, 3,6);
+			//usart_write_U32(ad7719_values[i],8);
+			//usart_write_U32_hex(data); //data
+			usart_write_str((pU08)"  ");	
+		} else {
+			usart_write_str((pU08)"        ");	
+		}
+		//usart_write_char('\n');
+	}
 }
 
@@ -1046,2 +1057,34 @@
 	usart_write_char('\n');
 }
+
+
+void print_temp_nicely() 
+{
+	float temp;
+
+		usart_write_str((pU08)"\n printing measured temperature in °C:\n");
+
+	for (U08 i=0; i< TEMP_CHANNELS;++i) {
+		if (i%8 == 0) usart_write_char('\n');
+
+		// print channel name:
+		usart_write_str((pU08)"T:"); //R for resistance
+		usart_write_char('A'+i/8); // Letters A,B,C,D,E,F,G,H
+		//usart_write_char(' '); 
+		usart_write_U08(i%8+1,1); // Numbers 1...8
+		usart_write_char(':'); 
+
+		// check if this channel is enabled in the bitmap
+		if (ad7719_enables[i/8] & (1<<i%8))
+		{
+			temp = calc_temp(ad7719_values[i]);
+			usart_write_float(temp, 3,6);
+			//usart_write_U32(ad7719_values[i],8);
+			//usart_write_U32_hex(data); //data
+			usart_write_str((pU08)"  ");	
+		} else {
+			usart_write_str((pU08)"        ");	
+		}
+		//usart_write_char('\n');
+	}
+}
Index: firmware/FSC/src/interpol.c
===================================================================
--- firmware/FSC/src/interpol.c	(revision 10706)
+++ firmware/FSC/src/interpol.c	(revision 10753)
@@ -7,4 +7,5 @@
 //#include "application.h"
 #include "num_conversion.h"
+#include "math.h"
 //-----------------------------------------------------------------------------
 /*
@@ -302,2 +303,216 @@
 return read_adc();
 }
+
+
+ float calc_temp(U32 adcword)
+ {
+  U8  temprange = 17;
+  
+  float temp=NAN;
+  const U32 min = 0x404054;
+  const U32 max = 0x8CAF50;
+  const U32 s	= 0x4C6F0;		//(max-min)/16 = s(lice)
+
+ if  (adcword >= (min + 8*s))
+   {
+     if  (adcword >= (min + 12*s))
+	   {
+	     if  (adcword >= (min + 14*s))
+		   {
+			 if   (adcword >= (min + 15*s)) 
+			   { 
+			     if (adcword < max)
+				   {
+		            temprange = 16;
+				   }
+			   }
+			 else
+			   {
+				 temprange = 15;
+			   }
+		   }
+		 else
+		   {
+		      if  (adcword >= (min + 13*s))
+			    {
+				  temprange = 14;
+				}
+			  else
+			    {
+				  temprange = 13;
+				}
+		   }   
+	   }
+	 else
+	   {
+	     if  (adcword >= (min + 10*s))
+		   {
+			 if  (adcword >= (min + 11*s))
+			   {
+				 temprange = 12;
+			   }
+			 else
+			   {
+				 temprange = 11;
+			   }
+		   }
+		 else
+		   {
+		      if  (adcword >= (min + 9*s))
+			    {
+				  temprange = 10;
+				}
+			  else
+			    {
+				  temprange = 9;
+				}
+		   }   
+	   }
+   } 
+ else
+ {
+     if  (adcword >= (min + 4*s))
+	   {
+	     if  (adcword >= (min + 6*s))
+		   {
+			 if  (adcword >= (min + 7*s))
+			   {
+				 temprange = 8;
+			   }
+			 else
+			   {
+				 temprange = 7;
+			   }
+		   }
+		 else
+		   {
+		      if  (adcword >= (min + 5*s))
+			    {
+				  temprange = 6;
+				}
+			  else
+			    {
+				  temprange = 5;
+				}
+		   }   
+	   }
+	 else
+	   {
+	     if  (adcword >= (min + 2*s))
+		   {
+			 if  (adcword >= (min + 3*s))
+			   {
+				 temprange = 4;
+			   }
+			 else
+			   {
+				 temprange = 3;
+			   }
+		   }
+		 else
+		   {
+		      if  (adcword >= (min + s))
+			    {
+				  temprange = 2;
+				}
+			  else
+			    { 
+				  if  (adcword > min)
+				    {
+				      temprange = 1;
+ 					}
+				}
+		   }   
+	   }
+   } 
+
+
+ switch (temprange)
+  {
+    case 1:{ // Temp. Range [-50°C , -34.375°C[
+      temp = ((float)adcword / 20764.727846 - 252.7721); 		//20764.727846 - 252.7721
+	  }
+    break;
+
+    case 2:{ // Temp. Range [-34.375°C , -18.75°C[
+      temp = ((float)adcword / 20658.049789 - 253.8995);		//20658.049789 - 253.8995
+	  }
+    break;
+
+    case 3:{ // Temp. Range [-18.75°C , -3.125°C[		
+      temp = ((float)adcword / 20557.997603 - 255.0436);		//20557.997603 - 255.0436
+	  }
+    break;
+
+    case 4:{ // Temp. Range [-3.125°C , 12.5°C]
+      temp = ((float)adcword / 20462.362624 - 256.2209); 		//20462.362624 - 256.2209
+	  }
+    break;
+
+    case 5:{ // Temp. Range [12.5°C , 28.125°C]
+      temp = ((float)adcword / 20367.745024 - 257.4692);		//20367.745024 - 257.4692
+	  }
+    break;
+	
+    case 6:{ // Temp. Range [28.125°C , 43.75°C]
+      temp = ((float)adcword / 20273.127424 - 258.8021);		//20273.127424 - 258.8021
+	  }
+    break;
+	
+    case 7:{ // Temp. Range [43.75°C , 59.375°C]
+      temp = ((float)adcword / 20178.509824 - 260.2208);		//20178.509824 - 260.2208
+	  }
+    break;
+	
+    case 8:{ // Temp. Range [59.375°C , 75°C]
+      temp = ((float)adcword / 20083.892224 - 261.7265);		//20083.892224 - 261.7265
+	  }
+    break;
+	
+    case 9:{ // Temp. Range [75°C , 90.625°C]
+      temp = ((float)adcword / 19989.274624 - 263.3203);		//19989.274624 - 263.3203
+	  }
+    break;
+	
+    case 10:{ // Temp. Range [90.625°C , 106.25°C]
+      temp = ((float)adcword / 19894.657024 - 265.0037);		//19894.657024 - 265.0037
+	  }
+    break;
+	
+    case 11:{ // Temp. Range [106.25°C , 121.875°C]
+      temp = ((float)adcword / 19800.039424 - 266.7778);		//19800.039424 - 266.7778
+	  }
+    break;
+	
+    case 12:{ // Temp. Range [121.875°C , 137.5°C]
+      temp = ((float)adcword / 19705.421824 - 268.6439);		//19705.421824 - 268.6439
+	  }
+    break;
+	
+    case 13:{ // Temp. Range [137.5°C , 153.125°C]
+      temp = ((float)adcword / 19610.804224 - 270.6035);		//19610.804224 - 270.6035
+	  }
+    break;
+	
+    case 14:{ // Temp. Range [153.125°C , 168.75°C]
+      temp = ((float)adcword / 19516.186624 - 272.6578);		//19516.186624 - 272.6578
+	  }
+    break;
+	
+    case 15:{ // Temp. Range [168.75°C , 184.375°C]
+      temp = ((float)adcword / 19421.569024 - 274.8082);		//19421.569024 - 274.8082
+	  }
+    break;
+	
+    case 16:{ // Temp. Range [184.375°C , 200°C]
+      temp = ((float)adcword / 19326.951424 - 277.0562);		//19326.951424 - 277.0562
+	  }
+    break;
+    default:
+		break;
+  }// end of switch case statement
+  return temp;
+
+ }
+
+
Index: firmware/FSC/src/interpol.h
===================================================================
--- firmware/FSC/src/interpol.h	(revision 10706)
+++ firmware/FSC/src/interpol.h	(revision 10753)
@@ -15,4 +15,5 @@
  float getresistance(void);
  U32 getadc(void);
+ float calc_temp(U32 adcword);
 //-----------------------------------------------------------------------------
 #endif
Index: firmware/FSC/src/num_conversion.c
===================================================================
--- firmware/FSC/src/num_conversion.c	(revision 10706)
+++ firmware/FSC/src/num_conversion.c	(revision 10753)
@@ -2,4 +2,5 @@
 
 #include "num_conversion.h"
+#include "math.h"
 //-----------------------------------------------------------------------------
 
@@ -304,4 +305,10 @@
   }
 
+	if (isnan(value)){
+		pstr[0]=pstr[2]='n';
+		pstr[1]='a';
+		pstr[3]=0;
+		return nc_buffer;
+	}
   if (value < 0.0)
   {
