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.

Connect two microcontroller together with I2C

Status
Not open for further replies.

feiutm9898

Full Member level 4
Joined
May 31, 2004
Messages
224
Helped
4
Reputation
8
Reaction score
0
Trophy points
1,296
Location
Singapore
Activity points
2,027
i2c microcontroller

Can show me some useful link with the project above?
 

conect i2c, microcontroller

feiutm9898 said:
Can show me some useful link with the project above?

Main problem is CPU that working as fast slave mode I2C ( with hardware I2C controller, or with fast Risc CPU as Ubicom (Scenix)).
 

i2c fail,pic

I think we have to implement I2C client protocol at the PIC MCU, rigth? Can answer me/??? :D
 

i2c connection 8051

As I remember pics with hardware i2c can act like master or slave.
If you don't have pic with hardware i2c you can implement it by software of cource
 

connecting two microcontroller+i2c

You'd better use SPI to link 2 mcu. some mcu have master and slave spi interface linke avr atmega series.
 

alex_ts said:
As I remember pics with hardware i2c can act like master or slave.
If you don't have pic with hardware i2c you can implement it by software of cource

Main problem is fast software slave i2c ......
 

hi danis,
"Main problem is fast software slave i2c ......"

Remember that while in slave mode, the speed of the S/W will not matter as it has to sample at the edges....
Thus a slave with edge ISR ( Ex: RB0 or RB4-Rb7 for PIC) will be a nice way to write the S/W.
And when using the MSSP in PIC, the speed is not configured as that byte is taken by the slave address register....
I have done a PIC to PIC communication with the peripheral and i had no problems with speed( but i think it is also easy with the ISR of the ports.)

:)
And remember I2C is recomended when u r switching the bus bet'n 2 masters..
Ex: when u want a common EEROM(24c64 etc...) and u want a communication link bet'n all the three..
:)
 

I did a project some time ago .A 8051 and a PIC would comunicate through a SOFT I2C /. The pic would handle ADC conversions and pass them to the 51 . also The PIC will be like a WATCHDOG for the 51. If the 51 would fail to reset the connection .The PIC would shut evrything down .Let me know if you need the code .. The pic part is in Assembler ..
The 51 is in C .. .
 

hi i am doing same project.i also want to know that hw to connect 2 microcontrollers using I2c and hw to address it?
thank u
 

Hi,

Poonam, you can find numerous application notes on I2C on internet. It's a two wire interface to connect two devices. You can find about I2C in datasheets of microcontrollers also which supports I2C. Even older posts of this forum will be useful to you. First understand the I2C protocol then go for the code. This link might be useful to you.

NIKS

Added after 1 minutes:

Sorry, forgot to paste the link



NIKS
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top