Do I need to normalize the response of internal temp sensor by 1.1V Vref?

'cc-coded' is a local symbolic name, and it stands for: 'something (a digit)' coded into an 8-bit cc(common cathode code) with respect to a cc(common cathode type)-type 7-segment display device.

For example we have a decimal number 23 whose BCD-codes (0010 0011) are kept in a variable. We want to show 3 on a cc-type 7-segment display device. What do we do? We take the BCD-code 0011 and use it as an index to get the corresponding 8-bit cc-code from a Look up Table. When this happens, we say that the BCD-digit has been coded into cc-code or the cc-coded value of 3 is the bit pattern 01001111.

Sorry, for the inconvenience.

I have progress on the calibration of the internal temperature sensor of ATmega328 using an LM35 as a secondary calibrator. I hope to report the result in a few days.

I'm pretty sure you'll have to do the full set of binary -> BCD -> CC code conversions. The CC code values are arbitrary bitmaps with no numerical significance, so it's impossible to do any arithmetic with them as the input or output. That's why you need to compute the BCD value first, then look up the bitmap for each digit separately.

subjcet: Re-calibration of ATmega328's (Sn-X1) Internal Temperature Sensor using LM35 (Industry Standard Factory Calibrated Temperature Sensor) as a Secondary Calibrator.

1. Among 140 Arduino UNO Kits of the students, I monitored the temperatures (in 0C) of the following 51 Kits using the response equation ( T*104 = 2625h * ADCT - 2B7E01h; as per Atmel data sheet) which exclusively belongs to Sn-X1.

98, 98, 100, 98, 79, 74,  88, 90, 89, 96, 89, 73, 90, 101, 70, 79, 69, 
82, 86, 89, 75, 84,  86, 79, 85, 93, 93, 92, 99, 94, 92, 96, 81, 94, 
94, 94, 94, 91, 89, 89, 101, 86, 91, 80, 88, 98, 99, 85, 92, and 79.

2. Re-calibrated Data for the ATmega328 of Sn-X1 using LM35 Temp. Sensor as a Secondary Calibrator
VREF T0C of LM35 (1.1/10.24*ADCT) ADCT of ATmega328(Sn-X1)
1.1V 31.15 015Fh
1.1V 23.84 0157h
1.1V 18.26 014Eh

The response equation for ATmega328 (Sn-X1) has appeared as follows based on A(31.15, 015F) and B(23.84, 0157):

T*104 = 23B1h *ADCT - 2C2F92h.

Now, the ATmega328 (Sn-X1) shows ambient temperatures that are very much matching with LM35 compared to the previous response equation(T*104 = 2625h * ADCT - 2B7E01h) deduced based on Atmel data sheets..

3. Conclusion
The data of Step-1 clearly indicates that the gain and offset of the internal temperature sensors of all the ATmega328 chips are not the same. So, we need to calibrate each sensor separately before we use it. The calibration can be easily done using an LM35 Temperature Sensor which holds factory trimmed response equation (T0 C = 1.1/10.24 * ADCT with 10-bit ADC and Vref=1.1V). For two known temperatures (Say, Room Temperatures about 300C and 200C), we record the ADC counts (with Vref = 1.1V) of the ATmega328 and then derive the temperature equation as *T0C = mADCT + c.

I'm pretty sure you'll have to do the full set of binary -> BCD -> CC code conversions. The CC code values are arbitrary bitmaps with no numerical significance, so it's impossible to do any arithmetic with them as the input or output. That's why you need to compute the BCD value first, then look up the bitmap for each digit separately.

We have planned to proceed as follows to develop the Temperature Meter (a demonstrative project of the students) using ATmega328 MCU, its internal temperature sensor along with the calibrated response equation (T0C = m*ADCT + c), and the Arduino Platform.

Because the gain and offset of the internal temperature sensors of all the ATmega328 chips are not the same, we need to calibrate each sensor separately before we use it. The calibration can be easily done using an LM35 Temperature Sensor which holds factory trimmed response equation (T0C = 1.1/10.24 * ADCT with 10-bit ADC and Vref=1.1V). For two known temperatures (Say, Room Temperatures about 300C and 200C), we record the ADC counts (with Vref = 1.1V and 10-bit ADC) of the ATmega328 and then derive the temperature equation as T0C = m*ADCT + c.

Aim: Measure and display chip (ATmega328)/ambient temperature on 4-digit cc (common cathode)-type 7-segment multiplexed display unit at 3-sec interval.

void setup()  // Labels are just for references
{
    //Initialize everything as needed
    L11:   Initialize T1 of TC1 to generate 3-sec time delay from basic 1-sec Time Tick
    L12:   Directions of digital IO lines
    L13:   Data structures and variables as needed
    L14:   Vref at 1.1V and Ch-8 via ADMUX register
    L15:   ADC's conversion clock (clkADC)?                            
    L15:   Start ADC via ADCSRA register
    L16:   Wait here until conversion is done
    L17:   Read ADC and discard     //discard the first reading of ADC why?
}

void loop()   // Labels are just for references
{
   L21:   while (3-sec time has not elapsed)                //call timeDelay();
   L22:       Refresh multiplexed display unit               // call refreshDisplay();

   L23:   Start ADC with the help of ADCS bit of ADCSRA register
   L24:   while (ADC conversion is not done)
              wait here

   L25:   Read ADC data

   L26:   Compute 32-bit Binary Temp. by evaluating T*10E+4 = m*ADCT + c //binTemp();
   L27:   Compute 8-digit (4-byte) BCD Temperature //binToBcd();
   L28:   Perform rounding on the 5th digit (starting from right)
   L28:   Convert upper 4-digit BCD temperature into 4-byte CC-coded Temperature  //bcdToCc();
   L29:   Add decimal point with 3rd digit (starting from right)
   L210: Transfer 4-byte CC-coded Temperature onto cc-type 7-seg. display unit  //refreshDisplay();
    
}

void timeDelay()
{
   //codes
}

void refreshDisplay()   //to transfer 4-byte cc-coded temp. onto 7-segment display unit
{
   //codes
}

void binTemp()
{

    //codes
} 

void binToBcd();
{
  //codes
}

void  bcdToCc()
{
   //codes
}

The Forum members are requested to post (or refer to links) algorithms for our proposed functions. We have opportunities to code/test these algorithms in the lab by a crowd of 140 students.