OT, anyone tried LM73 I2C?

Using a BasicStamp to read from LM73 using I2C, but just getting all

1s. Have used I2C before for memory IC and PCF8574 bus expander, OK but nothing from the LM73. Has anyone had sucess?
Reply to
sdeyoreo
Loading thread data ...

I have used this device in multiple designs and it works fine. I suggest looking at your I2C code.

Cheers

PeteS

Reply to
PeteS

Hmm... I have pull ups on both SDA and SCLK lines. Does SCLK need a pullup? Did you set the pointer register before reading the temp? Did you use an internal address along with the devices's slave address? The spec says it powers up pointing to the temperature register, so I give it the slave address byte and then read back the temp. But nothing but 1s. I haven't put a scope or analyzer on it yet to see whats up. If your familiar with PBasic, here's code:

LM73read CON %10010011 ' I2C address I2Cpin CON 0 ' P0->Sdata,P1->SCLK tempIn VAR Word ' 16 bit word from LM73

' read 2 bytes (16 bits) from LM73 into WORD tempIn: I2CIN I2Cpin,LM73read,[tempIn.HIGHBYTE, tempIn.LOWBYTE ]

Reply to
sdeyoreo

The required pullup in I2C depends on the capacitive loading of the bus, and yes both SCK and SDA should be pulled up for standard devices. What value pullups do you have? An incorrect pullup value will certainly make things fail at fullspeed.

Cheers

PeteS

Reply to
PeteS

4.7K pull-ups. The circiut is only that device built on a uController development board I've used for other I2C. What language did you use? Could you post a relevant snippet?
Reply to
sdeyoreo

I don't have any code here, but I've run I2C controllers in C, C++ and various assembly languages.

What controller are you using? 4.7k seems somewhat high for I2C pullups

- I usually use about 2.2k for a single device (which goes down as more devices are hung off the bus) but it depends on the controller spec.

Cheers

PeteS

Reply to
PeteS

I will note that I had problems with this device the first time I used it because the pullups were too large.

Something else for you to check: Is the device an LM73-0 or LM73-1? Is the address pin grounded?

A simple test is to use all the available addresses.

The LM73-0 has base addresses of:

1001 000[RnW] A = Float 1001 001[RnW] A = GND 1001 010[RnW] A = VDD

the LM73-1 has:

1001 100[RnW] A = Float 1001 101[RnW] A = GND 1001 110[RnW] A = VDD

At least it's a test you can do easily.

Cheers

PeteS

Reply to
PeteS

I'm using a BasicStamp (a Ubicom SX48AC ). We have a bunch we use as quick and easy controllers. We test various ICs, A/Ds, D/As, these temp sensors, DDSs CMOS analog switches, EEPROMS,... We find these BasicStamps very quick and easy, but I've thinking of switching to PIC16F876A and using PicBasicPro for the language. Propably try this:

formatting link
from Melabs. My device is a -0 so addrss should be 001 (with add gnd). One thing is it's hard to tell pin 1, there's no dot or beveled edge. Devices are maked T730, with pins along bottom and top of marking:ie, pin 1 under T, pin2 under 7... pin 4 under 0, pin5 over 0, ... pin 8 over T ?

Tomorrow I'll try 1 k pullups, connect a logic analyer, see whats up, see if it's even clocking...

Reply to
sdeyoreo

Reply to
sdy

I'm glad you got it all working!

If you ever put this part on a board, beware noisy grounds. Even if you decouple Vcc - Gnd right at the pins, if the ground is noisy (or has high density currents at the ground pin for some reason) you will get

*very* flaky results.

Having said that, if you take care, it's a very nice part.

Cheers

PeteS

Reply to
PeteS

Reply to
sdeyoreo

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.