Parsing strings received serially.


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2004
    Posts
    448

    Default Parsing strings received serially.

    Hi guys,

    I Havent used PBP for quite a while, and I'm afraid my memory is getting rusty.

    I need some help with string parsing.

    I get a stream of data over the serial port in the format !Vxx=yy$

    Where, !V are common start bytes, xx is a 2 digit integer in decimal, followed by "=", and followed by another decimal yyy which could be either single digit, double digit OR 3 digit. And lastly, "$".

    I'll need to fork off to different subd, depending on the value of xx.

    What would be the best way to do this?

    Thanks in advance, guys!

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,386


    Did you find this post helpful? Yes | No

    Default Re: Parsing strings received serially.

    I Havent used PBP for quite a while, and I'm afraid my memory is getting rusty.
    searching the forum still works

    second item seems to cover it
    http://www.picbasic.co.uk/forum/showthread.php?t=17632
    http://www.picbasic.co.uk/forum/showthread.php?t=20953
    Last edited by richard; - 7th June 2017 at 11:47.

  3. #3
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default Re: Parsing strings received serially.

    Quote Originally Posted by richard View Post
    searching the forum still works
    Indeed it does; somehow did not stumble across the 2nd thread; Heckler's response looks pretty much what I needed.

    Thanks for the pointer.

    Best Regards,

    Anand Dhuru

Similar Threads

  1. Adding values one at a time and sending them serially
    By Megahertz in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 21st August 2013, 14:56
  2. Question about sending data serially
    By FromTheCockpit in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 1st August 2011, 01:21
  3. Parsing Strings...
    By TerdRatchett in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 15th February 2009, 04:13
  4. pic18f4550 & pic16f84a serially ?
    By amenoera in forum Serial
    Replies: 0
    Last Post: - 1st March 2008, 10:51
  5. it's possible to drive four max7221 serially connected?
    By lutherblissett in forum General
    Replies: 0
    Last Post: - 23rd November 2005, 18:38

Members who have read this thread : 1

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

Posting Permissions

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