Component for 24FC04

Moderator: Benj

Post Reply
DirkB
Posts: 116
Joined: Wed Feb 08, 2012 2:45 pm
Has thanked: 7 times
Been thanked: 11 times
Contact:

Component for 24FC04

Post by DirkB »

Hello,

is a component for 24FC04 EEProm available

thank you

Dirk

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: Component for 24FC04

Post by LeighM »

Hi Dirk,
I think that the 24C16 component should work with a 24C04,
as long as you set the A1 and A2 pins low
(or add a matching offset to the Address value, A2 A1 would be equivalent to Address bits 10 and 9 of the 24C16)
Leigh

DirkB
Posts: 116
Joined: Wed Feb 08, 2012 2:45 pm
Has thanked: 7 times
Been thanked: 11 times
Contact:

Re: Component for 24FC04

Post by DirkB »

Hello Leigh,

thank you for your quik reply.are you sure?
The 24FC04 is a 16 bit eeprom. how can i
store 16 bit word to the 24C16?

thank you

Dirk

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: Component for 24FC04

Post by LeighM »

Can you post a datasheet for the device you are looking at?

DirkB
Posts: 116
Joined: Wed Feb 08, 2012 2:45 pm
Has thanked: 7 times
Been thanked: 11 times
Contact:

Re: Component for 24FC04

Post by DirkB »

Hello Leigh,

here the datasheet for the device.

http://ww1.microchip.com/downloads/en/D ... 01708L.pdf

regards

Dirk

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: Component for 24FC04

Post by LeighM »

Hi Dirk,
Thanks, that confirms what I thought.
In fact in that datasheet the A address pins are not connected, so no need to worry about them.
So, what do you mean by 16 bit? The 24C16 is the same interface as 24C04, but just has more memory/pages.
If you use the 24C16 component you just need to provide an address (between 0 and 0x1FF) and read or write the byte.
Regards,
Leigh

DirkB
Posts: 116
Joined: Wed Feb 08, 2012 2:45 pm
Has thanked: 7 times
Been thanked: 11 times
Contact:

Re: Component for 24FC04

Post by DirkB »

Hello Ligh,

i see, i was wrong. I mean you can write 2 pages 8 bit at once.
How can i write an 16 bit word into a 8 bit eeprom?

thank you

Dirk

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Component for 24FC04

Post by Benj »

Hi Dirk,
How can i write an 16 bit word into a 8 bit eeprom?
You simply split the 16-bit value up into two 8-bit values.

LSB = 16bitVar
MSB = 16bitVar >> 8

To recombine after reading from the EEPROM you would simply do this.

16bitVar = LSB + ( MSB << 8 )

DirkB
Posts: 116
Joined: Wed Feb 08, 2012 2:45 pm
Has thanked: 7 times
Been thanked: 11 times
Contact:

Re: Component for 24FC04

Post by DirkB »

Hi Ben,

thank you. quick work.

regards

Dirk

Post Reply