请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:MSP430FR2673 您好!
我 使用 MSP430FR2673来接触控制定制电路板。 我想提高我的触控灵敏度、以便尽可能做到这一点。 我使用16 MHz 频率、而代码是使用 CapTIvate 设计工具生成的。
谢谢!
阿图利亚
#include <msp430.h> // Generic MSP430 Device Include
#include "driverlib.h" // MSPWare Driver Library
#include "captivate.h" // CapTIvate Touch Software Library
#include "CAPT_App.h" // CapTIvate Application Code
#include "CAPT_BSP.h" // CapTIvate EVM Board Support Package
extern tSensor *sensor ;
extern tElement keypadSensor_E00;
void main(void)
{
//
// Initialize the MCU
// BSP_configureMCU() sets up the device IO and clocking
// The global interrupt enable is set to allow peripherals
// to wake the MCU.
//
WDTCTL = WDTPW | WDTHOLD; //Ban watchdog.
P2DIR |= BIT6; // Set P2.6 to output direction for idication
BSP_configureMCU(); // Configure the communication IO pin, configure the clock
__bis_SR_register(GIE);
// Start the CapTIvate application
CAPT_appStart(); //Capacitive touch module initialization and calibration, while enabling communication peripherals.
//
//CAPIO2CTL = 0x0126;
// Background Loop
//
while(1)
{
//
// Run the captivate application handler.
//test
if(CAPT_appHandler()==true)
{
P2OUT |= BIT6; // turn on the LED
}
else
{
P2OUT &= ~BIT6; // turn off the LED
}
__no_operation();
//
// End of background loop iteration
// Go to sleep if there is nothing left to do
//
CAPT_appSleep(); //CPU enters sleep, waiting for periodic interrupt to wake up
} // End background loop
} // End main()

