From: Jerry Van Baren <gerald.vanbaren@ge.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] I2c imd/imw for a digital potentiometer?
Date: Tue, 01 Sep 2009 14:22:13 -0400 [thread overview]
Message-ID: <4A9D6655.4060503@ge.com> (raw)
In-Reply-To: <3d1967ab0909011050r6bb01a2ey18345615443e2d29@mail.gmail.com>
Brian Hutchinson wrote:
> Hi all,
>
> I'm a little stumped as to how to write to a EEPot with the imw command.
>
> The EEPot is a Maxim 5434 and has an address of 0x28. To write to its
> volatile or non-volatile register ... a command byte is given.
>
> Writing 5 bits of data (it is a 32 tap pot so that is where the 5 bits come
> from) to move the wiper goes something like this:
>
> Start, 0x28, Ack, Cmd byte, Ack, Data byte, Ack, Stop
>
> Cmd byte is 0x11 to write to volatile reg. 0x21 to write to non-volatile
> reg.
Looks pretty standard if you map "cmd byte" to "register".
> The EEPROM really doesn't have addresses/offsets so I tried:
>
> imw 28 11 80 1
What is the trailing '1' here? Or is the '80' bogus?
I would expect this to work. The i2c command defaults to a one byte
register offset. To write a 0x80 byte to register (aka command) 0x11,
you want to do this:
imw 28 11.1 80
which should be the same as this:
imw 28 11 80
> imw.w 28 0.0 1180
That seems like it should work also, although the '11' is more logically
a register offset.
> ... but it doesn't appear to play well with my device.
Trivia: the old imw (imr, etc) commands are deprecated, you should use
the new "i2c <cmd>" versions.
[snip]
> Regards,
>
> Brian
Good luck,
gvb
next prev parent reply other threads:[~2009-09-01 18:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-01 17:50 [U-Boot] I2c imd/imw for a digital potentiometer? Brian Hutchinson
2009-09-01 18:22 ` Jerry Van Baren [this message]
2009-09-02 0:14 ` Brian Hutchinson
2009-09-01 18:30 ` Andrew Dyer
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=4A9D6655.4060503@ge.com \
--to=gerald.vanbaren@ge.com \
--cc=u-boot@lists.denx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.