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.

eeprom clockin

Status
Not open for further replies.

louislu

New Member
hi

i m trying with ST M24C01-WBN6.This is a serial eeprom with 1k memory.according to it's data sheet, the fc shl b 400k for it's clock(SCL).would it b ok if i tune it for 333.33k or 500k.this is because the oscillator for my microcontroller is 24MHz.it is impossible to tune it for 400k exactly....I can only select either one.or can i use 100k...


here another question,As stated in data sheet, the 400k is only need to apply for high state(SCL) right? while low state is don care...m i right?

Thanks...
 
That 400kHz is the maximum frequency.
In other word, you can use any lower frequencies.
In I2C, the timing accuracy is not important, as long as it is within the range as stated in the specification.
 
k...thanks...tat means i can use 1k freq.The data sheet never specify the freq tolerence range but think shln't b any prob.n another ques is the 1khz is only applicable to high state of clock is it?because i have been reading on other sample programm n usually they did not take care of the low state timing...Thanks lot
 
The clocking, which is the SLD line, is controlled by the master.
I can program it in such a way that one high pulse width is, say, 5us, and the following pulse is 6us.
It doesnt really matter.

The datasheet state the maximum or minumum timing requirement. However, it is not always accurate.
I have written a prorgam that works fine with a 64K Atmel EEPROM, AT24C64. However, it failed to read/write 512K EEPROM, AT24C512, despite both timing diagram are almost identical as stated in datasheet.
So, I just added some delay, and it runs perfectly.
 
Hi...thanks

Below is part of my program,the oscillator for my controller is 24MHz.n the clocking for EEPROM is 1kHz.This program just simply transmit a 8-bit device select code for write operation...i donno y it jus cant works...I had connected the SDA n SCL to an open-drain I/O n tied to pull-up resistors.



ORG 100H
MAIN: MOV A,#10100000B
MOV R2,#08H
CLR P0.0 ;SDA
ACALL DELAY ;DELAY FOR 10 MACHINE CYCLE
CLR P0.1 ;CLK

LOOP: RLC A
JNC ZERO
SETB P0.0
LJMP NZERO
ZERO: CLR P0.0
NZERO: SETB P0.1
ACALL DELAY
CLR P0.1
DJNZ R2,LOOP
SETB P0.0
NOP
NOP
NOP
NOP
SETB P0.1
ACALL DELAY
JNB P0.0,CONTINUE
LJMP MAIN

DELAY: NOP
NOP
NOP
NOP
NOP
NOP
RET
 

Attachments

  • eeprom_833.jpg
    eeprom_833.jpg
    9 KB · Views: 382
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top