Tool/software: Code Composer Studio
Hello,
We are trying to use the I2C interface with the CCS811 gas sensor using Sensor Controller Studio (SCS). We are trying to follow along with the "I2C Light Sensor for LPSTK" example given in SCS. We started by trying to follow along with the initialization flow chart provided in the datasheet for the gas sensor. We cut out a few steps that we did not find necessary. We also are trying to use the "Timer 1 Event Trigger", as shown in the "I2C Light Sensor for LPSTK" example. In the Event A Handler Code, we tried to check the status register to determine if new data is available. After an "if" condition, we then tried to read data from the results register. Where we stand now, we do not seem to get any response from the gas sensor. Below shows two instances of code where we have found changes in the output:
In this case, line 3 is not commented, and we read 0 when the code is ran.
In this case, line 3 is commented, and we read 2 for the output:
The existence of line 3 changes the I2C output, and we are wondering why this is. Also, see below for the initialization and execution code. Note that we are trying to add onto an existing ADC project that we have already verified that it works.
Thanks for your help.