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
  • I tried this on:

    root@beaglebone:/# i2cdetect -y -r 1

          0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

    00:          -- -- -- -- -- -- -- -- -- -- -- -- --

    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

    20: -- -- 22 -- -- -- -- -- -- -- -- -- -- -- -- --

    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

    50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

    70: -- -- -- -- -- -- -- --

    Set adress pointer register to conversion result register

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

    read 2 bytes
    root@beaglebone:/# i2cget -y 1 0x22 0x00 w

    0xb80f

    I have a 1,5V battery on pin Vin_1 (0x80).

    I also tried this solution to write to config register and read this value but it doesn't work.

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

    root@beaglebone:/# i2cset -y 1 0x22 0x02 0x0a

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

    What can I do to read my analog voltag on Vin_1?

Reply
  • I tried this on:

    root@beaglebone:/# i2cdetect -y -r 1

          0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

    00:          -- -- -- -- -- -- -- -- -- -- -- -- --

    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

    20: -- -- 22 -- -- -- -- -- -- -- -- -- -- -- -- --

    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

    50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

    70: -- -- -- -- -- -- -- --

    Set adress pointer register to conversion result register

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

    read 2 bytes
    root@beaglebone:/# i2cget -y 1 0x22 0x00 w

    0xb80f

    I have a 1,5V battery on pin Vin_1 (0x80).

    I also tried this solution to write to config register and read this value but it doesn't work.

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

    root@beaglebone:/# i2cset -y 1 0x22 0x02 0x0a

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

    What can I do to read my analog voltag on Vin_1?

Children
No Data