This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Wrong amout of bytes received from i2c read protocol

Other Parts Discussed in Thread: MSP430F2418

8204.i2c.h]

# Details ##########################

MSP430F2418 SMD

I2C-Protocol

# Error-Discription ##############################

I have wrote some function's that will receive a amout of bytes and write them to a array.

In the main.c : I While-loop this function. so i receive every 2 sec the "frame"- of bytes

The atributes of this function declares:

  • 1 - The Address of the slave,
  • 2-  The pointer to the first byte of the array 
  • 3-  The amout of bytes that needs to be received.

I have about 15 slaves that i want to receive a "frame"-of data,

# ERROR ##############################################

When i read the frame , it won't stop receiving bytes when the amount of data is been received.

(sometimes i works sometimes it won't....)

example.

slave #1 (15 bytes need) -> receive 15 bytes

 !!!! slave #2 (80 bytes need) -> receive 30 bytes

slave #3 (30 bytes need) -> receive 30 bytes

 !!!! slave #4 (45 bytes need) -> receive 60 bytes

slave #5 (205 bytes need) -> receive 205 bytes

Somebody, 

any sugestions what is wrong ?

**Attention** This is a public forum