This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/CAPTIVATE-FR2676: Capacitance sensor value

Part Number: CAPTIVATE-FR2676
Other Parts Discussed in Thread: CAPTIVATE-METAL

Tool/software: Code Composer Studio

I am a very beginner of CCS. I just started using CAPTIVATE Design Center and CCS.
I made a simple project.

I want to illuminate five LEDs according to the capacitance sensor value.
Sensor capacitance varies from 0.5 to 3.0 pF for example,
and I want to turn on LEDs like below for example;
  0.5 to 1.0pF: 1 LED ON
  1.0 to 1.5pF: 2 LEDs ON
  1.5 to 2.0pF: 3 LEDs ON
  2.0 to 2.5pF: 4 LEDs ON
  2.5 to 3.0pF: 5 LEDs ON

I have no idea which expression is the count value,
and where I should put “if” and “else” statement for LEDs in the program.
Easiest way would be better.

By the way, I can not attach the project file using clip icon. How can I do that?

Thanks & regards,

  • Hello,

    I am going to loop in an engineer who will be able to help you with your CapTIvate based inquiry. Please allow a couple of work days for them to look into your questions and formulate a response.

    Best regards,

    Matt

  • Hi,

    You can put "if else" statement in te BTN00 callback function.

    Regarding to how to register a callback function:

    CapTIvate can sense capacitance change rather than absolute capacitance. 

    For your case, you can set a 0.5pF base capacitance for your sensor and you will get the base count like 500 by default. 

    During the CapTIvate running, you can change the capacitance by touch the sensor or add additional capacitor to the sensor, the count will change denpends on the capacitance value add to the sensor(capacitance change).  And you can lluminate different LEDs according to the count change.

    Please take CAPTIVATE-METAL example project callback function as a reference.

    Regards,

    Ling

  • Hi Matt and Ling,

     

    Thank you for your response. I will study the link you sent me.

    By the way, I can not import CCS project I made by Design Center.

    I can import CCS project from standard library like “FR2676_CAPTIVATE_BSWP” for example, but I can not import CCS project I made like the captured picture I posted last week. This is how I import;

    1. Right-click the “MSP430”, and select properties on Design Center.

    2. Click “Generate Source code” and save.

    3. Click “Import Project” on CCS.

    4. Click “Browse” at “Select search-directory”.

    In case of standard library, the check box is checked at the “Discovered projects”, but in case of my original project, the check box is not checked.

    What would be the cause of this?

  • Hi,

    Regards,

    Ling

  • Hi Ling,

    Thank you very much for sending me the nice video. I could import one.

    Best regards,

    Koichi

  • Hi Ling,

     

    I found “BTN00_E00_RawCnts” in the program. I wonder I can use the value for the sensor. When I watch the value, it sometimes shifts up and down depending on the sensor movements. It seems some calibration affects the value. If it is true, how can I stop the calibration?

     

    Best regards,

    Koichi

  • Hi Ling,

    Thank you, I will study the software.

    Best regards,

    Koichi