Mikroelektronika MIKROE-738 Datenbogen
![Mikroelektronika](https://files.manualsbrain.com/attachments/e0529b3b58069a916ad7bb89f7e9f5f0eda73421/common/fit/150/50/1b07b99aa3112e022a916b06db07f1f4f211e91d41878452d87c7638b1bf/brand_logo.gif)
580
mikoC PRO for PIC32
MikroElektronika
TP_Init
Prototype
void TP_Init(unsigned int display_width, unsigned int display_height,
unsigned int readX_ChNo, unsigned int readY_ChNo);
Description Initialize touch panel display. Default touch panel ADC threshold value is set to 3900.
Parameters
Parameters
-
display_width:
set display width.
-
display_height:
set display height.
-
readX_ChNo:
read X coordinate from desired ADC channel.
-
readY_ChNo:
read Y coordinate from desired ADC channel.
Returns
Nothing.
Requires
Before calling this function initialize ADC module.
Example
ADC1_Init(); // Initalize ADC module
TP_Init(128, 64, 6, 7); // Initialize touch panel, dimensions 128x64
Notes
None.
TP_Set_ADC_Threshold
Prototype
void TP_Set_ADC_Threshold(unsigned int threshold);
Description Set custom ADC threshold value, call this function after TP_Init.
Parameters -
Parameters -
threshold
: custom ADC threshold value.
Returns
Nothing.
Requires
TP_Init has to be called before using this routine.
Example
TP_Set_ADC_Threshold(3900); // Set touch panel ADC threshold
Notes
None.