Parsing Strings...


Results 1 to 24 of 24

Threaded View

  1. #7
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I still think separating the numbers on the way in is the way to go. Although Jerson's code is pretty slick.

    Here is what I was thinking. Just tested it using SERIN2 as the chip I have on the bench is not set up for HSERIN right now.

    The first WAIT is to keep garbage out.
    Code:
    N1	VAR	LONG
    N2	VAR	LONG
    LOOP:
    SERIN2 PORTD.2, 16416, [WAIT("X"),DEC N1,WAIT(","),DEC N2]
    GOTO DISPLAY
    
    DISPLAY:
    Serout2 PORTC.6, 16416, [ DEC N1, $d, $a]
    Serout2 PORTC.6, 16416, [ DEC N2, $d, $a]
    GOTO LOOP
    If you need the data in an array just modify the above with STR...
    Last edited by mackrackit; - 11th February 2009 at 15:09.
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. Parsing serial data
    By Heckler in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 4th March 2010, 14:25
  2. Please help with storing strings in codespace
    By g-hoot in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 16th May 2008, 01:02
  3. How to write/read strings EEPROM/LCD
    By g-hoot in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 11th February 2007, 06:26
  4. Processing lengthy strings
    By sougata in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 21st March 2006, 05:27
  5. I2CWRITE writing Strings to EEPROM
    By NavMicroSystems in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 27th March 2005, 19:45

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