Searching \ for 'I2C Master Question' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/i2cs.htm?key=i2c
Search entire site for: 'I2C Master Question'.

Truncated match.
PICList Thread
'I2C Master Question'
1998\11\13@011658 by keller

flavicon
face
>From what I understand in order to implement an I2C master I must do it
completely in software?  Are any of the interrupts SSP interrupts going to
be of any help?  Please give me any suggestions or comments.  I am trying to
talk to a serial EEPROM and a Real Time Clock.  Thanks in advance.

Steve Keller

1998\11\13@015720 by Tjaart van der Walt

flavicon
face
Steven Keller wrote:
>
> >From what I understand in order to implement an I2C master I must do it
> completely in software?  Are any of the interrupts SSP interrupts going to
> be of any help?  Please give me any suggestions or comments.  I am trying to
> talk to a serial EEPROM and a Real Time Clock.  Thanks in advance.
>
> Steve Keller

The hardware 'support' for I2C is more of a pain in the ass than anything else.

Are you using 7 bit addressing only? I presume you are using a Philips RTC.
Remember to use a EEPROM that you can set the A0,A1,A2 on the pins.
If you are going to use a 10-bit EEPROM and a 7 bit RTC, here are my 2c :
1) Remember the A0,A1,A2 must be different because the I2C device address
  is the same for the RTC and memory (1010).
2) The MSB of the first address byte (after the command byte) in 10 bit
  addressing, is a no-care bit. Use this bit to indicate to your I2C
  routine whether it should use 7bit addressing, or 10bit addressing.
  Effectively you change the start address of the EEPROM to 0x1000.

       

--
Friendly Regards          /"\
                         \ /
Tjaart van der Walt        X  ASCII RIBBON CAMPAIGN
spam_OUTtjaartTakeThisOuTspamwasp.co.za  / \ AGAINST HTML MAIL

|--------------------------------------------------|
|                WASP International                |
|R&D Engineer : GSM peripheral services development|
|--------------------------------------------------|
|SMS .....tjaartKILLspamspam@spam@sms.wasp.co.za  (160 chars max)|
|     http://www.wasp.co.za/~tjaart/index.html     |
|Voice: +27-(0)11-622-8686  Fax: +27-(0)11-622-8973|
|          WGS-84 : 26¡10.52'S 28¡06.19'E          |
|--------------------------------------------------|

1998\11\13@051638 by keithh

flavicon
face
Steven Keller wrote:

> order to implement an I2C master I must do it completely in software?

Yes.

> Are any of the interrupts SSP interrupts going to be of any help?

No.

> Please give me any suggestions or comments.

I2C master behaviour involves carefully clocking bits in or out.
This only takes >= 10 us/bit, it's quite sensible to do it
in software. It's not like a 1200 baud UART where you
would not want to spend CPU time in UART timing loops.

I2C slave behaviour is a lot harder.

> I am trying to talk to a serial EEPROM and a Real Time Clock.

No great problems there. Serial EEPROMs puzzled me for a while,
they can get into a confused state if you don't stick to the I2C
spec and NACK the last byte.

Keith.

1998\11\19@131158 by keithh

flavicon
face
Steven Keller wrote:

> order to implement an I2C master I must do it completely in software?

Yes.

> Are any of the interrupts SSP interrupts going to be of any help?

No.

> Please give me any suggestions or comments.

I2C master behaviour involves carefully clocking bits in or out.
This only takes >= 10 us/bit, it's quite sensible to do it
in software. It's not like a 1200 baud UART where you
would not want to spend CPU time in UART timing loops.

I2C slave behaviour is a lot harder.

> I am trying to talk to a serial EEPROM and a Real Time Clock.

No great problems there. Serial EEPROMs puzzled me for a while,
they can get into a confused state if you don't stick to the I2C
spec and NACK the last byte.

Keith.

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...