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 CCS Technical Support

Buffer serial port

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



Joined: 25 Oct 2015
Posts: 3

View user's profile Send private message

Buffer serial port
PostPosted: Fri Oct 30, 2015 10:44 am     Reply with quote

Hi I wanna make a buffer that can store a 6 hexadecimal digit by serial port, and then use that to make a sentence, thanks.
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Fri Oct 30, 2015 11:48 am     Reply with quote

in your examples CCS folder
look at EX_SISR.c

it is what you seek
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Fri Oct 30, 2015 12:31 pm     Reply with quote

Hi kevinvig7,

In another thread, I referred you to exactly the code you'd need to buffer incoming serial data, and then print the data for review. Did you ever check that out??

Here is that thread: http://www.ccsinfo.com/forum/viewtopic.php?t=54516&highlight=

If so, I don't understand why you are back here now asking essentially the same question? If you didn't understand the code that was provided, you should ask about it rather than opening yet another new thread on basically the same topic!

The code in the thread I pointed to is for a 'linear buffer', which is probably sufficient for most projects. If you are doing something like reading a GPS that is continuously spitting out a lot of data, a 'circular buffer', such as the one referenced by asmboy, might be more appropriate. You, however, must take some initiative here!
_________________
John

If it's worth doing, it's worth doing in real hardware!
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