Quote Originally Posted by falingtrea View Post
Second you need to use the "define I2C_HOLD 1" because the MPC23016 pulls the clock low in order to signify it is not ready for the next byte of data.
Fallingtrea and Mr. E (hey that rhymes!) have helped me see the problem.

Mr. E noticed the enhanced bit set - this is REAL important - it screws stuff up. After that I actually had a waveform to look at. Then I noticed I wasn't getting ALL of my clock pulses only 3 chars worth. So I tried the DEFINE I2C_HOLD 1 from the book and Fallingtrea and that got all of my 4 chars of data clocked into the little sucker.

Also, Fallingtrea was also correct in that a zero addressed part is address $40 and NOT $20 as I had thought - it didn't work before due to the enhanced CPU masking everything.

I can now code myself into a corner and see how this thing really works.

Thanks guys, I knew it was simple but what an ordeal! I will have a sip of Rye in both of your honor later <grin>.

-Likin' coding once again!