Hi. I’m trying to get TWI working between a Mega (master) and a 328/Duemilanove (slave). I get no response from the slave. I even tried using the examples in the Wire library as-is, and get nothing. I know communication is good from the PC to each board, because I put in Serial.println(“Starting”) signals in both, and they do display.
I happen to also have a second Duemilanove (can’t have too many of these guys…), and when I used that as the master, it worked fine.
I know I’m compiling correctly with the Mega (selecting that as the target board), and using the right COM port (as I said, the serial prints show up).
For connections, I have Mega pin20 <-> Due’s A4, and mega’s 21 <-> Due’s A5 as the documentation says. I also connected the grounds. I noticed on one blog, they also connected the +5V’s, but that made no difference (and seemed odd).
Do I need to include resistors when using the mega? I didn’t use any when successfully connecting the two Due’s, so didn’t think I needed them with the Mega either.
I’d post my code, but like I said, the verbatim Wire library examples are what I used, successfully for two Due’s, but not for Mega/Due.
Any ideas? I know “nothing happens” is a reeeeeally lousy problem description, but any ideas would be welcome. Thanks.