ASCII to Long conversion


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Feb 2009
    Posts
    41


    Did you find this post helpful? Yes | No

    Default

    Hi Jerson,

    You mean the answer is in one of my own former posts? That's embarrasing

    At that point thanks to your code slightly modified I was able to parse my serial port data into two arrays rather than longs. I found this was better since I didn't need to do anything other than display it. Now I am having to add a feature where I average the last 60 samples. I don't think there is any way to average ASCII strings so I decided I need to convert it to longs.

    So looking back at your original code I'm not totally clear how it works. I'll study it in more detail and maybe it will click...

    TR

  2. #2
    Join Date
    Feb 2009
    Posts
    41


    Did you find this post helpful? Yes | No

    Default

    I've got the code entered and possibly working, so I created some quick test code to verify it. But I'm not getting the results i expected...

    I'm just doing a HSEROUT [longvalue] after forcing known data into the string and calling the sub, but I'm only getting one byte out of the serial port?

Similar Threads

  1. High Resolution Timer & Speed Calculator
    By WOZZY-2010 in forum Code Examples
    Replies: 4
    Last Post: - 7th February 2010, 16:45
  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. SerIn2 ASCII Conversion
    By rwskinner in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 4th March 2008, 21:41
  4. ascii conversion help needed
    By muddy0409 in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 13th January 2007, 06:33
  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