TWI (I2C) slave example for ATxmega32A4U

It has taken me some time to understand how to write a slave driver for this chip so here is a simple example. Every byte received is written to port D so that it can be seen, and when a stop condition is detected all pins on port D are toggled. Reading data from it returns the next value of an 8 bit counter.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>