Hi,
I'm trying to get touch coordinates to work but no success...
This works fine :
putc(0x6F); //cmd
putc(0x01);*/ //wait until touch press
... but I want to do function show_freq_level(); in loop for many many times while waiting for touch press:
do{
//do{
show_freq_level(); //WANT TO GO TO THIS FUNCTION
//FUNCTION LAST ABOUT 2 SECONDS
//THEN ASK IF THRERE'S ANY TOUCH ACTIVITY
putc(0x6F); //cmd
putc(0x04); //get touch status
//DO I HAVE TO WAIT ACK IB N THIS SITUATION??
com_ok(); //THIS WAITS FOR ACK (0X06)... IT WORKS FINE ELSEWHERE IN MY CODE
while(!kbhit(LCD));
delay_us(1);
touch_status_MSB = getc(LCD);//read character from UART
touch_status_LSB = getc(LCD);
//IF THERE IS'NT ANY TOUCH ACTIVITY RETURN TO FUNCTION show_freq_level(); }while(touch_status_LSB == 0);
but now my program don't react touching at all...
(show_freq_level() works ok)
So I like to know how and where and when (and how to use it) 0x6F 0x04 returns it's status value?
(If status is 0: no touch activity)
Is it one byte or two byte value ?
//these lines work fine to get touch goordinates
touch_status_MSB = getc(LCD);//read character from UART
touch_status_LSB = getc(LCD);
best regards
-arto-
I'm trying to get touch coordinates to work but no success...
This works fine :
putc(0x6F); //cmd
putc(0x01);*/ //wait until touch press
... but I want to do function show_freq_level(); in loop for many many times while waiting for touch press:
do{
//do{
show_freq_level(); //WANT TO GO TO THIS FUNCTION
//FUNCTION LAST ABOUT 2 SECONDS
//THEN ASK IF THRERE'S ANY TOUCH ACTIVITY
putc(0x6F); //cmd
putc(0x04); //get touch status
//DO I HAVE TO WAIT ACK IB N THIS SITUATION??
com_ok(); //THIS WAITS FOR ACK (0X06)... IT WORKS FINE ELSEWHERE IN MY CODE
while(!kbhit(LCD));
delay_us(1);
touch_status_MSB = getc(LCD);//read character from UART
touch_status_LSB = getc(LCD);
//IF THERE IS'NT ANY TOUCH ACTIVITY RETURN TO FUNCTION show_freq_level(); }while(touch_status_LSB == 0);
but now my program don't react touching at all...
(show_freq_level() works ok)
So I like to know how and where and when (and how to use it) 0x6F 0x04 returns it's status value?
(If status is 0: no touch activity)
Is it one byte or two byte value ?
//these lines work fine to get touch goordinates
touch_status_MSB = getc(LCD);//read character from UART
touch_status_LSB = getc(LCD);
best regards
-arto-
Comment