Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| learn:courses:unit-4-lab4d:start [2017/03/22 19:10] – [9. Questions] Martha | learn:courses:unit-4-lab4d:start [2022/10/04 11:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Lab 4d: Communications - I2C Serial Protocols ====== | ====== Lab 4d: Communications - I2C Serial Protocols ====== | ||
| + | [[{}/ | ||
| + | [[{}/ | ||
| + | [[{}/ | ||
| === Download This Document === | === Download This Document === | ||
| - | * {{ : | + | {{ : |
| ===== 1. Objectives ===== | ===== 1. Objectives ===== | ||
| - | | + | |
| - | | + | |
| - | | + | |
| ---- | ---- | ||
| ===== 2. Basic Knowledge ===== | ===== 2. Basic Knowledge ===== | ||
| - | | + | |
| - | | + | |
| - | | + | |
| Line 22: | Line 25: | ||
| ===== 3. Equipment List ===== | ===== 3. Equipment List ===== | ||
| ==== 3.1. Hardware ==== | ==== 3.1. Hardware ==== | ||
| - | | + | |
| - | | + | |
| - | | + | |
| In addition, we suggest the following instruments: | In addition, we suggest the following instruments: | ||
| - | | + | |
| ==== 3.2. Software ==== | ==== 3.2. Software ==== | ||
| The following programs must be installed on your development work station: | The following programs must be installed on your development work station: | ||
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| ---- | ---- | ||
| ===== 4. Project Takeaways ===== | ===== 4. Project Takeaways ===== | ||
| - | | + | |
| - | | + | |
| - | | + | |
| Line 147: | Line 150: | ||
| //Figure 7.1. Picture of the MMA8652FC Accelerometer mounted on the Basys MX3 processor board.// | //Figure 7.1. Picture of the MMA8652FC Accelerometer mounted on the Basys MX3 processor board.// | ||
| - | {{ : | + | {{ : |
| //Figure 7.2. Schematic diagram of MMA8652FC accelerator on the Basys MX3 processor board.// | //Figure 7.2. Schematic diagram of MMA8652FC accelerator on the Basys MX3 processor board.// | ||
| + | |||
| + | |||
| ==== 7.1. The MMZ8652FC 3-Axis Accelerometer Software ==== | ==== 7.1. The MMZ8652FC 3-Axis Accelerometer Software ==== | ||
| The communications with the accelerometer requires two global functions that are made up of calls to the four hardware interface functions shown in Listings B.6 through B.9. The control flow diagrams for writing and reading a succession of accelerometer registers are shown in Fig. 7.3 and Fig. 7.4. These two functions can only be called after the accelerometer has been initialized using the code in Listing B.5. The shaded blocks in Fig. 7.3 and Fig. 7.4 refer to coded functions provided in Listings B.2 through B.6. With the aid of the control flow diagrams shown in Fig. 7.3 and Fig. 7.4, the user is expected to develop their one i2cWriteBlk and i2cReradBlk functions. | The communications with the accelerometer requires two global functions that are made up of calls to the four hardware interface functions shown in Listings B.6 through B.9. The control flow diagrams for writing and reading a succession of accelerometer registers are shown in Fig. 7.3 and Fig. 7.4. These two functions can only be called after the accelerometer has been initialized using the code in Listing B.5. The shaded blocks in Fig. 7.3 and Fig. 7.4 refer to coded functions provided in Listings B.2 through B.6. With the aid of the control flow diagrams shown in Fig. 7.3 and Fig. 7.4, the user is expected to develop their one i2cWriteBlk and i2cReradBlk functions. | ||
| - | {{ : | + | {{ : |
| //Figure 7.3. Control Flow Diagram for writing a block of data to the MMA8652FC Accelerometer.// | //Figure 7.3. Control Flow Diagram for writing a block of data to the MMA8652FC Accelerometer.// | ||
| - | {{ : | + | {{ : |
| //Figure 7.4. Control Flow Diagram for reading a block of data from the MMA8652FC Accelerometer.// | //Figure 7.4. Control Flow Diagram for reading a block of data from the MMA8652FC Accelerometer.// | ||
| Line 202: | Line 207: | ||
| ===== 9. Questions ===== | ===== 9. Questions ===== | ||
| 1. Using the waveform captured in step 5 of the testing section, identify all portions of the I2C SDA and SCL signals starting with the START sequence and ending with the STOP sequence.\\ | 1. Using the waveform captured in step 5 of the testing section, identify all portions of the I2C SDA and SCL signals starting with the START sequence and ending with the STOP sequence.\\ | ||
| - | |||
| - | {{ : | ||
| - | //Figure 9.1. Screen capture showing the I2C timing for a 2-byte read operation.// | ||
| - | |||
| 2. Compute the effective data rate in bits per second.\\ | 2. Compute the effective data rate in bits per second.\\ | ||
| 3. What effect, if any, would a change in the pull up resistors value for the SDA and SCL have on the I²C bus? \\ | 3. What effect, if any, would a change in the pull up resistors value for the SDA and SCL have on the I²C bus? \\ | ||
| Line 230: | Line 231: | ||
| ===== Appendix A: Unit 4 Parts Configuration ===== | ===== Appendix A: Unit 4 Parts Configuration ===== | ||
| - | {{ : | + | {{ : |
| //Figure A.1. Unit 4 hardware and instrumentation configuration.// | //Figure A.1. Unit 4 hardware and instrumentation configuration.// | ||
| - | {{ : | + | {{ : |
| //Figure A.2. PIC32MX I²C hardware block diagram.// | //Figure A.2. PIC32MX I²C hardware block diagram.// | ||
| Line 357: | Line 358: | ||
| } /* End of i2cReceiveOneByte */ | } /* End of i2cReceiveOneByte */ | ||
| </ | </ | ||
| + | |||
| + | ---- | ||
| + | |||
| + | [[{}/ | ||
| + | [[{}/ | ||
| + | [[{}/ | ||
| + | [[{}/ | ||

