This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Using 1024K Memory on I2C

Hi All,
Could some one please help me out in the way as to how to read from a 1024K mem.
I am using 512K at the present moment using the operation below.


do{
    GoMaster(addr);             // set address
    if(NoAck==1)SendStop();     // if no acknowledge, end transaction
  }while (NoAck==1);

	SendByte((b_num & 0xff00)>>8);
	SendByte((b_num & 0x00ff));
	SendByte(dat);
	SendStop();

Where I am getting confused is the size of 1024 is 0x20000 so what dose the P0 bit signify the MSB i.e. the single first bit and then the rest of the code and how should I implement it? (16 bit against 17 bit)

This is what I got from the datasheet.

To select a data word in the 1024K memory requires a 17-bit word address.
The word address field consists of the P0 bit of the device address, then the most significant word address followed by the least significant word address
A write operation requires the P0 bit and two 8-bit data word addresses following the device address word and acknowledgment.

Thank you
ajay

Parents
  • Hi Mike,

    I had understood that but what i did not know was where to send it.

    But I found that out from some article that it is to be sent along with the 8 bit address word which contains A1 and then the rest of the sixteen bits as normal in 512.

    Thank you for your help
    Ajay

Reply
  • Hi Mike,

    I had understood that but what i did not know was where to send it.

    But I found that out from some article that it is to be sent along with the 8 bit address word which contains A1 and then the rest of the sixteen bits as normal in 512.

    Thank you for your help
    Ajay

Children