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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Hal Albach
02/27/13 15:29
Read: 900 times
Seminole, Florida

#189498 - The output
Responding to: James Brzycki's previous message
Remember, the conversion routines store the least digit in the lower byte, starting at 50 and ending with the highest digit in location 52. To properly display this data on the LCD you have to send the highest digit first. What you did by decrementing R1 three times is to back up R1 back to 50H. Then you started sending the data in low to high fashion, incrementing R1. This will display the digits on the LCD in REVERSE order. Notice how when heating the sensor the readings jumped by 10? Reverse each number and you'll have 76, 77, 78,.....
All you really needed to do was decrement R1 once to make it point back to 52H and then send the data to the LCD and decrementing R1.
I'm not sure what you were seeing with the DVOM, but I suspect that possibly the LM34's output was rising faster than the meter could follow, hence the 'jump'.
The ADC step size is determined by the number of bits it will output. Your ADC happens to be an 8 channel, 8-bit device, meaning it can read 8 analog devices each to a resolution of 8 bits. If your Vref is 5 volts then the adc will use 256 steps to represent those 5 volts, where 255 represents 5 volts. Each step will be approximately 19.53 millivolts. This is where it becomes important to select the proper adc by understanding the output range of your analog device. The LM34 is not a ratiometric device, meaning that it will always output a fixed value for a given temperature. A ratiometric device, in simple terms, will output half the voltage when the input temperature is at the devices' midpoint.

Could you repost your latest code? Maybe we can find out why R1 is pointing past the data field?


List of 22 messages in thread
How to display data from a ADC0808 to a LCD      James Brzycki      02/24/13 09:46      
   Comments, please      Hal Albach      02/24/13 17:25      
      Comments      James Brzycki      02/24/13 17:56      
         Code Fragments      Hal Albach      02/24/13 21:01      
            Commenst added, reply to hal      James Brzycki      02/24/13 21:11      
               comments      Hal Albach      02/24/13 22:46      
                  comments      James Brzycki      02/25/13 06:33      
                     Program flow      Hal Albach      02/25/13 11:40      
                        comments      James Brzycki      02/25/13 21:45      
                           Clarification & Suggestions      Hal Albach      02/26/13 07:44      
                              GREAT HELP      James Brzycki      02/26/13 11:39      
                                 Data Display loop      Hal Albach      02/26/13 12:24      
                                    Worked sorta      James Brzycki      02/27/13 06:57      
                                       The output      Hal Albach      02/27/13 15:29      
                                          I looked at it wrong      James Brzycki      02/27/13 17:19      
                                             Works      James Brzycki      02/27/13 20:35      
                                                Great news!      Hal Albach      02/28/13 07:05      
                                                   Thank you      James Brzycki      02/28/13 07:15      
                                                      You're Welcome      Hal Albach      02/28/13 08:33      
                                                      A couple of questions      Hal Albach      02/28/13 11:06      
                                                         Answers and questions      James Brzycki      02/28/13 11:54      
                                                            Thanks      Hal Albach      02/28/13 12:36      

Back to Subject List