Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/10/07 23:51
Read: times


 
#130609 - No, that's wrong
Responding to: ???'s previous message
Tomas Dabasinskas said:

MSB LSB
|X|X|X|X|X|X|X|1| |0|1|0|0|1|1|0|1|
X- 7 MSB bits are being ignored
1 in MSB means that reading is negative (0 would be positive)
Last bit of LSB (which is 1) means that there's .5 to the reading
so here's what we get
-||,5 => 01001101(negative bin) = 10110010+1(positive bin) => 10110011(postive bin) => 179(dec)
-|01001101|,5 = -|179|,5 => -179,5
you won't be quite getting anything like this as ds1620 can only do -55c to +125c

No, that's wrong.

Take another look at the examples in the datasheet, and you'll see that it doesn't work!

The nine used bits form a 2's complement number;
The least-significant bit, b0, has a "weight" of 0.5;
b1 has a "weight" of 1;
b2 has a "weight" of 2;
b3 has a "weight" of 4;
b4 has a "weight" of 8;
b5 has a "weight" of 16;
b6 has a "weight" of 32;
b7 has a "weight" of 64;
b8 has a "weight" of -128.

So your example is:
   b8   b7   b6   b5   b5   b3   b2   b1   b0
 -128   64   32   16    8    4    2    1  0.5
|  1 |  0 |  1 |  0 |  0 |  1 |  1 |  0 |  1 |

And the temperature value is -128+32+4+2+0.5 = -90.50C

List of 32 messages in thread
TopicAuthorDate
Problem with DS1620 and 8051!! Please Help!!            01/01/70 00:00      
   Re:Problem with DS1620 and 8051!! Please Help!!            01/01/70 00:00      
   does it work?            01/01/70 00:00      
      Re:Trivial issues..            01/01/70 00:00      
         ds1620 data sheet            01/01/70 00:00      
            Re: ds1620 data sheet            01/01/70 00:00      
               get the basics first.            01/01/70 00:00      
                  Basics - Data format            01/01/70 00:00      
                     Re: Basics            01/01/70 00:00      
                        Re: Basics            01/01/70 00:00      
                           google is your best friend            01/01/70 00:00      
                        No - see below            01/01/70 00:00      
                           RE:see below            01/01/70 00:00      
                              Table 3            01/01/70 00:00      
   DS1620 Data format            01/01/70 00:00      
      Re:DS1620 Data format            01/01/70 00:00      
   What Standard Program?            01/01/70 00:00      
      Standard Program            01/01/70 00:00      
         Clickable            01/01/70 00:00      
            newbie explanation            01/01/70 00:00      
               No, that's wrong            01/01/70 00:00      
               MCT            01/01/70 00:00      
            Have U got it right dude?            01/01/70 00:00      
               YOu may think so            01/01/70 00:00      
               Like, totally un-right Man!            01/01/70 00:00      
               Like, so Incomplete, dude!            01/01/70 00:00      
                  Where is question of completeness            01/01/70 00:00      
                     how can 'u' be complete, look in any dictionary            01/01/70 00:00      
                     Rules            01/01/70 00:00      
                        Thanks Sir. When you got awake?            01/01/70 00:00      
                           You            01/01/70 00:00      
                     Rules of the board            01/01/70 00:00      

Back to Subject List