AT24C512 partial write allowed

Hi,

Need your help

I am using atmega128 microcontoller interfacing it with at24c512(i2c bus). The code is running and i am getting data . But i am not able to write/read more then 2 pages(128 bytes per page) at a time.not getting where i m going wrong.

Reply to
tanu
Loading thread data ...

Hi,

Need your help

I am using atmega128 microcontoller interfacing it with at24c512(i2c bus). The code is running and i am getting data . butt i am not able to write/read more then 2 pages(128 bytes per page) at a time. i amnot getting where i m going wrong.

// 2 Wire Bus initialization // Generate Acknowledge Pulse: On // 2 Wire Bus Slave Address: 00h // General Call Recognition: Off // Bit Rate: 400kHz // 307.692 kHz// 200.000 kHz TWBR=0x0C;//0x05;//0x0C; TWAR=0x00; TWCR=0x44;

ptrom=0x0000; delay_ms(1); ////wanted to write 8 page or the 512 page all together ///////////////// writing 2 page twi2ctransmitdata(0xA0,0,0); twi2ctransmitdata(0xA0,128,1);

////wanted to read 8 page or the 512 page all together ///////////////// reading 2 page twi2crecievedata(0xA0,0); for(j=1;j

Reply to
tanu

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.