On Nov 28, 2005, at 4:42 PM, Andre Abelian wrote: > output_bit(PS2_DATA_OUT, shift_left(data,1,0)); > I'm not familiar with the specifics of CCS, but... What is shift_left supposed to do, beyond "data = data<<1", and are you sure it is appropriate here? And does output_bit() output the low order bit, high order bit, or boolean of its second argument? (unless it's the high order bit, which seems unlikely (not C-like), then this isn't going to do what it probably needs to do for serial-like communications...) Finally, though I guess you're not there yet, it seems to me that this code is somewhat likely to execute too fast for reliable communications with most PC-like PS2 devices/computers. You'll probably need a delay before toggling the clock bit... BillW -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist