how to use an LM73 I2C temp sensor

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 ...

What is Pin 1 connected to? What are you using for an address? What size pull-ups and how long are your wires? All ones would be the apparent response from a device that is not responding to the address you send.

Reply to
Anthony Fremont

I grounded pin 1. I have a -0 device, so gnding pin 1 should give 001. I used pullups on both data and clk. Maybe no pullup on clk? I tried various addresses. 4.7K pullups. wires are very short, built on a Basic Stamp protoboard. I've use a few I2C before, I'm using an I2C temp sensor, DS1620, right now, oK. Can't figure this out, I must be doing something stupid...I haven't put a scope or analyzer on it yet.

Here's PBasic code ( if your familiar with it): ( In the I2C call, an I2Cpin of 0 automaticly means Data on uController P0 and clk on P1)

LM73read CON %10010011 ' I2C address I2Cpin CON 0 ' P0->Sdata, P1->SCLK

tempIn VAR Word ' 16 bit word in from LM73 temperature VAR Word ' 16 bit word

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

Reply to
sdeyoreo

I haven't used the LM73 before. After looking thru the datasheet, it appears that you should be able to simply read the temperature after a power up, and allowing at least a 14mS delay for the first conversion to take place. The power on value of the temperature register is 0x7FFC. If you are getting 0xFFFF as the temperature, then it sounds more like the LM73 isn't responding to the address byte you send. You should probably be sending the appropriate configuration and pointer reg setting commands to the LM73, instead of relying on the POR defaults to work.

What speed is the I2CIN command toggling the clock pin? Try 1K pull-ups.

Reply to
Anthony Fremont

Tomorrow, I'll try 1k pullups, it's been suggested 4.7K too hi. I'll have to put an analyzer on it, I don't even know if it's really clocking.

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.