Download Using I2C on an NXP Microcontroller
Transcript
Implementing I2C with the LPC2194 Microcontroller.......................................................................... 10 Basic Hardware Interface ............................................................................................................... 10 I2C Control Register Overview ........................................................................................................ 11 Setup of I2C Hardware.................................................................................................................... 12 Data Transfer Overview: Monitoring SI and Checking for Proper Status Codes ............................... 12 Abstracting the I2C Communication Protocol.................................................................................. 16 Effect of Noise on I2C Communication ............................................................................................ 16 Processing Results from the Avago Color Sensor ................................................................................ 16 Removing Influence of Gain: Effect of Capacitors and Integration Time.......................................... 16 Automatic Gain Adjustment ........................................................................................................... 18 Fastest Color Sensor Sampling Speed ............................................................................................. 19 Attenuating Influence of Fluorescent Light Flickering on Color Readings ........................................ 20 Overclocking the Color Sensor’s I2C Port ........................................................................................ 22 Effect of Light Source on Color Readings ........................................................................................ 22 Conclusions ........................................................................................................................................... 23 Appendix ............................................................................................................................................... 23 2