Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How to count the data?

Status
Not open for further replies.

alamy

New Member
Hi everybody..

my pic will receive a data (in ASCII), and i'm going to count dedicated ascii...how to do it..

for example..

my data is "abd,de,ghsdkj,hj" how to count ","..because the reason is, "," is as my 'boundary', meaning that, for example, after receive first "," i'll keep the next data before receive another "," after that i'll ignore the next data and maybe i'll keep the nest data after another ","..

thanks in advance..

sorry for my poor english
 
Just check for the ',' - it's called a 'seperator character'. So for each received character check if it's ',' - if not place it in a buffer - if it is ',' then jump to a routine to process the characters in the buffer. You can use either SUBLW ',' or XORLW ',' to check for the correct character, the Z flag shows the result.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top