TinyWireMCP23008 – MCP23008 library for ATtiny85 microcontroller

Summary of TinyWireMCP23008 – MCP23008 library for ATtiny85 microcontroller


The article details the TinyWireMCP23008 library, which enables an ATtiny85 microcontroller to communicate with an MCP23008 I2C port expander. It confirms compatibility at 8 MHz and discusses potential frequency limitations for fast bus mode. The text outlines necessary hardware components and references a GitHub repository for configuration adjustments regarding different clock speeds or operational modes.

Parts used in the TinyWireMCP23008 Project:

  • ATtiny85 microcontroller
  • MCP23008 I2C port expander
  • 330Ω resistor
  • Two 4.7kΩ resistors (pull up resistors for I2C lines)
  • A LED

If you want to know more…

If you want to know more about ATtiny85 microcontroller and how to upload sketches to it, you may have a look to ATtiny85 vs ATmega328.

TinyWireMCP23008 - MCP23008 library for ATtiny85 microcontrollerAbout

TinyWireMCP23008 was tested (and works) with a 8 MHz ATtiny85 and I2C standard bus mode and I2C fast bus mode.
TinyWireMCP23008 was not tested with ATtiny85 other frequencies, but should work (I can’t guarantee that fast bus mode will work with a 1 MHz ATtiny85).

If you need to use this library on an ATtiny85 which is not running at 8 MHz, or don’t want/need to use fast mode, all details on how to change theses settings are into the README.md file on GitHub repository.

TinyWireMCP23008 should work with other ATtiny microcontrollers.

TinyWireMCP23008 provides an example sketch to show how to use the library.

TinyWireMCP23008 - MCP23008 library for ATtiny85 microcontroller SchematicRequirements

Example provided with TinyWireMCP23008 use few items:

  • An ATtiny85 microcontroller.
  • An MCP23008 I2C port expander.
  • A 330Ω resistor.
  • Two 4.7kΩ resistors (pull up resistors for I2C lines).
  • A LED.

 

For more detail: TinyWireMCP23008 – MCP23008 library for ATtiny85 microcontroller

Quick Solutions to Questions related to TinyWireMCP23008:

  • What frequencies is TinyWireMCP23008 tested with?
    The library was tested with an 8 MHz ATtiny85 using standard and fast bus modes.
  • Can I use this library on an ATtiny85 running at 1 MHz?
    It should work but fast bus mode is not guaranteed at that frequency.
  • Where can I find instructions to change settings for non-8 MHz operation?
    All details are located in the README.md file on the GitHub repository.
  • Does TinyWireMCP23008 support other ATtiny microcontrollers?
    Yes, it should work with other ATtiny microcontrollers besides the ATtiny85.
  • What items are required for the example sketch?
    You need an ATtiny85, MCP23008, a 330Ω resistor, two 4.7kΩ resistors, and a LED.
  • How do I access more detailed information about this project?
    More detail is available via the link to TinyWireMCP23008 - MCP23008 library for ATtiny85 microcontroller.
  • Is fast bus mode supported at all frequencies?
    Fast bus mode was only tested at 8 MHz and cannot be guaranteed at other frequencies.
  • What type of bus modes does the library support?
    The library supports I2C standard bus mode and I2C fast bus mode.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter