Page 131 - Embedded Microprocessor Systems Real World Design
P. 131

brr,






                         MAX6576
                                                      MICROCONTROLLER
                                                     TIMER
                   -    GND
                          PERIOD (IN US) = TEMP x 10
                            TEMPERATURE IN DEGREES KELVIN
                          PERIOD (IN US) = (TEMP + 273.65) x 10
                            TEMPERATURE IN DEGREES CELSIUS















                                                                 3             AT90S6515
                                                                               INTERNAL
                                                                               DATA BUS
                                                   A     CLR        A

                                 16wO HZ




                   Figure 3.6
                   MAX6576 Timing Input Example.


                   resolution you can get. If the temperature of the sensor is 25"C, the captured count
                   value will  be  11,926/62.5 = 190.8. Since the  counter can  only capture  integral
                   values, the actual count will  be  190 (the .8 is  dropped). For the count to be less
                   than 190, the temperature must go to 23.7"C. Any changes between these two values
                   cannot be read by the microprocessor.
                     If we  decide  that  this  is  insufficient accuracy for  our  application, we  might
                   change the prescaler to 1, making the counter clock the same as the CPU clock,
                   4.096MHz.  Now  the  counter  increments  every  244.1ns,  and  the  resolution  is
                   244.1ns/40ps,  or  .0061  degrees  per  counter  increment.  This  is  much  better
                   accuracy than the sensor itself has.
                     What happens in this configuration if the temperature goes from 25°C to 125"C?
                   The count value will go from 11,926 to 15,926. This will result in a captured count


                   112                                             Embedded Micropocessor Systems
   126   127   128   129   130   131   132   133   134   135   136