ATmega328P Temperature measurment

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello !

 

ATmega328's datasheet says that i need to use ADC8 channel for temperature measurement. To which pin should i connect the temperature sensor ? I couldn't find the pin for temperature measurement, my guess would be that i can connect the temperature sensor to any ADC channels since ADC only cares about voltage and that is what temperature sensor outputs. Then why there is the subsection about temperature measurement in the ADC section, and temperature measurement is market as a special feature in the chip's overview ? 

This topic has a solution.
Last Edited: Thu. Nov 17, 2016 - 06:15 AM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Paragraph 24.8 makes it very clear. The temperature sensor is provided for your use inside the mega328p.

 

The temperature measurement is based on an on-chip temperature sensor that is coupled to a single ended 
ADC8 channel. Selecting the ADC8 channel by writing the MUX3...0 bits in ADMUX register to "1000" enables 
the temperature sensor. The internal 1.1V voltage reference must also be selected for the ADC voltage 
reference source in the temperature sensor measurement. When the temperature sensor is enabled, the ADC 
converter can be used in single conversion mode to measure the voltage over the temperature sensor

Ross McKenzie ValuSoft Melbourne Australia