Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[General] I2C communication Reading from a Temperature sensor LM75.

Status
Not open for further replies.

root2hell

Member level 3
Joined
Aug 13, 2014
Messages
63
Helped
2
Reputation
4
Reaction score
2
Trophy points
8
Location
India
Activity points
394
i am trying to read temp sensor LM75(7 bit Slave addr=0x48) that support I2C from a microprocessor mpc8308 using evaluation kit i.e. mpc8308rdb.

I have initialized i2c module by writing FDR Resistor, I2CCR resistor with (Enable i2c module,Disable interrupt, Transmit mode, Broadcast disabled).

then in i2c_read :
1.i2c start condition
2.updating I2CDR with 7 bit addr + W_bit(0x90)
3.wait for ACK by thermal sensor by monitoring SR[RXAK] then
4.send Register addr (0x00)
5.wait for ACK by thermal sensor by monitoring SR[RXAK] then
6.updating I2CDR with 7 bit addr + R_bit(0x91)
7. Put master in Receive mode by clearing I2CCR[MTX] bit.
8. read_data=I2CDR;

But i am only getting 0xFF in read_data byte.
 

Can you share the code please?
 

here is the zipped file of source code.
 

Attachments

  • I2C_mpc8308.txt.zip
    1.6 KB · Views: 76

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top