|
|
View previous topic :: View next topic |
Author |
Message |
kevinvig7
Joined: 25 Oct 2015 Posts: 3
|
Buffer serial port |
Posted: Fri Oct 30, 2015 10:44 am |
|
|
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
|
|
Posted: Fri Oct 30, 2015 11:48 am |
|
|
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
|
|
Posted: Fri Oct 30, 2015 12:31 pm |
|
|
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! |
|
|
|
|
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
|