Hi Hans,
It looks OK. What you can do to get a better idea about what is working and what not, could you write something to the LCD as follows:
if new_touch_data then
-- Indicate a touch
ili9341_goto(100,100)
print_string(glcd, "Touch!"
if ads7843_get_touch_coordinate(touch_x, touch_y) then
ads7843_touch_to_display_coordinate(touch_x, touch_y, pixel_x, pixel_y)
-- Now write them to the screen.
ili9341_goto(180,150)
print_word_dec(glcd, pixel_x)
ili9341_goto(180,180)
print_word_dec(glcd, pixel_y)
Because later you have an if statement that compares value and if that if-statement does not return TRUE you see nothing on the screen but you also do not know if it is working at all. Always debug a program in the smallest possible steps.
Can you let me know what happens after adding that code?
Thanks.
Kind regards,
Rob