Testing I2C/TWI

Discussion around product based on ARM Cortex M4 core.

Moderators: nferre, ncollot

Posts: 12
Joined: Tue Dec 16, 2014 10:24 pm

Testing I2C/TWI

Mon Dec 29, 2014 6:16 pm

I've written a few lines of code to implement the ASF Wizard's I2C/TWI modules. I've included 'TWI - Two-Wire Interface (driver)' and 'TWI - Two-Wire Interface (Common API) (service)'. I'm using Atmel Studio 6.2.1502 SP1 and ASF Wizard v3.20.1. I'm pretty sure I have everything correct, but I'd like to test the code to be absolutely sure. Unfortunately, I only have 1 development board and hence 1 Atmel micro. I'm using the Atmel ATSAM4E16E on the Atmel SAM4E Xplained Pro dev board.

Is there any way to verify the I2C code? Normally I would just put the Master code on one chip and the slave code on another and connect them. But since I only have one chip, I was wondering if I could hook TWD0/TWCK0 to TWD1/TDCK1. But I think I'd have to make some changes for that to work. And the more I think about it, I don't think that would be feasible. Especially if I want to use interrupts over pulling. Any suggestions?

Return to “SAM4 Cortex-M4 MCU”

Who is online

Users browsing this forum: No registered users and 3 guests