Pages: [1]   Go Down
Author Topic: Soft I2C library compatability  (Read 2845 times)
0 Members and 1 Guest are viewing this topic.
Wisconsin
Offline Offline
Edison Member
*
Karma: 4
Posts: 1001
I LOVE THIS STUFF!!!!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I was hoping to use some sort of soft I2C library to achieve I2C interface.  The thing is the application has limited space, so I can't use a 32U4 or a 328P.  I've been looking around and the 16U2 seems suitable except the fact that it doesn't have I2C embedded.  Do the soft I2C libraries work on the 16U2?
I was looking at this one.
http://extremeelectronics.co.in/avr-tutorials/software-i2c-library-for-avr-mcus/
Logged

Accelerate to 88 miles per hour.

Switzerland
Offline Offline
Faraday Member
**
Karma: 111
Posts: 5251
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Do the soft I2C libraries work on the 16U2?

It will probably work but if it works for you depends on what you want to use it for. It's only master capable, it cannot be a slave on the bus. I used a similar software I2C for one of my projects and it worked flawlessly. However if a device depends on some I2C features not implemented in the software version (clock stretching) you won't get happy.

Quote
The thing is the application has limited space, so I can't use a 32U4 or a 328P.

An ATtiny85 is smaller than the 16U2 and has built-in TWI (I2C). Isn't that an option?
Logged

Wisconsin
Offline Offline
Edison Member
*
Karma: 4
Posts: 1001
I LOVE THIS STUFF!!!!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

An ATtiny85 is smaller than the 16U2 and has built-in TWI (I2C). Isn't that an option?

I would although I also need USB functionality.  I think I'm going to use a 16U2 and test out the soft I2C workings.  If that doesn't work then I'll switch the driver that i'm currently using from its ssop package to its CSP package and use a 32U4 whilst finding a new fabricator that can make a board that has the capability of making boards with trace widths small enough to use a CSP package.
Logged

Accelerate to 88 miles per hour.

Offline Offline
Sr. Member
****
Karma: 7
Posts: 292
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Go get yourself a Digispark:

http://www.kickstarter.com/projects/digistump/digispark-the-tiny-arduino-enabled-usb-dev-board

http://digistump.com/#digispark

It employs a Attint85 and plugs into a USB cable.
Logged


Wisconsin
Offline Offline
Edison Member
*
Karma: 4
Posts: 1001
I LOVE THIS STUFF!!!!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I feel like we've detracted from the question.

Can that soft I2C library work on a 16U2?
Logged

Accelerate to 88 miles per hour.

Switzerland
Offline Offline
Faraday Member
**
Karma: 111
Posts: 5251
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Can that soft I2C library work on a 16U2?

Yes, it can, there's nothing in the code obviously speaking against it. I never tried it but you have a very good chance that it will run perfectly, so I would give it a try.
Logged

Wisconsin
Offline Offline
Edison Member
*
Karma: 4
Posts: 1001
I LOVE THIS STUFF!!!!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Awesome!
I'll give it a go and let you know if it works
Logged

Accelerate to 88 miles per hour.

Offline Offline
Newbie
*
Karma: 1
Posts: 39
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So does it?
Logged

Pages: [1]   Go Up
Jump to: