《线程》中讨论的其他部件:MSP430FR2512, ENERGY-TRACE, MSP-EXP430G2, TEST
我想制作一个具有可调整偏移量(高达100pF)的4-20mA 回路供电的微微法电容仪表,其全刻度范围可调至可能高达10pF。 看起来 MSP430FR2512可以在一个芯片中处理其中的大部分。 当我从 Captivate 项目生成 CCS 项目时,按下按钮时 LED 指示灯不会亮起,如果需要,这是正常的。
生成的 CCS 项目是否仅包括对迷人输入的调整,而不包括音频生成和 LED 控制?
增量存储在任意位置还是在 Captivate 应用程序中计算?
(花了一段时间才找到,但这就是我获得类似读数的方式- rawSensor = 1960-PRX00.pCycle [0]-> pElements[0]-> filterCount.ui16 Natural;)
生成项目中的超时或近端探测是否会导致连续电容测量出现问题(按24小时以上的顺序)?
另一种措辞;
如果更新时间设置为50ms,生成的代码是否允许此操作而不会超时或通过阈值?
在 CCS 能量曲线中,我获得了4.1mA 的相当高的平均电流,这是预料中的吗?
以下是传感器设置;
//*****************************************************************************
// CAPT_UserConfig.c
//
// \version 1.83.00.05
// Released on May 15, 2020
//
//*****************************************************************************
//*****************************************************************************
//
// NOTE: This is an automatically generated source code file! The Captivate
// Design Center generates the User Configuration file automatically based
// upon the sensor layout that was created.
//
// Changes to this file will be OVERWRITTEN if a you select
// "Update Existing Project" under "Generate Source Code" in the Design Center.
//
// To avoid interference with the code generation process, keep ALL application
// code external to this file.
//
//*****************************************************************************
#include "CAPT_UserConfig.h"
//*****************************************************************************
//
//! Captivate Element Definitions
//! All elements in this application are defined below.
//! Each element has 3 components:
//! 1) a raw count array (One index per freq. scanned) (uint16_t)
//! 2) a tuning array (One index per freq. scanned) (tCaptivateElementTuning)
//! 3) a element structure (tElement)
//
//*****************************************************************************
// Sensor: PRX00, Element: E00
uint16_t PRX00_E00_RawCnts[CAPT_SELF_FREQ_CNT];
tCaptivateElementTuning PRX00_E00_Tuning[CAPT_SELF_FREQ_CNT];
tElement PRX00_E00 =
{
.ui8RxPin = 0,
.ui8RxBlock = 0,
.ui8TouchThreshold = 60,
.pRawCount = PRX00_E00_RawCnts,
.pTuning = PRX00_E00_Tuning,
};
//*****************************************************************************
//
//! Captivate Time Cycle Definitions
//! All time cycles in this application are defined below. Time cycles are
//! groups of elements that are measured together in parallel in one time slot.
//! Each cycle has 2 components:
//! 1) an element pointer array to the member elements (tElement*)
//! 2) a cycle structure (tCycle)
//
//*****************************************************************************
// Time Cycle: PRX00_C00
tElement* PRX00_C00_Elements[1] =
{
&PRX00_E00,
};
tCycle PRX00_C00 =
{
.ui8NrOfElements = 1,
.pElements = PRX00_C00_Elements,
};
//*****************************************************************************
//
//! Captivate Sensor Definitions
//! All sensors in this application are defined below. Sensors are
//! groups of time cycles that utilize raw measurement data to create an
//! abstract sensor type, such as a button, slider, wheel, or prox sensor.
//! Each sensor has 3 components:
//! 1) a cycle pointer array to the member time cycles (tCycle*)
//! 2) a sensor-specific parameter structure (tGenericSensorParams)
//! 3) a sensor structure (tSensor)
//
//*****************************************************************************
//Sensor: PRX00
const tCycle* PRX00_Cycles[1] =
{
&PRX00_C00,
};
tProxSensorParams PRX00_Params =
{
.pSensor = NULL,
.ui8NumberOfSensors = 0,
};
tSensor PRX00 =
{
// Basic Properties
.TypeOfSensor = eProx,
.SensingMethod = eSelf,
.DirectionOfInterest = eDOIDown,
.pvCallback = NULL,
.ui8NrOfCycles = 1,
.pCycle = PRX00_Cycles,
.pSensorParams = (tGenericSensorParams*)&PRX00_Params,
// Conversion Control Parameters
.ui16ConversionCount = 2000,
.ui16ConversionGain = 100,
.ui8FreqDiv = 1,
.ui8ChargeLength = 1,
.ui8TransferLength = 1,
.bModEnable = false,
.ui8BiasControl = 3,
.bCsDischarge = true,
.bLpmControl = false,
.ui8InputSyncControl = 0,
.bTimerSyncControl = false,
.bIdleState = true,
// Tuning Parameters
.ui16ProxThreshold = 60,
.ui16NegativeTouchThreshold = 30,
.ui16ErrorThreshold = 8191,
.ui16TimeoutThreshold = 65535,
.ProxDbThreshold.DbIn = 1,
.ProxDbThreshold.DbOut = 0,
.TouchDbThreshold.DbIn = 1,
.TouchDbThreshold.DbOut = 0,
.bCountFilterEnable = true,
.ui8CntBeta = 1,
.bSensorHalt = false,
.bPTSensorHalt = true,
.bPTElementHalt = true,
.ui8LTABeta = 7,
.bReCalibrateEnable = true,
};
#if (CAPT_CONDUCTED_NOISE_IMMUNITY_ENABLE==true)
//*****************************************************************************
//
//! \var g_EMCConfig
//! This structure stores the EMC configuration for this application.
//
//*****************************************************************************
const tEMCConfig g_EMCConfig =
{
// Conversion Style
.selfModeConversionStyle = CAPT_SELF_MODE_CONVERSION_STYLE,
.projModeConversionStyle = CAPT_PROJ_MODE_CONVERSION_STYLE,
// Oversampling Style
.selfModeOversamplingStyle = CAPT_SELF_MODE_OVERSAMPLING_STYLE,
.projModeOversamplingStyle = CAPT_PROJ_MODE_OVERSAMPLING_STYLE,
// Jitter Filter Enable
.bJitterFilterEnable = true,
// Noise Thresholds and Calibration Noise Limits
.ui8NoiseThreshold = CAPT_NOISE_THRESHOLD,
.ui16CalibrationNoiseLimit = CAPT_CALIBRATION_NOISE_LIMIT,
.ui8CalibrationTestSampleSize = 8,
// Dynamic Threshold Adjustment Parameters
.bEnableDynamicThresholdAdjustment = CAPT_DYNAMIC_THRESHOLD_ADJUSTMENT,
.ui8MaxRelThreshAdj = 76,
.ui8NoiseLevelFilterEntryThresh = 40,
.ui8NoiseLevelFilterExitThresh = 0,
.ui8NoiseLevelFilterDown = 6,
.ui8NoiseLevelFilterUp = 1,
.coeffA = _IQ31(0.0065),
.coeffB = _IQ31(0.050)
};
#endif
//*****************************************************************************
//
//! \var g_pCaptivateSensorArray
//! This array allows for indexed access to any
//! sensor in the configuration.
//
//*****************************************************************************
tSensor* g_pCaptivateSensorArray[CAPT_SENSOR_COUNT] =
{
&PRX00,
};
//*****************************************************************************
//
//! \var g_uiApp
//! This structure stores the global settings for this application.
//
//*****************************************************************************
tCaptivateApplication g_uiApp =
{
.state = eUIActive,
.pSensorList = &g_pCaptivateSensorArray[0],
.ui8NrOfSensors = CAPT_SENSOR_COUNT,
.ui8AppLPM = CAPT_LOW_POWER_MODE,
.bElementDataTxEnable = true,
.bSensorDataTxEnable = true,
.ui16ActiveModeScanPeriod = 50,
.ui16WakeOnProxModeScanPeriod = 50,
.ui16InactivityTimeout = 303,
.ui8WakeupInterval = 7,
};谢谢