Quantcast
Channel: MEL PICBASIC Forum
Viewing all articles
Browse latest Browse all 4746

Parsing strings received serially.

$
0
0
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!

Viewing all articles
Browse latest Browse all 4746

Trending Articles