Attiny44 I2C interface

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I m new to I2C, I was trying to implement it using attiny44 as master. I have following doubt:

When start condition is produced making the SCL pin high and SDA pin low, after that SCL should continue its operation as a clock pin, so how to switch from start condition to its clock operation?

 

Last Edited: Wed. Sep 13, 2017 - 03:02 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

-- That AVR model does not have a native TWI/I2C peripheral

-- It does have the USI; there are app note(s) on using that

-- If you want to bit-bang I2C, many will recommend starting with a known-good implementation.  In this case, "Fleury"...

http://homepage.hispeed.ch/peter...

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That rather raises the question of "why tiny44?" in the first place. If one of your chief design goals is using I2C then why did you pick a chip that does not have it? What else attracted you to tiny44? Perhaps other AVRS have its "must have" features" too but also have I2C?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
 If one of your chief design goals is using I2C then why did you pick a chip that does not have it?

Absolutely!!

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...