Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Bug with the IIC

Status
Not open for further replies.

Jeff1111

New Member
Hello,
I have programmed a uC MC9S08QG8. I try to communicate with a EEPROM 24LC04B/P, but I can write and Read only when I'm on step by step (sure). When i let the program going to his own speed, something don't work:confused:. I have look after the speed of transmission, but nothing hapened. No errata, what else?
And It works in step by step!!!:mad:
Any idea?
 
I2C should only run at 400kHz. is your micro generating the I2C bus too fast? Also have you allowed 10ms for the EEPROM to program? Most people (including me) forget this step and when you go to read back the EE memory it comes out as FFs
 
I2C should only run at 400kHz. is your micro generating the I2C bus too fast? Also have you allowed 10ms for the EEPROM to program? Most people (including me) forget this step and when you go to read back the EE memory it comes out as FFs

No, it's not! I have try with many different speed.

What do you mean by that? when I start the uC? Or between a write and a read?
 
The datasheet should tell you the minimum write time for the E2. Normally you give it your address then your data, then you have to wait at least 6ms for the internals of the E2 to actually program the memory location, so you need to implement a delay after each write cycle
 
You mean this time: Bus free time: Time the bus must be free before a new transmission can start "Min 1300ns" -> 1.3us???
 
It works! I put a delay of 100us after each transmission and it was ok! Thank you for all! have a good day!:)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top