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.
Bookmarks