| ??? 02/23/03 14:47 Read: times |
#39835 - RE: DS1620. Look-up table? Responding to: ???'s previous message |
However that said there would appear to be NO reason to use a look up table at all. If you look at the data you showed in your post you can note that the temperature numbers are right in the data. If you took the 9 bits of data and shift it right by one position the resulting byte value is a binary number of the temp in degrees C. The low bit before the shift simply shows if the temp is xxx.0 or xxx.5 degrees.
You can display the temperature by taking the 8 bit shifted whole number of degrees and convert it to ascii decimal and display the three digits on the LCD. Then you display a '.' character. Finally go back and look at the original low bit and of zero you display a '0', otherwise display a '5'. The process you use to convert the binary value to displayable ascii digits can be learned by looking at conversion routines you can find in the Code Library by looking at the links to the right. Good Luck Michael Karas PS.. Note if you now want to convert the temp from C to F then maybe a simple lookup table may be useful. MJK |
| Topic | Author | Date |
| DS1620. Look-up table? | 01/01/70 00:00 | |
| RE: DS1620. Look-up table? | 01/01/70 00:00 | |
| RE: DS1620. Look-up table? | 01/01/70 00:00 | |
| Internal External memory | 01/01/70 00:00 | |
| RE: Internal External memory | 01/01/70 00:00 | |
| RE: DS1620. Look-up table? | 01/01/70 00:00 | |
| RE: DS1620. Look-up table? | 01/01/70 00:00 | |
| RE: DS1620. Look-up table? | 01/01/70 00:00 | |
| RE: DS1620. Look-up table? | 01/01/70 00:00 | |
| RE: DS1620. Look-up table? | 01/01/70 00:00 | |
| RE: DS1620. Look-up table? | 01/01/70 00:00 | |
| RE: DS1620. Look-up table? / Erik | 01/01/70 00:00 | |
| Sample LUT | 01/01/70 00:00 | |
| RE: Sample LUT | 01/01/70 00:00 | |
| RE: Sample LUT | 01/01/70 00:00 | |
| RE: Sample LUT | 01/01/70 00:00 | |
| RE: DS1620. Look-up table? | 01/01/70 00:00 | |
| RE: DS1620. Look-up table? | 01/01/70 00:00 | |
RE: DS1620. Look-up table? | 01/01/70 00:00 |



