Use the following information for problems 16 to 20 A TC74A3 temperature sensor
ID: 3771423 • Letter: U
Question
Use the following information for problems 16 to 20 A TC74A3 temperature sensor is connected to the mbed through the I2C interface on pin p27 and p28. The mbed will operate as an I2C master and the sensor as an I2C slave. The sensor's 7-bit I2C slave address is 1001011 (binary) and the current termperature (in Celsius) can be read from register 0 within the sensor. The sensor datasheet shows the following I2C transaction to read data from a register: Read byte format S Address W Ack Command Ack SAddress R Ack Data NackP 8 bits 7 bits 7 bits Slave Address 8 bits Command byte selects which register you are reading from Slave Address repeated due to change in data-flow direction Data byte: reads from the register set by the command byte Ack Acknowledgement Nack = No acknowledgement S = START condition W-read/write bit is 0 P STOP condition R = read/write bit is 1 Shaded = Slave Transmission All field not otherwise labeled are 1 bit Unshaded = Master Transmission Also, assume the following variable declarations: int addr; int ack char array[2]; int temp; 16. The transaction above shows a start condition in them middle of the transaction because: a) This is an error in the datasheet. This start condition is unneeded b) Using multiple start conditions increases reliability. c) The transaction changes from a write operation to a read operation. d) Only 1 byte can be transferred per read or write operation, so a new operation must be started after transferring the command byte e) It keeps the I2C clock synchronized during this long transaction. f) It starts the temperature measurement process. 17. For the I2C signals, how should the mbed class object be declared? a) I2C sensor(p27,p28); b) I2C sensor (p28, p27); c) sensor I2C(p27,p28); d) sensor I2c(p28,p27); e) sensor I2CSlave (p27,p28) f) I2CSlave sensor (p28,p27)Explanation / Answer
16.d
17.e.sensor I2Cslave(p27,p28)
18.d.0X96
19.C
20.e
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.