[bascom] SV: I2C problem


From "Anders Løvstad" <anders.lovstad@c2i.net>
Date Mon, 27 Sep 1999 00:10:28 +0200

Hi Michael,
 
Thanks for your fast replay, and sorry for my slow respond on it!
(have been away for business).
The connection is very simple:Using the MCS AT89C2051 evalboard ,
I have connected (LM75) pin1 to SDA,pin2 to SCL,pin 5-6-7 to GND.
SDA , SCL runs thru 330 Ohms resistors to P3.7 (SDA) and P3.5 (SCL).
Pullups on these with 3k3 Ohms.
The LM75 pin 8 to VCC and pin 4 to GND.
 
The SW is very ,very basic (for testing first chat with LM75):
 
'LM75 temp. reader
Config Lcd = 40 * 4
Dim Slave As Byte
Dim Value As Word
Slave = &B10010001                                         'read address of lm75 ,&B10010000 is write address

Start:
I2creceive Slave, Value                             'get the value
Waitms 10
Lcd Value
Wait 1
GoTo Start

As you can see I have implented your info regarding LSB beeing R/W flag.
Maybe I'm totally lost reggarding use of the I2REACEIVE statment??
The "Test Engineering I/O data" you are mentioning would have been nice to take a look at.
And offcource: "working schematic and code" would be great!
Please let me know if this gives you any ideas (to help me, and hopefully others).
 
Regards,
Anders Løvstad
Norway
anders.lovstad@c2i.net
 
 
>Anders,
>Since I am the person who did the Test Design and Tester Program for this device while at National Semiconductor, I need to see a schematic of your implementation and I want to see the BASCOM code for talking to it.
>Or, if you prefer, I could send you a working schematic and code for this. ( it will be untested as I do not have the means to cobble up a circuit at this time).
>
>Michael Akers
>M. Akers Enterprises
>
>P.S. Here is a hint.