chrisp

Members
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About chrisp

  • Rank
    Newbie
  1. chrisp

    I2C Questions

    I am trying to interface with a STM microcontroller via Labjack, I know the I2C works due to testing with an Aardvark. However when I try to send data over the Labjack I am unable to send the data payload. There must be something wrong with my code, but browsing the limited docuemntatyion on the matter yielded little fruit. Any help would be apprictated. Thanks! My Code: using("device.labjack.") try include("c:\program files (x86)\labjack\drivers\labjackud.h") catch() include("c:\program files\labjack\drivers\labjackud.h") endcatch global ID = 0 ePut(ID, LJ_ioPIN_CONFIGURATION_RESET, 0, 0, 0) AddRequest(ID, LJ_ioPUT_CONFIG, LJ_chI2C_ADDRESS_BYTE, 0x62, 0, 0) AddRequest(ID, LJ_ioPUT_CONFIG, LJ_chI2C_SCL_PIN_NUM, 0, 0, 0) AddRequest(ID, LJ_ioPUT_CONFIG, LJ_chI2C_SDA_PIN_NUM, 1, 0, 0) AddRequest(ID, LJ_ioPUT_CONFIG, LJ_chI2C_OPTIONS, 1, 0, 0) AddRequest(ID, LJ_ioPUT_CONFIG, LJ_chI2C_SPEED_ADJUST, 0, 0, 0) GoOne(ID) numWrite = 2 array[0] = 0x07 array[1] = 0xd0 AddRequest(ID, LJ_ioI2C_COMMUNICATION, LJ_chI2C_WRITE, numWrite, array, 0) AddRequest(ID, LJ_ioI2C_COMMUNICATION, LJ_chI2C_GET_ACKS, 0, 0, 0) GoOne(ID) Scopeshot of the resulting transaction