- What is this?
- Contents
- Supported devices
- References
A combination between an I2C master (a beagle bone) and an I2C slave (an AVR ATmega328 MCU). The I2C master is written in Python while the slave is in C and is compiled using WinAVR.
There is two folders with the following contents:
- Adafruit_I2C.py
- LEDs_Blink.py
- LEDs_OFF.py
- LEDs_ON.py
- main.c
- I2C_slave.c
- I2C_slave.h
- Makefile
The I2C library written by Adafruit, this is driver code for the I2C interface
This code will blink the LEDS on the slave ATmega328 PB0 and PB1
This code will turn OFF the LEDS on the slave ATmega328 PB0 and PB1
This code will turn ON the LEDS on the slave ATmega328 PB0 and PB1
This is a piece of example code which reads and writes on the I2C interface and is a proof of concept only
This file contains all the function declarations to setup and work with the TWI hardware peripheral inside the AVR. It takes care of the interrupt handling and receiving the bytes.
Make sure you add this source file to your Makefile!
This file contains the function prototypes
This file has to be included in your source file
Though I have only tested this library on an ATmega328P it should be running on all major ATmega AVRs which has built-in I2C
Additionally, the I2C master code ||should|| work on Beagle Board and Raspberry Pi, after changing the bus address (in BeagleBone it is 3, in R-Pi it is 0)
http://beagleboard.org/Products/BeagleBone
http://elinux.org/BeagleBoardUbuntu#Raring_13.04_armhf
https://help.ubuntu.com/12.04/serverguide/openssh-server.html
http://www.gigamegablog.com/2012/11/04/beaglebone-coding-101-i2c/
http://eshortcircuit.blogspot.ae/2013/06/atmega-has-got-new-friend-beaglebone.html