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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/27/13 22:29
Read: times


 
#189498 - The output
Responding to: ???'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?

Hal

List of 22 messages in thread
TopicAuthorDate
How to display data from a ADC0808 to a LCD            01/01/70 00:00      
   Comments, please            01/01/70 00:00      
      Comments            01/01/70 00:00      
         Code Fragments            01/01/70 00:00      
            Commenst added, reply to hal            01/01/70 00:00      
               comments            01/01/70 00:00      
                  comments            01/01/70 00:00      
                     Program flow            01/01/70 00:00      
                        comments            01/01/70 00:00      
                           Clarification & Suggestions            01/01/70 00:00      
                              GREAT HELP            01/01/70 00:00      
                                 Data Display loop            01/01/70 00:00      
                                    Worked sorta            01/01/70 00:00      
                                       The output            01/01/70 00:00      
                                          I looked at it wrong            01/01/70 00:00      
                                             Works            01/01/70 00:00      
                                                Great news!            01/01/70 00:00      
                                                   Thank you            01/01/70 00:00      
                                                      You're Welcome            01/01/70 00:00      
                                                      A couple of questions            01/01/70 00:00      
                                                         Answers and questions            01/01/70 00:00      
                                                            Thanks            01/01/70 00:00      

Back to Subject List