Simple protocol for sending minimal length serial messages for devices using RS-232 directly or over USB. Messages are minimized by sending data as raw binary with only symbols 0xFF and 0xFE defined as special. 0xFF is the message start symbol and 0xFE is the escape symbol. Data values 0x00 to 0xFD are sent verbatim. Data value 0xFF is sent as byte pair 0xFE, 0xFD and 0xFE is sent as byte pair 0xFE, 0xFE.
Data messages are minimized by maximizing the common knowledge of the sender and receiver. The escape symbol followed with one or more bytes is used to create a 'hint' by the sender for how the receiver should interpret the following data bytes. Both sender and receiver have perfect knowledge of how hints should be interpreted, therefore only a minimal amount of data needs to be sent.
The message receiver is a state machine. When it receives 0xFF it resets its output buffer and waits for the message hint. The message hint is then used to select a function to receive the message.

Project Activity

See All Activity >

Follow simple_serial_protocol

simple_serial_protocol Web Site

You Might Also Like
Pimberly PIM - the leading enterprise Product Information Management platform. Icon
Pimberly PIM - the leading enterprise Product Information Management platform.

Pimberly enables businesses to create amazing online experiences with richer, differentiated product descriptions.

Drive amazing product experiences with quality product data.
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of simple_serial_protocol!

Additional Project Details

Registered

2023-03-12