Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] CCS811 I2C MikroC PIC issue

Status
Not open for further replies.

BiNa2605

Full Member level 3
Joined
Sep 1, 2015
Messages
179
Helped
6
Reputation
12
Reaction score
4
Trophy points
18
Location
VietNam
Activity points
1,357
Hi everyone,

I got troubles in programming I2C between PIC16F1513 and CCS811 gas sensor. I can detect the sensor (read hardware id of that sensor 0x81). When I read values in the Status register of that sensor, I receive a bit on ERROR notification, but when I checked value from ERROR register, it showed nothing. I don't know the reason. Maybe I have a problem in configuration, does anyone help me out? Thank you so much.

These codes that I used to check the sensor and read values from Status Register (0x00). I choose Mode 1 in operation, reading sensing signal every second.
Code:
              cID = CCS_Detect(0x20);
              if(cID == 0x81)
              {
                     CCS_Init(0xF4);
                     cStatus = CCS_Detect(0x00);
                     CCS_Configure();
                     cStatus = CCS_Detect(0x00);
                     if((cStatus & 0x05)){
                          Led_Blink_Signal();
                     }
                     else   PORTB.B4 = 0;
              }

This is the I2C signal
tek00013.png
 

Attachments

  • CCS811_DS000459_3-00.pdf
    518.4 KB · Views: 107
  • CCS811_Programming_Guide-AN000369.pdf
    993.1 KB · Views: 123
Last edited:

I've just finished testing. Actually, when I reading data, I did not need to check DATA_READY. I don't know why just read byte to byte in that sensor. This sensor is so sensitive and look quite good for gas detecting application.
 

Hello,

I'm using the same sensor but with CC3200, i have a problem during the initialization of the sensor, could you pleaze helpe me?
I have followed the CCS811 programming and interfacing guide, but when i write the value of the measurment mode register, the value writen is not updated, i can juste read the value 0xFD ; instead of the value written (0x20).
would you please help me in this issue

thank you
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top