MK3EBNotes

From EvTechWiki

Jump to: navigation, search

Back to: MK3EB MK3EBNetworking

On implimentation

If all of this seems a little extreme - possibly too complex to be packed into a 16k program store microcontroller - that's because it might be. I've decided to start out by defining what my 'dream world' version of the MK3EB protocol would be, and also what the 'absolute minimum' needed to get the job done is. I figure at some point fairly soon (as of Jan 2007) I'll start writing code and then they'll intersect. In the meantime, it's kind of fun writing this fairly complex interlocking document that describes a network protocol that doesn't actually exist yet.

A lot of this protocol is based on the protocol I designed for the Tango version. I've tried to learn from the mistakes of that project, and I hope that this one will be somewhat easier to impliment. See Tango Differences for a list of the things that I am explicitly doing for MK3EB as a result of the things I learned doing the Tango version.

Linux & AVR-GCC

See MK3EBLinuxAvrGcc for notes about using avr-gcc under linux.

Size-testing approaches

One of the things I'm trying to determine the best approach to is length implimentation. I don't know why, but I'm really curious as to which of these three things would optimize best:

Possible Len code
Two lookup tables Seems wasteful
One lookup table, math to do the hamming version is how I'd be inclined to do it
Very small lookup table for the page read stuff, all else in code seems overcomplicated

After experimentation, I determined that the algorythm currently in packet.c optimizes the best under avrgcc.

Personal tools