Back to DRIVERS page

AVR UC3 Series Software Framework: Two-wire Interface Master (TWIM) Driver

Copyright © 2006-2009 Atmel Corporation

Introduction

The Two-wire Interface (TWI) interconnects components on a unique two-wire bus. The TWI is programmable as a master or a slave with sequential or single-byte access. Multiple master capability is supported.

 

TWIM Software Driver

This driver provides an API to get access to the main features of the TWIM controller.

 

Its "philosophy" of usage in single-master mode is:

  • Initialize the TWIM controller [twim_master_init()]
  • Test if a chip answers on a given TWI address [twim_probe()]
  • Read multiple bytes from a TWI compatible slave device [twim_master_read()]
  • Write multiple bytes to a TWI compatible slave device [twim_master_write()]

     

    The driver is composed of twim.c and twim.h (for accurate API description, read this header file).

     


    AVR is a registered trademark of Atmel Corporation.