'Temperature sensor for Dragon12
I have a project on Dragon12-Plus and I have to use de temperature sensor. I found this function
void temp(unsigned int x) //input voltage to convert
{
//ATD0CTL0,ATD0CTL1- reserved
ATD0CTL2 = 0xC0; //1100 0000
ATD0CTL3 = 0x08;
ATD0CTL4 = 0xEB; //1110 1011
ATD0CTL5 = 0xA4; //1010 0101
displayValue(x*500/255);
}
and the function has this call temp(ATD0DR0L); in main. Why the value has the form x*500/255 ? Can someone help me? Thanks!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
