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.

I need I2C code (C code) urgently

Status
Not open for further replies.

mostafa_wahba

Newbie level 5
Joined
Nov 28, 2011
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,324
I'm using 2 Atmega16 MCUs and i want to interface between them using I2C
and i know the pins configuration but i don't know the code which i should write
can any one help me??
 

I'm using 2 Atmega16 MCUs and i want to interface between them using I2C
and i know the pins configuration but i don't know the code which i should write
can any one help me??

Application notes from Atmel:
http://www.atmel.com/dyn/resources/prod_documents/doc2564.pdf
**broken link removed**

Tutorials with code included for both master and slave operation:
How to use I2C-bus on the Atmel AVR Microcontroller | ermicroblog
Transforming your AVR Microcontroller to the I2C or TWI Slave I/O Expander Project | ermicroblog

Solved thread, I2C bit banging:
View topic - Program i2c on atmega16 problem :( :: AVR Freaks

Don't worry if some examples are using a different AVR and not ATmega16, all AVRs' TWI modules are similar to each other.

Hope this helps.
 
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top