Hi ! (and sorry for the the "long blah blah", I'm working on that...) Jamie Jensen wrote : > I've been reading thru the app notes on Mchip website, and > found some sample code for I2C, but it I don't think its > quite what I am looking for. I have a F877 that I need to > run in master mode only, tied to a phillips 9554 Now, what you *are* talking about is the PCA9554, right ? If it's not, hit delete here... > where half > the I/O is input, the other half of course is output. > In doing the research, Using the actual data sheet for this device ? > if you setup the MSSP for I2C (rather > than spi) and to talk to the 9554, you always need to send > out the address, Yes > then the command. It depends... > Does the 9554 always > expect that in that order? In other words, if I want to only > read from the device, do I always have to send out > address yes > ,command no > , and then I can read? Why ask about something that is perfectly clear from the data sheet ? It's only 15 pages long and the answer to your question is expressed in just 2-3 sentences and using two figures to make it clearer. But why not check for yourself at : http://www.semiconductors.philips.com/acrobat/datasheets/PCA9554_9554A_5.pdf > If someone has some sample code in asm that they have used in > the past for a similar device that would help No, sorry... And note, I have never *used* this device, this is based from a 45 second browse of the data sheet, so I might be wrong :-) But this device looks as a fairly easy part from a I2C standpoint, after looking in the data sheet. Jan-Erik. This communication is confidential and intended solely for the addressee(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you believe this message has been sent to you in error, please notify the sender by replying to this transmission and delete the message without disclosing it. Thank you. E-mail including attachments is susceptible to data corruption, interruption, unauthorized amendment, tampering and viruses, and we only send and receive e-mails on the basis that we are not liable for any such corruption, interception, amendment, tampering or viruses or any consequences thereof. -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu