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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/30/10 16:14
Read: times


 
#174644 - Binary data or printable ASCII data?
Responding to: ???'s previous message
But do you see the text "Temp=" and "Hmdt="?

How have you made sure that the temperature and humitidy values you are printing have been converted to ASCII format? It really isn't too common for sensors to return numeric values as ASCII characters.

Let's say a sensor returns a value between 0 and 1023 in two bytes. It will then be up to you to convert the binary value 748 into a '7', a '4' and a '8' - the characters to print. Note that one byte of binary data can be up to 3 digits (or even 3 digits and a sign). Two bytes can be up to 5 digits (or 5 digits and a sign).

List of 24 messages in thread
TopicAuthorDate
8051 using i2c            01/01/70 00:00      
   What was your result?            01/01/70 00:00      
      Results            01/01/70 00:00      
         Binary data or printable ASCII data?            01/01/70 00:00      
            Binary data            01/01/70 00:00      
   I probably have a problem using I2C protocol.            01/01/70 00:00      
      I2C protocol            01/01/70 00:00      
         that being the case            01/01/70 00:00      
         So it clearly tells you that it is *not* I2C!!            01/01/70 00:00      
   start over            01/01/70 00:00      
      Why not start with the code they give you?            01/01/70 00:00      
         what code?            01/01/70 00:00      
            compile it            01/01/70 00:00      
            You have to be prepared to do some work, you know            01/01/70 00:00      
               Ripping assembler from the debugger            01/01/70 00:00      
      I need some help            01/01/70 00:00      
         Not a Contracting Site            01/01/70 00:00      
         We may be able to come to an arrangement - on one condition            01/01/70 00:00      
            BRAVO            01/01/70 00:00      
            I need some help 2            01/01/70 00:00      
               Have you checked the debugger/simulator yet?            01/01/70 00:00      
                  Compiler/simulator            01/01/70 00:00      
                     No compiler in the C51 kit???            01/01/70 00:00      
                        you were so right            01/01/70 00:00      

Back to Subject List