dcsimg


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: How to different data from micrcontroller?

  1. #1
    Join Date
    Aug 2006
    Posts
    23

    How to different data from micrcontroller?

    i'm trying to communicate with a microcontroller which is connected to IR. IR using the AT command. the problem is the data from the microcontroller is in binary from while the AT command is in character form.... to simplfy. Consider the example below,

    i want to send value 65 to computer from microcontroller... at the meanwhile character "A" is ascii also represent 65. How to differentiate value 65 and character "A".

    What is the method normally used??? really need help...

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    A byte is a byte; there is no difference between the byte 65 and the character 'A'. If you send the character 'A' to the microcontroller, it will "hear" 65.

    If you'd like it to be obvious in your code that you're sending the value 65, you may use the Chr function:

    ValueToSend = Chr(65)

    This is equivalent to:

    ValueToSend = "A"
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  3. #3
    Join Date
    Aug 2006
    Posts
    23
    My microcontroller send out the temperature value, let say 65(which is 1000001 in binary form and NOT in character form where 65 is equal to chr(54) & chr(53) )

    And my IR which is connected to the serial port will send some AT Command which in character form.

    So, i am having problems in differentiate whether the receiving data is a character or a decimal.

    what should i do???

Similar Threads

  1. Create multiple data in data report
    By helme_syahiemie in forum VB Classic
    Replies: 1
    Last Post: 04-06-2006, 08:39 PM
  2. Data Junction Announces XML Junction 7.51
    By Tim Frost in forum xml.announcements
    Replies: 0
    Last Post: 04-02-2001, 10:53 AM
  3. Replies: 0
    Last Post: 07-22-2000, 04:07 AM
  4. Unbound Data Report Recordset
    By Dale in forum VB Classic
    Replies: 1
    Last Post: 06-21-2000, 06:44 PM
  5. DataGrid - Enter data in a cell at run time
    By William Gaddam in forum VB Classic
    Replies: 1
    Last Post: 05-02-2000, 09:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center