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

Serial Data and EEPROM storage - ASCII or Binary

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



Joined: 20 Jan 2004
Posts: 9
Location: Ottawa, Ontario Canada

View user's profile Send private message

Serial Data and EEPROM storage - ASCII or Binary
PostPosted: Wed Mar 10, 2004 12:14 pm     Reply with quote

Hello,

Been using CCS for a few months now - this forum has been a tremendous help to getting started! I hope to be contributing more in near future after to getting to be a little more dangerous ....

I have a question that hopefully some of you guys can comment on. I am writing an application where multiple pics will share serial data (485 network), and some of them will have the capability to store data using serial ram (RAMTRON). I am wondering if it is worth the trouble to convert all numerical data to a string format for serial transmission and eeprom storage? Here are the pros and cons of converting to ASCII as I see it:

PROS
- easier to debug (you could see the results using terminal and eeprom readers)
- can make use of standard <STX> and <ETX> characters for serial data

CONS
- requires more code (ie more PIC memory) for string conversions
- serial packets are larger, and each value requires more memory space to save results

I'm leaning towards not converting the data to string format in order to make the code leaner and faster, but would like to hear what you guys think about this.

Thanks
Dave
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

PostPosted: Wed Mar 10, 2004 1:28 pm     Reply with quote

For starting and stoping your packets you could also use nine bit byte mode. It is simple to switch between 9 bit and 8 bit. When bytes arrive look for bit-8 to start and stop a packet. This is frequently used when broadcasting the address byte at the start of a packet. The recieving devices only have to buffer packets that start with their slave address all other incomming data is ignored. I am having good results with MODBUS and have posted example code in my home folder along with protocol specifications.
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