Coming from an assembler and old-fashioned C background, I am struggling a bit with the new way of programming as in the software-framework that comes with the Xplain demo kit. Perhaps a kind soul can push me in the right direction to get me going?
My task is relatively simple: receive data via a TWI (slave) interface, using the Xplain demo board (Xmega128A1) and display that data on the Display Xplained screen. Refresh.
To that purpose I have wired the SDA to port F0 and SCL to port F1 (switch 1 and 2 on the demo board) to communicate with an external master (a mega328P, happily talking to other slaves already)
Using the Xplain-demo of the software-framework, I modified the app_font.c so it is ready to display the incoming data.
I have further found the TWI_example.c from the AVR1308 tutorial (doc8054) and related twi_slave_driver.c and .h
Here is the big question:
How do I combine/install/implement the TWI driver, so I can fetch the data and display it? How do I tell the driver to use the port F for TWI?
Any help/nudge/push in the right direction would be greatly appreciated.