Mikroelektronika MIKROE-724 データシート

ページ / 726
mikroBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
611
TP_Set_Calibration_Consts
Prototype
sub  procedure  TP_Set_Calibration_Consts(dim  x_min  as  word,  dim  x_max  as 
word, dim y_min as word, dim y_max as word)
Description Sets calibration constants.
Parameters 
x_min
: x coordinate of the bottom left corner of the working area. 
x_max
: x coordinate of the upper right corner of the working area. 
y_min
: y coordinate of the bottom left corner of the working area. 
-
 y_max
: y coordinate of the upper right corner of the working area. 
Returns
Nothing.
Requires
Nothing.
Example
TP_Set_Calibration_Consts(148, 3590, 519, 3370)  ‘ Set calibration constants
Notes
None.
Library Example
The following drawing demo tests routines of the Touch Panel library:
Copy Code To Clipboard 
program TouchPanelCalibrationAndWrite
‘ Glcd module connections
dim GLCD_D7 as sbit at RD3_bit
    GLCD_D6 as sbit at RD2_bit
    GLCD_D5 as sbit at RD1_bit
    GLCD_D4 as sbit at RD0_bit
    GLCD_D3 as sbit at RB3_bit
    GLCD_D2 as sbit at RB2_bit
    GLCD_D1 as sbit at RB1_bit
    GLCD_D0 as sbit at RB0_bit
    GLCD_D7_Direction as sbit at TRISD3_bit
    GLCD_D6_Direction as sbit at TRISD2_bit
    GLCD_D5_Direction as sbit at TRISD1_bit
    GLCD_D4_Direction as sbit at TRISD0_bit
    GLCD_D3_Direction as sbit at TRISB3_bit
    GLCD_D2_Direction as sbit at TRISB2_bit
    GLCD_D1_Direction as sbit at TRISB1_bit
    GLCD_D0_Direction as sbit at TRISB0_bit
dim GLCD_CS1 as sbit at LATB4_bit
    GLCD_CS2 as sbit at LATB5_bit
    GLCD_RS  as sbit at LATF0_bit
    GLCD_RW  as sbit at LATF1_bit
    GLCD_EN  as sbit at LATF4_bit
    GLCD_RST as sbit at LATF5_bit