Go Down

Topic: HDC1000 Battery Configuration  (Read 225 times) previous topic - next topic

HamingBird

Jun 14, 2016, 01:57 pm Last Edit: Jun 14, 2016, 09:01 pm by HamingBird
Hallo,

I am using "HDC1008"  sensor  with  "Arduino UNO", its a Temperature and Humidity sensor. the data sheet can be found :

http://www.ti.com/lit/ds/symlink/hdc1008.pdf


I have both prog for  "Arduino UNO", the prog are  "Adafruit_HDC1000.h"  and "Adafruit_HDC1000.cpp"

In the header file prog  "Adafruit_HDC1000.h" written for battery status :


 
Code: [Select]


#define HDC1000_CONFIG_BATT   (1 << 11)







and in the data sheet --> page 15 -->  Table 5  says :

in Register 0x02  the  bit 11 have to be:

case1: Set(i.e. write 1)--> if we want to make the Battery status--> "Battery voltage < 2.8V (read only)"

case2: unset(i.e. write 0) --> if we want to make the Battery status--> "Battery voltage > 2.8V (read only)"



now, my question is how Arduino programmer write  1 << 11  for   case1     ?  ?   ?

I am not saying its wrong.... I just want to understand it...

I will appreciate any  help. better if any one can explain it clearly with calculation...

Thanks



Go Up