NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Microcontroller Programming » I2C via interrupts define addresses for the Mega 168
September 11, 2011 by jstockma |
I am trying out the TWI I2C libraries and code. In the Master Code section there are two define statements assigning addresses to two variables. Nunchk and TWI328SLV_ADR. I would like to implement this code on the Mega 168. Can you tell me if the addresses would be different on the 168, and if so, where in the 168 data sheet would I find those addresses? I basically understand how the code works but I am not proficient on memory address assignments. Thanks, jstockma |
---|---|
September 11, 2011 by jstockma |
After looking at the C code some more,I see that these assignments are typical alias assignments and not memory address assignments. The slave address must be specified on both devices. |
September 12, 2011 by Rick_S |
If you are trying to interface a WII nunchuk, search the forum. There are full code examples available. One Nunchuk thread Rick |
Please log in to post a reply.
Did you know that signed numbers need to be sign-extended when chaging variable sizes? Learn more...
|