A while ago I mailed the list with some storage allocation macros and a threat to supply interested parties with code for I^2 C bus protocol communications and timed finite state machines. Part of that is done: but the code is moderately long so I suggest that you collect it, if you are interested from ftp.dai.edinburgh.ac.uk, file /pub/user/pic-utils.tar. You will find there the storage allocation macros I posted earlier, and some other useful macros, e.g. a configuration macro that supports defaulting for conditional compilation switches (the things that, when you forget to put /D xxx=1 on the command line, MPALC says something like "line 1: Crit" and crashes your machine ;-), as well as code for a multi-master I^2 C package supporting master transmit and slave receive with interrupt detection of start conditions (so your PIC doesn't have to spend all its time watching the bus). The individual files in the directory in the tar file contain more information. The finite state code will follow, as will other bits of the I^2 C stuff and a neat UNIX c-shell script that calculates all the register values for a PIC 16C71 given clock rate, RTCC tick rate desired, and descriptions of the pin functions (e.g. digital output, analogue input, digital tristate, etc.). I didn't manage to do this today, 'cos I've got to go on holiday in about an hour. The code is there for people in a hurry -- in a month there will be more. Have fun, John Hallam john@aifh.ed.ac.uk Dept. of Artificial Intelligence University of Edinburgh 5 Forrest Hill Edinburgh EH1 2QL