Post Go back to editing

How to use AD7998 with BeagleBone

Hello,

I use the AD7998BRUZ-0 with a BeagleBone Black  via I2C and want to read a simple battery-value via V_in_1-Pin.

But I don't know how to configure the control register with shell-commando "i2cset". To get the digital value a have to configure the control register for the next conversion signal but I don't know how.

Thanks!

Parents
  • Hi,

    this is what I don't understand. I have this commando "i2cset -y 1 0x22 Y_ X_"

    1: BB-I2C-1 Bus

    0x22: ADC-address

    Y_: which register to write

    X_: value

    I want to need V_in_1. For my project I also need the GPIOs for the start conversion signal and Buzy flag. But in "Mode 2" there is a possibility to use the ADC without conversion signal.For example I want to use adress pointer byte for Vin1: 1 0 0 0   0 0 0 0 == HEX 0x80.

    I tried this:

    >root@beaglebone:/# i2cset -y  1 0x22 0x80

    >root@beaglebone:/# i2cget -y  1 0x22 0x80

    result > 0x07

    But I am not sure if this is the right.

Reply
  • Hi,

    this is what I don't understand. I have this commando "i2cset -y 1 0x22 Y_ X_"

    1: BB-I2C-1 Bus

    0x22: ADC-address

    Y_: which register to write

    X_: value

    I want to need V_in_1. For my project I also need the GPIOs for the start conversion signal and Buzy flag. But in "Mode 2" there is a possibility to use the ADC without conversion signal.For example I want to use adress pointer byte for Vin1: 1 0 0 0   0 0 0 0 == HEX 0x80.

    I tried this:

    >root@beaglebone:/# i2cset -y  1 0x22 0x80

    >root@beaglebone:/# i2cget -y  1 0x22 0x80

    result > 0x07

    But I am not sure if this is the right.

Children
No Data