Optimize a serial protocol between two applications

Dec 20, 2012 21 Replies

The Object protocol used in Atmel's touchscreen parts is based on a 64 kB memory address space. At adress zero, there is a small descriptor containing the number of "objects" (among other things). Then there is an object descriptor table describing start address, size and type. If you do not recognize an object type you ignore it.

The firmware can thus change base addresses, and you can add more functionality, sometimes without updating the other end.

BR Ulf Samuelsson

If you want backward compatible, you have to work as you do now, using a slave answer version, and decision trees (if statements...)

However, you can simplify future version creep, if you can make newer slaves more message tolerant. eg they ignore messages or params they do not understand, _and_ also do not lose sync while doing so.

To enable slaves not lose sync, some length param is often included on longer messages. Then you need test only for (Version >= SmarterSlave), and your decision tree can stop growing a little ;)

-jg

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required