Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 May 2019 12:49:39 +0200
From:      Per Hedeland <per@hedeland.org>
To:        Prasad M <mprasad9689@gmail.com>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: FreeBsd I2C utility gives same value as MSB and LSB from DS75 sensor 16bit register.
Message-ID:  <0360da02-b4c2-b1be-3e72-2bf5f106ee91@hedeland.org>
In-Reply-To: <CAHp9zCky5dVLfUUJqhE9jNM3Fm%2BCL-aW-Zc9gfWFRz55k4KB8w@mail.gmail.com>
References:  <CAHp9zCky5dVLfUUJqhE9jNM3Fm%2BCL-aW-Zc9gfWFRz55k4KB8w@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2019-05-03 13:43, Prasad M wrote:
> Hi Folks,
> 
> I am trying to access a DS75 I2C temperature sensor. It kind of works with
> the default i2c utility. But it returns twice the high byte instead of the
> high and low byte for the temperature. Probably because it does 1 byte
> reads on the I2C bus, sending a stop condition after every byte.
> 
> The device expects continuous reads and no stop/start in between the 2
> bytes. Trying all options i2c, most notably the -m mode switch, yields the
> same results all the time. Looking at the code in i2c.c
> 
> Could any one help to solve this problem with working I2CRDWR utility.

Hm, it's not entirely clear to me what you're asking for, but if it is
a variant of i2c(8) that uses the I2CRDWR ioctl for data transfers,
you can find one at https://github.com/vzaigrin/newi2c - note the
comments/caveats though. FWIW, it worked fine for me when figuring out
the ads1015 AD converter (after which I wrote my own "dedicated" code
for that, using I2CRDWR).

--Per



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0360da02-b4c2-b1be-3e72-2bf5f106ee91>