Processing lengthy strings


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563

    Unhappy Processing lengthy strings

    Hi Everybody,

    I made a previous post on parsing data from a VT220 terminal @ 9.6kbps. It is basically a POS LED display that shows different items like weight , price , batchcode and other stuff to the buyer. I have used a PIC18F452 and have around 16 Seven Segment Displays(static info) and 16 5x8 LED displays (scrolling info). Now the problem is that with inclusion of new items I need to parse lengthy information from the VT220 terminal. Previously I was using a co-ordinate detect (from the terminal excape sequences ) with known delimiter. Now with the data changing I need to parse lengthy strings (more than 160 characters ) and get valid data out of it. It is not at a fixed co-ordinate so I would not like to loose characters. BTW I am using a 255 bytes ring counter with interrupt based USART read , checks for clearing hardware error, removing esc($1B) done in asm. I am using fast context restore that is Retfie, Fast. But the problem is searching for an entire array of strings takes time in the main routine so I am having flicker in scanning the matrix.(done by polling timer 0 overflow row scanned). I need a better algo, doing a checksum did not solve as the data is different for different item. For example I have to look for "This is a nice forum and I love it and take part actively"
    Now I need to find and display I love it on my matrix. I also need the later part to know that I am getting it all right.Since the co-ordinates are not same so cannot just do a length trimming. Thinking of using a separate PIC for the parsing stuff. Any ideas or better algo? I have tried checksum. Works but not perfectly.
    Regards

    Sougata

  2. #2
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Unhappy Well trying it in a different way.

    Hi,

    Rather than parsing the whole data I am now emulating terminal like interpretation right into the ISR, with inbuilt two digit decimal ASCII to binary conversion. This involves getting the terminal co-ordinate data and assigning the real text data into pre-defined arrays rather than one single ring bufffer. I am unsure about my practices with the indirecting file addresing in the asm. Any tutorial or tips on the same would be appreciated. Also please let me know if bank switching in asm ISR is okay. Anyway the FSR values are restored with the Retfie FAST. I am not using any calls within the ISR, rather Goto. I believe this would not modify the shadow registers(only one level deep).

    Wish me luck I need it.
    Regards

    Sougata

Similar Threads

  1. Parsing Strings...
    By TerdRatchett in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 15th February 2009, 05:13
  2. Please help with storing strings in codespace
    By g-hoot in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 16th May 2008, 02: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, 07:26
  4. I2CWRITE writing Strings to EEPROM
    By NavMicroSystems in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 27th March 2005, 20:45
  5. reading 2c strings
    By beto in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 22nd December 2004, 16:26

Members who have read this thread : 0

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