> Has anyone had any difficulties using I2C with the CCS C compiler? I've > been trying to get communications working but the system doesn't seem to > be very stable. Sometimes I'll get an address byte and then data and > sometimes I'll just get the address. > > I'm looking for something weird in the compiler itself. If other's have > had no problem getting it to work with CCS compiler than there must be > something i'm doing wrong. There are definitely a few issues with Micrchip's implementation of IIC, and you have to do things just right on your end too. I ran into one of those just recently myself. However, I don't want to waste time getting into these issues when there is a compiler getting in the way. If you're not sure where the fault lies, separate the potential sources as much as possible. Get it working in assembler first, then switch to compiled code if you ultimate aim is to have it working that way. At least you'll know whether it is a true IIC problem or a compiler issue. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics