View previous topic :: View next topic |
Author |
Message |
Robert_Pre
Joined: 04 Mar 2010 Posts: 53
|
Posted: Mon Mar 18, 2013 7:02 pm Post subject: read temperatur from atmega328P-dip28 |
|
|
hello
i try to read the internal temp from my atmega328p-dip28. but i try with getadc(7), gaetadc(8), noting
the pdf notice give the internal adress 8.
it's posiible to read this?
dim v_temp as word
Config Adc = Single , Prescaler = Auto , Reference = Internal 'configuration du convertisseur AD
Config Dp = "." 'pour configurer le signe de ponctuation
V_temp = Getadc(7) 'or getadc(8)
Waitms 1
thank's for your help
(BASCOM-AVR version : 2.0.7.6 ) _________________ F1GHO |
|
Back to top |
|
|
Evert :-)
Joined: 18 Feb 2005 Posts: 2156
|
Posted: Mon Mar 18, 2013 8:19 pm Post subject: |
|
|
You need to set the reference to 1.1V internal, and it's indeed channel 8
Code: |
Config Adc = Single , Prescaler = Auto , Reference = Internal_1.1
|
_________________ www.evertdekker.com Bascom code vault |
|
Back to top |
|
|
747driver
Joined: 25 Jul 2009 Posts: 17 Location: East of 30W
|
Posted: Wed Mar 20, 2013 11:33 am Post subject: |
|
|
What value do you get Robert?
I'm getting a value of 363mV which would roughly translate into 70 degrees C.
Isn't that a bit high or do you get the same kind of value? _________________ Aircraft should have 2 engines........on each wing! |
|
Back to top |
|
|
Robert_Pre
Joined: 04 Mar 2010 Posts: 53
|
Posted: Sat Mar 23, 2013 8:19 am Post subject: |
|
|
hello
thank's for the info
i get a value that is biiger that i find in the datasheet!!!
i get about 368 with 20degrés!
rp _________________ F1GHO |
|
Back to top |
|
|
747driver
Joined: 25 Jul 2009 Posts: 17 Location: East of 30W
|
Posted: Sat Mar 23, 2013 11:17 am Post subject: |
|
|
368mV would be approx. 75 degrees C.
It's not measuring the outside air temperature off course.
Guess it's the core temperature of the chip.
According to the datasheet: "and the accuracy of the temperature measurement is +/- 10°C".
Your chip is just working very hard _________________ Aircraft should have 2 engines........on each wing! |
|
Back to top |
|
|
|