What if you need to share multibyte data between 'task' and interrupt level code, and you are not allowed to disable interrupts AT ALL. Given: The 2-byte variable 'shared_var'. Problem 1: We want to guarantee that interrupt level can always get a 'reasonably current' and consistent value of the variable as set by task level. (ie: value is never written by interrupt level code) Problem 2: We want to guarantee that task level can always get a 'reasonably current' and consistent value of the variable as set by interrupt level. (ie: value is never written by task level code) (hint this is rather easy) Problem 3: We want interrupt and task level both to be able to write to the variable, and always get a 'reasonably current' and consistent value of the variable. (ie: value is written by both task level and interrupt level code) (this is rather tricky) Criteria: Minimum extra RAM locations used. Minimum amount of code. Have at it! Bob Ammerman RAm Systems (contract development of high performance, high function, low-level software) -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! use mailto:listserv@mitvma.mit.edu?body=SET%20PICList%20DIGEST