AW: [En-Nut-Discussion] I2C questions
Kowalsky, Richard
Richard.Kowalsky at fluke.com
Sat Dec 31 23:39:16 CET 2005
Andreas,
Thank you very much for your help, I will give your suggestions a try
as soon as possible. I think I am close to getting it working. I can
see the clock and data lines strobing when I issue my commands. Right
now I am double-checking all my electrical interface hardware. Your
suggestion below is excellent!
Thanks again for your help,
Richard
----------------------------------------------------------------
Hi Richard,
I forgot - maybe you use the wrong adress of your I2C devices ?
this a a very dirty piece of code to find resonding devices (active
adresses) by returncode rc
void TestTWI (void)
{
unsigned char lbuf[10];
unsigned char retb[10];
lbuf[0]=0xf0; // dummy
unsigned char a = 0;
int rc;
for(a=0; a<256; a++)
{
rc = TwMasterTransact(a, lbuf, 1, retb, 1, 1000);
printf("Adress : Dez: %d Hex: %02X RC:%d\n",a,retb[0],rc);
NutSleep(50);
}
Andreas
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