I2C write packet HELP

Thread Starter

RoboticFan87

Joined Sep 12, 2009
38
Hi guys, I need help with one of the I2C functions.
I want to have an I2C write function that can write a packet of bytes instead of one byte data. Anyone did that before?..

Having problems writing the I2C_write_packet(two arguments passed)

Example:
buffer[2];
buffer[0] = 0xF0; (an address for a command)
buffer[1] = 0xFE; (another address for a command)

I2C_write_packet(buffer,2); (2 is the length of the array)
 

n9352527

Joined Oct 14, 2005
1,198
Not without knowing what is your target controller, the compiler you are using and what is the specific problem you are encountering.
 

Thread Starter

RoboticFan87

Joined Sep 12, 2009
38
Oh sorry. :)

Im using PIC32 to interact with a control chip (DS2482-800). Some ID chips (DS2401) are connected through 1-wire communications to the control chip. So My pic32 acts as a host to get the unique ID 64 bytes of the ID chips.

Im using MPLAB as a compiler using C language.
 
Top