User manual

615
mikoPascal PRO for dsPIC30/33 and PIC24
MikroElektronika
TP_TFT_Init
Prototype
procedure TP_TFT_Init(display_width : word; display_height : word; readX_
ChNo : byte; readY_ChNo : byte);
Description Initialize TFT touch panel display. Default touch panel ADC threshold value is set to 900.
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_TFT_Init(320, 240, 13, 12); // Initialize touch panel
Notes None.
TP_TFT_Set_ADC_Threshold
Prototype
procedure TP_TFT_Set_ADC_Threshold(threshold : word);
Description Set custom ADC threshold value, call this function after TP_TFT_Init.
Parameters - threshold: custom ADC threshold value.
Returns Nothing.
Requires TP_TFT_Init has to be called before using this routine.
Example
TP_TFT_Set_ADC_Threshold(900); // Set touch panel ADC threshold
Notes None.