I've just written a small library using GCC to do serial comms on a Mega 8: did it both for the kicks of it, to get something much smaller than PRINTF would give me and to get to know my hardware better [wait, that's three reasons, not two?!].
Functions are "write control registers", "direct putchar", "direct getchar", and with buffers enabled I have "getchar", "putchar", "getstring" and "putstring".
1: How large should such a code be? I get something around 800 bytes with a minimal program that has all library enabled but just transmits a word repeatedly.
2: Where can I get a super-compact but easy to use library to do this kind of stuff [im not looking for anything fancy and fearture-rich like PRINTF]
3: To the Code-Gurus, is initalization needed in GCC? Some people claim you can do without it, but I still initialized variables which needed to start always from zero. Is this a waste of space or cant i do otherwise?
4: What's the best library to use for TWI communications with only the most essential bits, such as sendStart, sendStop, sendByte, ReceiveByte??? Will be used with my AVR as the only bus master possible. I would try roll my own [gutsy, huh?], but I'm afraid I wouldn't win first prize for efficiency!
Greatly appreciate all your help - this forum has been invaluable for me!
NxP - addicted 2 engineering