linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: bhupinder sahran <bhup_sah@yahoo.com>
To: Keith Outwater <Keith_Outwater@mvis.com>,
	linuxppc-embedded@lists.linuxppc.org
Subject: Re: Problems with I2C reads
Date: Sat, 3 Aug 2002 13:06:25 -0700 (PDT)	[thread overview]
Message-ID: <20020803200625.52603.qmail@web20703.mail.yahoo.com> (raw)
In-Reply-To: <668950F487446B4FB0CEAE9760FD2D620BE6B3@taurus.primary.local>


hi

I think u r missing onr thing.

sequence should be like this


> Start signal
> Slave address (r/w/ bit = write)
> Register address
> Start signal
> Slave address (r/w/ bit = read)
> Read register data
>NO ack.......................u have to give
> Stop signal


Try to give No ack after reading the register data.

bye
Bhupi
Deep  into silicon with Linux.....
www.gdatech.com

--- Keith Outwater <Keith_Outwater@mvis.com> wrote:
>
> Greetings all -
>
> I am trying to talk to an I2C device (Analog Devices
> AD9888) using the
> MPC860 CPM I2C interface from userland.
> Writes work fine, but the chip requires a strange
> write-read sequence
> for reading back registers.  For example, to read a
> register:
>
> Start signal
> Slave address (r/w/ bit = write)
> Register address
> Start signal
> Slave address (r/w/ bit = read)
> Read register data
> Stop signal
>
> Note that there is no stop between the write and the
> read.  If you put a
> stop in, the chip will not acknowledge the read, so
> using /dev/i2c-0
> with write() and read() does not work.
>
> I tried using the ioctl() interface and passed
> I2C_RDWR to try to
> suppress the stop command between messages, but it
> does not seem to work
> (checked it on a scope).
> I looked at the ioctl() handler for I2C_RDWR and it
> was not clear to me
> whether that particular ioctl option should work
> with a write-read
> sequence or not.  As far as I can tell it does not
> work.
> I looked for other ways to do this, but found
> nothing.
>
> Has anyone used I2C like this before? Any hints or
> suggestions?
>
> Thanks!
> Keith
>
> Keith Outwater
> Senior Staff Engineer
> Microvision, Inc.
> (425) 415-6693
>
>
>


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2002-08-03 20:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-02 20:36 Problems with I2C reads Keith Outwater
2002-08-03 20:06 ` bhupinder sahran [this message]
2002-08-05  6:27 ` Murray Jensen
  -- strict thread matches above, loose matches on Subject: below --
2002-08-05 17:39 Keith Outwater
2002-08-06  4:59 ` Murray Jensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020803200625.52603.qmail@web20703.mail.yahoo.com \
    --to=bhup_sah@yahoo.com \
    --cc=Keith_Outwater@mvis.com \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).