Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/17/01 09:24
Read: times


 
#10865 - Protocol Ideas
I am developing my own protocol (sort of based on a whole heap of others) for use between my uC's (2051)the problem that I have is that in some cases I want to change the length of the data that I send to a uC, for instance when I change the time on my RTC I have to send more than the 2bytes I have allowed in my protocol.

How would I go about doing this without wasting heaps of space by allocating a huge array and then never using it all.

I was thinking about Linked Lists but that is also wasteful as each value requires an extra byte to hold the address, any ideas?

How have you guys done this?

Thanks for your help

Marshall Brown


struct NetworkPacket
{
byte DestinationAddress;
byte SourceAddress;
byte FrameLen;
byte Command;
byte DataHi;
byte DataLo;
byte Crc;
};


List of 18 messages in thread
TopicAuthorDate
Protocol Ideas            01/01/70 00:00      
RE: Protocol Ideas            01/01/70 00:00      
RE: Protocol Ideas            01/01/70 00:00      
RE: Protocol Ideas            01/01/70 00:00      
RE: Protocol Ideas            01/01/70 00:00      
RE: Protocol Ideas            01/01/70 00:00      
RE: Protocol Ideas            01/01/70 00:00      
RE: Protocol Ideas            01/01/70 00:00      
RE: Protocol Ideas            01/01/70 00:00      
RE: Protocol Ideas            01/01/70 00:00      
RE: Protocol Ideas            01/01/70 00:00      
RE: Protocol Ideas            01/01/70 00:00      
RE: Protocol Ideas            01/01/70 00:00      
RE: Protocol Ideas            01/01/70 00:00      
RE: Protocol Ideas            01/01/70 00:00      
RE: Protocol Ideas            01/01/70 00:00      
RE: Protocol Ideas            01/01/70 00:00      
RE: Protocol Ideas            01/01/70 00:00      

Back to Subject List