Serin Help - ASCII to Decimal


Results 1 to 6 of 6

Threaded View

  1. #1
    Join Date
    Oct 2009
    Posts
    8

    Default Serin Help - ASCII to Decimal

    I've Googled till my fingers bled, but still can't get this to work. I'm reading serial data from a Windows XP machine in the following format: "F100". I'm using serin on a 16f877. The data is being sent as characters from the Window machine.

    <code>
    Byte1 var Byte
    Byte2 var Byte

    Serin 1,N2400, Byte1, Byte2
    </code>

    I want to read Byte1 as "F", and Byte2 as decimal 100. I can read the "F", but I'm not sure how to get the 100 as a number. I've tried # and []. Should be easy right? So far I'm failing miserably!

    Can anyone help? Thank you in advance.
    Last edited by Dino308gt4; - 12th October 2009 at 17:16.

Similar Threads

  1. Hex to Ascii to Decimal
    By khoog in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 31st July 2009, 05:27
  2. Convert long binary number to ASCII Decimal
    By Joe Rocci in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 9th July 2009, 13:58
  3. SERIN in acii, hex, decimal?
    By sccoupe in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 10th March 2009, 21:28
  4. Problem with PBP interrupt and Serin, please help
    By rgregor in forum mel PIC BASIC
    Replies: 0
    Last Post: - 22nd August 2006, 19:02
  5. Conversion of 10-bit word into ASCII
    By Barry Johnson in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 16th January 2005, 14:26

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts