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.

ATtiny85 I2C Master Code using USI?

Status
Not open for further replies.

xpress_embedo

Advanced Member level 4
Joined
Jul 5, 2011
Messages
1,154
Helped
161
Reputation
396
Reaction score
189
Trophy points
1,353
Location
India
Activity points
10,591
Hi!!
Can anyone share the code for ATtiny85 I2C/TWI using USI Hardware??
 

Thanks!!

I have found AVR310 Application note on Atmel website, and it is working properly.
http://www.atmel.com/images/atmel-2561-using-the-usi-module-as-a-i2c-master_ap-note_avr310.pdf

I am using Atmel Studio and the compiler which comes with it, i have to send some data from ATtiny85 to Arduino Mega2560 using I2C/TWI protocol.

My Arduino Mega 2560 will work as Slave device and i think, now it will work properly.

But the data to send to Arduino Mega 2560 comes from I2C Sniffing.

ATtiny85 Sniffs I2C data and send this data to Arduino Mega2560, now the problem is that, how to sniff data using ATtiny85.

I found a project of I2C Sniffer for ATtiny85
http://www.avrfreaks.net/projects/i2c-twi-sniffer

this projects works absolutely fine, without any problem, and it uses USI hardware to Sniff I2C data.

But the problem is that, the ports which this code is using is already used by the AVR310, so i can use only one at a time.
Is there any other way to Sniff I2C data using ATtiny85 using PB1 as SCL and PB4 as SDA.
I think i have to sniff I2C data using GPIO operations.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top