Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Questions about I2C protocol

Status
Not open for further replies.

simrantogether

Member level 1
Joined
Sep 11, 2007
Messages
41
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
1,527
Hi all,

I am having some doubts regarding I2C protocol after going through the tutorials.

Please answer:

1. The I2C slave device has fixed address by the manufacturer - or we have to assign it an address... if yes then how.

2. The only purpose of ' repeated start ' is only to take control of bus continuously by the master... Please confirm...

3. Can a non I2C enabled microcontroller drive the I2C bus with that ease.

Regards,

Simran..
 

i2c protocol not ack

1: A I2C device normaly has some free pins that can be tied high or low to set its address.

2:A reapeated start is used when reading data from a slave.

3:It is quite easy to write bit bang software to drive the I2C bus. Plenty of free sample code for that.
 

i2c protocol tutorial in pdf

simrantogether said:
Hi all,

I am having some doubts regarding I2C protocol after going through the tutorials.

Please answer:

1. The I2C slave device has fixed address by the manufacturer - or we have to assign it an address... if yes then how.

2. The only purpose of ' repeated start ' is only to take control of bus continuously by the master... Please confirm...

3. Can a non I2C enabled microcontroller drive the I2C bus with that ease.

Regards,

Simran..

1. Please refer to the datasheet. Every I2C slave device need a address for communication. Just like if you don't know your friend's house adress, you can't post the mail(information) to them.

2. Depend of the application.

3. Use IO pin to simulate the clock and the data.

eg: Turn "1" and "0" to generate the clock and data.
Then "read" the IO status for scknowledgement and data.

More information: https://en.wikipedia.org/wiki/I²C
 

i2c protocol wiki

I will answer according to my experience with I2C.

1.a) I2C memory devices have free pins for that can be tied to Vcc or ground. You need to read the datasheet of the device.
1.b) If the slave device is a microcontroller, you need to establish its I2C address in code.

2. Yes, the purpose for the repeated start is the one you has written. But, you may define your own network protocol based on I2C and you may give some other significance to repeated start.

3. Yes. You have to handle in the code the timing for clock, bits, start, re-start and stop conditions. But, as btbass said, there is a lot of code on Internet for this.

Good luck!
 

i2cin pakistan

what will happen if i assign a fastmode to the ics(like ds1307) that can work only in standard mode?
 

internet ic protocol i2c

hi

1->
if u take serial eeproms for example ,atmel24c series,the device address field consiste of 7 bits,+ 1 bit for read/ write signal
higher nibble is fixed i.e (1010) a in hexa decimal
where as rest of 4 bits have two purpose, bit0 is used for signaling write /read
u will use bit0 as 0 if ur writing slave device , or 1 when ur reading slave device
where as bit1 bit2 and bit3 are used to address the device as u have wired it for example 24c01 uses all 3 of bit1,bit2,bit3 u will have to hardwire the a0,a1,a2 pins of ic ,and give that particular combination to address ic, i.e if u have wired a0,a1,a2 as ground in hardware,u will use bit1,bit2,bit3 as 0,0,0 respectively.
confiquratoin of bit1,bit2,bit3 are different for 24C04 and others
PLZ check out DATASHEET.
Shakeel

2->repeated start condition may be even sent in conditions where u get not acknowlge from slave, for example u send the device address for writing and u get not ack from device u can send repeated start condition and send address again

3->there are so many example on net for soft I2c implementation
 

Re: I2C protocol

here u r a link
 

Re: I2C protocol

What should i do if WCOL = 1 happens when accidental write to SSPBUF occurs?
Should i wait until SSPBUF is free and re-write SSPBUF or..
do i have to initiate a START condition again?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top