Pre-Processor
nominally 18 microamps. Default value is H (18 microamps).
THRESHOLD=x
x is a number between 1-100 and represents the percent reduction in the nominal
frequency that will generate a valid key press in software. Default value is 6%.
SCANTIME=xxMS
xx is the number of milliseconds used by the microprocessor to scan for one key
press. If utilizing multiple touch pads, each pad will use xx milliseconds to scan for
one key press. Default is 32ms.
PIN=char
If a valid key press is determined on “PIN”, the s oftware will return the character
“char” in the function touchpad_getc(). (Example: PIN_B0='A')
SOURCETIME=xxus (CTMU only)
xx is thenumber of microseconds each pin is sampled for by ADC during each scan
time period. Default is 10us.
Purpose:
This directive will tell the compiler to initialize and activate the Capacitive Sensing
Module (CSM)or Charge Time Measurement Unit (CTMU) on the microcontroller.
The compiler requires use of the TIMER0 and TIMER1 modules for CSM and
Timer1 ADC modules for CTMU, and global interrupts must still be activated in the
main program in order for the CSM or CTMU to begin normal operation. For most
applications, a higher RANGE, lower THRESHOLD, and higher SCANTIME will
result better key press detection. Multiple PIN's may be declared in “options”, but
they must be valid pins used by the CSM or CTMU. The user may also generate a
TIMER0 ISR with TIMER0's interrupt occuring every SCANTIME milliseconds. In
this case, the CSM's or CTMU's ISR will be executed first.
Examples: #USE TOUCHPAD (THRESHOLD=5, PIN_D5='5', PIN_B0='C')
void main(void){
char c;
enable_interrupts(GLOBAL);
while(1){
}
}
c = TOUCHPAD_GETC();
//will wait until a pin is detected
//if PIN_B0 is pressed, c will have 'C'
//if PIN_D5 is pressed, c will have '5'
Example
None
Files:
Also See: touchpad_state( ), touchpad_getc( ), touchpad_hit( )
#WARNING
Syntax:
#WARNING text
137
相关PDF资料
PCI-EXP-T42G5-N1 IP CORE PCI EXPRESS ORCA 4
PCM18XH2 PROCESSOR MODULE MPLAB-ICE 2000
PCM18XN0 PROCESSOR MODULE FOR ICE2000
PDA-B-24-615-E-2B1-1-C CIRCUIT BREAKER MAG 1P 15A
PFMF.260.2 PFMF PTC FUSE SMT 2.6A 1812
PFNF.200.2 PFNF PTC FUSE SMT 2A 1206
PFRY.375 PTC-FUSE RADIAL 72 VDC
PFSM.150.33.2 FUSE PTC 8A 15V FST-TRIP SMD
相关代理商/技术参数
PCD_09 制造商:MACOM 制造商全称:Tyco Electronics 功能描述:Low Profile PCB Relay PCD
PCD-00173-0C 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY
PCD-00173-0E 制造商:Molex 功能描述:Ethernet Cable Assembly
PCD-00173-0H 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY
PCD-00173-0K 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY
PCD-00174-0C 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY; Cable Length - Imperial:3ft; Cable Length - Metric:914.4mm; Connector Type A:RJ45 Plug; Connector Type B:RJ45 Plug; Jacket Color:Red; Approval Bodies:CSA / UL; Body Material:PVC; Cable Assembly Type:Ethernet ;RoHS Compliant: NA
PCD-00174-0E 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY; Cable Length - Imperial:3ft; Cable Length - Metric:914.4mm; Connector Type A:RJ45 Plug; Connector Type B:RJ45 Plug; Jacket Color:Grey; Approval Bodies:CSA / UL; Body Material:PVC; Cable Assembly Type:Ethernet;RoHS Compliant: NA
PCD-00174-0H 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY