[En-Nut-Discussion] I2C questions
Kowalsky, Richard
Richard.Kowalsky at fluke.com
Mon Jan 2 15:21:14 CET 2006
Hello Mr. Basser,
Thank your for your code example. With the help of Andreas Genzel,
I was able to get my code working. Along with the MAX5821's and
DS3803's, I have a Dallas DS33231 Real Time Clock. (Unfortunately that
part is still on back-order), when it arrives, your code example will
help me get that running also.
Again, thanks for your help,
Richard
-----Original Message-----
From: en-nut-discussion-bounces at egnite.de
[mailto:en-nut-discussion-bounces at egnite.de] On Behalf Of William Basser
Sent: Sunday, January 01, 2006 10:38 AM
To: 'Ethernut User Chat (English)'
Subject: RE: [En-Nut-Discussion] I2C questions
I have attached a driver for a Dallas DS1340 RTC
-----Original Message-----
From: en-nut-discussion-bounces at egnite.de
[mailto:en-nut-discussion-bounces at egnite.de] On Behalf Of Kowalsky,
Richard
Sent: Saturday, December 31, 2005 12:24 PM
To: en-nut-discussion at egnite.de
Subject: [En-Nut-Discussion] I2C questions
Hello All,
I have a custom Mega128 based board and am using Enut 3.9.8. My
board has 2 - Max5821 I2C DAC's and 2 - Dallas DS1803 Digital
Potentiometers. I have read the data sheets and the 128 manual but
still have some questions. I am trying to control them but have not had
any success yet. The Mega128 will be the master. If anyone can help,
I would really appreciate it.
I know I need to call TwInit(addr) first to initialize the I2C bus,
but I am confused about the <addr> argument. Can I just use any unused
address value?
Next, I think I need to call TwIOCtl() to set the bus speed, but I
noticed that TwInit() already calls TwIOCtl() once so I am not sure if
this is really necessary. If I do call TwIOCtl() and I want to run the
I2C buss at 100Khz, do I just literally pass 100,000 as the argument?
Lastly, once I call TwInit() and TwIOCtl(), is that it? From then
on, I just call TwMasterTransact() as needed?
Sorry for the many questions, I think I am close but must be missing
one thing here or there.
If anyone is willing to share any sample code, I would appreciate it
very much, if not, no problem.
Thanks in advance,
Richard
This message (including any attachments) contains confidential
and/or proprietary information intended only for the addressee.
Any unauthorized disclosure, copying, distribution or reliance on
the contents of this information is strictly prohibited and may
constitute a violation of law. If you are not the intended
recipient, please notify the sender immediately by responding to
this e-mail, and delete the message from your system. If you
have any questions about this e-mail please notify the sender
immediately.
Ce message (ainsi que les eventuelles pieces jointes) est
exclusivement adresse au destinataire et contient des
informations confidentielles. La copie, la communication ou la
distribution du contenu de ce message sans l'accord prealable de
l'expediteur sont strictement interdits et peuvent constituer un
delit. Si vous n'etes pas destinataire de ce message, merci de le
detruire et d'avertir l'expediteur. Si vous avez des questions se
rapportant a ce courrier electronique, merci de bien vouloir
notifier
l'expediteur immediatement.
More information about the En-Nut-Discussion
mailing list