Searching \ for ' [PIC] connect 16F873 to 24LC256 eeprom (' 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/microchip/memory.htm?key=eeprom
Search entire site for: 'connect 16F873 to 24LC256 eeprom ('.

No exact or substring matches. trying for part
PICList Thread
'[PICLIST] [PIC] connect 16F873 to 24LC256 eeprom ('
2000\09\08@140852 by staff

flavicon
face
Hi, I have been using PICs for a couple of years and I am pretty
confident with most stuff.
However I have never used I2C.

I have 16F873 PIC and need to connect to one or more I2C 24LC256
eeproms, to build a datalogging application. I have all the chip
datasheets.

Since the 16F873 has inbuilt I2C I thought it would be easy
to connect to the 24LC256, but the eeprom has a 15 bit address
(256kbit = 32kbyte) and all the data on the built-in I2C
in the 16F873 only talks about using the SSPBUF for sending
the address, and that is only one byte.

No mention is made of how to use the 16F873 inbuilt I2C
interface with any eeprom of this type, only "send one byte
address, transmit/receive one byte data" examples. This would
limit to addresses of 256bytes?? I have a 32kbyte eeprom!

Can I use the inbuilt I2C feature to give full access to
the 256kbit eeprom?? I will feel cheated if I bought two
Microchip products shat should connect but don't, leaving
me no alternative but to code up manual interfacing between
the two chips.

Thanks to anyone who can help.
Roman

--
http://www.piclist.com hint: To leave the PICList
spam_OUTpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu>

2000\09\08@151439 by Barry King

flavicon
face
Roman,

You asked:
> Since the 16F873 has inbuilt I2C I thought it would be easy
> to connect to the 24LC256, but the eeprom has a 15 bit address
> (256kbit = 32kbyte) and all the data on the built-in I2C
> in the 16F873 only talks about using the SSPBUF for sending
> the address, and that is only one byte.

I don't know anything about the '873, but if its got the MSSP, with
master mode built in, then its easy.

The data sheets for the EE show that you send three bytes, the I2C
chip address byte, then two bytes which are the EE internal address,
then the data.

So you'll load the chip address (usually A0 or A1, iirc), when that's
sent, then load the first address byte, when that's done, the second
address byte.  Then you load the data byte or bytes, one-at-a-time.

Its exactly like sending a multi-byte message on an asynch line using
a UART, you load the bytes one at a time, and they are sent.

I hope this helps.

-Barry.
------------
Barry King, KA1NLH
NRG Systems "Measuring the Wind's Energy"
http://www.nrgsystems.com
Check out the accumulated (PIC) wisdom of the ages at:
PIC/PICList FAQ: http://www.piclist.org

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam@spam@mitvma.mit.edu>

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