CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Binary serial to ascii

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Guest
Guest







Binary serial to ascii
PostPosted: Mon May 02, 2005 11:24 am     Reply with quote

Hi,

I have an application where I need to read an incoming 19.2kbaud binary datastream on an rs232 port. This data will be added to an existing ascii serial stream being sent out the port.

The issue is to read the data looking for a header, grab a section, then convert to ascii and combine with an existing data output. Can someone give any hints or a basic approach to converting the data? Any existing functions in the language that will help with this? The pic is a 16f877 and is doesn't have endless amounts of memory available.

Thanks.
rwyoung



Joined: 12 Nov 2003
Posts: 563
Location: Lawrence, KS USA

View user's profile Send private message Send e-mail

PostPosted: Mon May 02, 2005 12:45 pm     Reply with quote

This just screams "state machine" and "look-up table" to me.
_________________
Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon May 02, 2005 1:20 pm     Reply with quote

You didn't tell us what protocol you're trying to parse, but this thread
and the links within it, may be of help:
http://www.ccsinfo.com/forum/viewtopic.php?t=21697&highlight=nmea
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group