Author Topic: Smallest micro with i2c master interface  (Read 10001 times)

0 Members and 1 Guest are viewing this topic.

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: Smallest micro with i2c master interface
« Reply #25 on: July 27, 2016, 04:56:50 pm »
I2C is easy enough to bit-bash, so if you need small, pretty much anything will do
Not to mention that with bit banging you can save two pull up resistors,
No you can't. I2C relies on using the pull-up resistors.
So you use the built in pullup resistors, which are 95% disabled if you use hardware I2C. Also, clock stretching is something which rarely ever used, so why bother.
Don't underestimate the use of clock stretching! A while ago I diagnosed a problem for a customer. A microcontroller (with bit-banging I2C and no clock stretching support) queried an I2C slave chip regulary but only once in a while (=one hour or so) this went wrong. It turned out the I2C slave chip needed some more time every now and then so 0.2% of the I2C transactions failed. Unfortunately the use of clock stretching or delays was not specified anywhere in the datasheet. In other words: manufacturers implicitely assume I2C busses support clock stretching.
« Last Edit: July 27, 2016, 05:01:21 pm by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 7377
  • Country: nl
  • Current job: ATEX product design
Re: Smallest micro with i2c master interface
« Reply #26 on: July 27, 2016, 05:05:24 pm »
I2C is easy enough to bit-bash, so if you need small, pretty much anything will do
Not to mention that with bit banging you can save two pull up resistors,
No you can't. I2C relies on using the pull-up resistors.
So you use the built in pullup resistors, which are 95% disabled if you use hardware I2C. Also, clock stretching is something which rarely ever used, so why bother.
Don't underestimate the use of clock stretching! A while ago I diagnosed a problem for a customer. A microcontroller (with bit-banging I2C and no clock stretching support) queried an I2C slave chip regulary but only once in a while (=one hour or so) this went wrong. It turned out the I2C slave chip needed some more time every now and then so 0.2% of the I2C transactions failed. Unfortunately the use of clock stretching or delays was not specified anywhere in the datasheet. In other words: manufacturers implicitely assume I2C busses support clock stretching.
Care to share, what was the I2C slave, which used it? At least type?
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: Smallest micro with i2c master interface
« Reply #27 on: July 27, 2016, 08:45:35 pm »
I don't recall the exact type but it was a battery charge gauge chip from TI.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13747
  • Country: gb
    • Mike's Electric Stuff
Re: Smallest micro with i2c master interface
« Reply #28 on: July 27, 2016, 11:10:43 pm »
I don't recall the exact type but it was a battery charge gauge chip from TI.
Wonder if it's actually a preprogrammed MCU, which would explain the need for stretching - I recently fond that the Atmel AT42QT1070 capsense chip is just a preprogrammed ATTinysomething - first time I'd ever seen anything use clock stretching.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 7377
  • Country: nl
  • Current job: ATEX product design
Re: Smallest micro with i2c master interface
« Reply #29 on: July 28, 2016, 08:18:53 am »
I don't recall the exact type but it was a battery charge gauge chip from TI.
Wonder if it's actually a preprogrammed MCU, which would explain the need for stretching - I recently fond that the Atmel AT42QT1070 capsense chip is just a preprogrammed ATTinysomething - first time I'd ever seen anything use clock stretching.
Most I2C/SPI GPIO extenders from Microchip are programmed micros. Also, I suspect the USB-UART and other converters are just preprogrammed and marked PICs. But I suspect other manufacturers are doing the same. Maybe not to the extent, where you can reprogram it.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf