-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 - ----- Original Message ----- From: "Jinx" To: Sent: Thursday, August 01, 2002 3:14 PM Subject: ]PIC]: F877 I2C module > Does anyone have simple, repeat simple, code to show > setup and operation of said module to read / write bytes > to an EEPROM ? Examples I've found so far are convoluted > over-blown state machines for multi-device systems that are > way OTT for my needs. So much use of collision and error > routines I found it hard to pick out the basics. Normally I'd > nut it out myself but I've read that some examples (MC in > particular) aren't worth the screen they're printed on, so I'd > rather not waste time on published code that doesn't work > > TIA Ya got the left bracket backwards ont he original post. I've not used the I2C module yet, however, it was my understanding that much of I2C is contained within the hardware. I suspect that it's primarily interrupt driven. From the I2C datasheet, I understand that all contention detection and arbitration is done in hardware. My best advice for you at this point is to go through the datasheet for the 877 and set up what needs to be setup step by step. After that, I believe that you could do it based on interrupts. If it's only a 2 device bus, it should be easy to get everything working. I recommend reading up on I2C, which you can do at the Philips website (grab the I2C spec from their buses section). I expect someone else will give you more useful information - --Brendan -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 6.5.8 for non-commercial use iQA/AwUBPUnBNwVk8xtQuK+BEQLWFwCfV53KR/SuueoMjvhRxCSvGmTwJccAnA4c 6aHB7/oQF+gz2i9S611Irg3O =qn8q -----END PGP SIGNATURE----- -- 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