Quantcast
Channel: MSP low-power microcontroller forum - Recent Threads
Viewing all articles
Browse latest Browse all 22233

Slave I2C example not working

$
0
0

Hi Folks,

I have an MSP430G2452 on a MSP430 LaunchPad. I have loaded an example project from MWPWare named msp430g2xx2_usi_08, i.e. slave I2C USI to receive a single byte. There does not appear to be a version number in the example code but it is dated December 2010. I have not changed or added any code in this example.

To transmit to the IC I have a USB to I2C device that is known to behave correctly. I use this device to transmit to the MSP430 slave, at variety of clock frequencies, sending an address of 0x48 with a 0 write bit, supposedly followed by a data byte of 0x00. 

I say "supposedly" as the MSP430 slave device has never acknowledged the address so I've not got as far as transmitting data bytes. I have tried multiple slave devices of the same type. The levels and signals on the SDA & SCL lines are consistently good and correct.

I have started to attempt to fix this but have had no joy so far, my first alteration was to change ln # 98 `P1DIR = 0xFF;`to read `P1DIR = 0x80;` but I am unsure at the moment of how the output pins are muxed and if the P1DIR has effect while the USI is enabled on the relevant pins (I'm new to the MSP430). Either way this has had no effect.

I start now to go through every line to check each setting is correct. Have I done something wrong? Is this example known to be incorrect (I have also tried briefly with the multi-byte slave receiver example with the same result)? Is there some peculiarity of the example that it is expected to run only with another MSP430 using the accompanying master transmit example rather than any standard I2C signalling?

Many thanks, T


Viewing all articles
Browse latest Browse all 22233

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>