2.you are communicating with an external device over an I2C bus. The I2C address of the device is 0x40. list the steps you would take to write a 1 in bit 7 of a register at address 02 in the external device without affecting the other bits in that register. You can assume you are using an I2C controller to do the actual I2C bus operations as in the next example. (you will essentially write program comments with appropriate values but you do not need to write the actual assembly language instructions) LDR R10,=0x40301688 @read from register 02 from the I2C device adressed in 0x40 MOV R0,#0X80 @slave adress in the I2C bus is 0x40; STR R0,[R10] MOV R0,#0x69 @set byte to start a read after write cycle STR R0,[R10,#0x8] BL POLLTB MOV R0,#0X02 @要读入器件内部地址02单元 STR R0,[R10] MOV R0,#0X68 STR R0,[R10,#0X8] BL POLLTB MOV R0,#0X81 @设置读入周期@ STR R0,[R10] MOV R0,#0x69 @START=1,STOP=0,TB=1@ STR R0,[R10,#0x8] BL POLLTB MOV R0,#0X6A @只读一个数据@stop=1 TB=1 STR R0,[R10,#0X8] @设置开始读入@ BL POLLTB @等待读入结束 LDR R1,[R10] MOV R2,#0X80 ORR R1,R1,R2 MOV R0,#0X80 STR R0,[R10] MOV R0,#0x69 STR R0,[R10,#0x8] BL POLLTB@ MOV R0,#0X02 @写入器件内部地址02单元 STR R0,[R10] MOV R0,#0X68 STR R0,[R10,#0X8] BL POLLTB MOV R0,R1 @这是写入器件02单元的数据@ STR R0,[R10] MOV R0,#0X6A @写入后停止,只写一个数据@ STR R0,[R10,#0X8] BL POLLTB @等响应 这个题目根据上面的程序。。怎么写算法啊 3.briefly describe the operation of a Successive Approximation type A/D converter and in general terms compare its speed with that of the other types of converters( flash , dual slope, sigma-delta) 4.describe why a low-pass filter is often put in series with the input of an A/D converter that is to be used to digitize rapidly changing signals such as audio frequency sinewave signals. 5.describe the meaning of five of the following terms. a. CRC b. half-duplex c. snubber circuit d. Quantization Error e. sigma-delta A/D converter 这题给点中文资料
|