I2C write packet HELP

Discussion in 'Embedded Systems and Microcontrollers' started by RoboticFan87, Mar 8, 2010.

  1. RoboticFan87

    Thread Starter Member

    Sep 12, 2009
    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)

    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)
  2. n9352527

    AAC Fanatic!

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

    Thread Starter Member

    Sep 12, 2009
    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.