[En-Nut-Discussion] I2C questions

William Basser wbasser at cyberinteg.com
Sun Jan 1 19:38:16 CET 2006


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.
_______________________________________________
En-Nut-Discussion mailing list
En-Nut-Discussion at egnite.de
http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rtchand.c
URL: <http://lists.egnite.de/pipermail/en-nut-discussion/attachments/20060101/0f383c89/attachment.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rtchand.h
URL: <http://lists.egnite.de/pipermail/en-nut-discussion/attachments/20060101/0f383c89/attachment.h>


More information about the En-Nut-Discussion mailing list