Hi!
I just noticed that TWR-K70F120M does not support ADC based touch screen when using TWR-LCD-RGB board. All pins are not connected.
So next step is to enable CR Touch with some J-Pins. But I have not founded any example code which would show how to use CR Touch through I2C. Would you have any available? For example PEG Medical demo uses CR Touch so I have big hopes for this :smileywink:
Thank you for any help!
Hello,
Source code of PEG is only available purchasing a license, but eGUI library includes basically the same drivers. You can check this threat to get a eGUI 3.0 alpha release.
https://community.freescale.com/message/314732#314732
In any case, I am attaching the files related with CRTouch control
Best Regards,
Luis
Hello Luis,
I have looked around and it is indicated that more recent versions of eGUI support the CRTouch chip, but when incorporating the latest download I do not see an option for it in the d4d_user_cfg.h. Please indicate if I should use the files you previously attached in this thread or if CRTouch support is already part of eGUI 3.0.
Thanks
Mark Watson
Laramie WY
Hello Mark,
Yes, CRTOUCH is supported. If you check the eGUI configuration files for K70, you will find EGUI_D4D_Demo\TWR_K70N120\MQX\eGUI_twrk70f120\Sources\D4D_Configuration\ d4dtch_cr_touch_cfg.h where pins to connecto to CRTOUCH are defined (I2C, IRQ, etc.) And the source code of the driver D4D\low_level_drivers\touch_screen\touch_screen_drivers\cr_touch (I2C and I2C MQX)
In fact, the default demo is using the CRTOUCH as it is the only touch interface in the TWR-LCD-RGB.
Regards,
Luis
Thank you very much Luis!
Could you add here also two header files, needed by hw_iic.c ?
#include "low_level_drivers\touch_screen\touch_screen_drivers\cr_touch\iic\hw_iic_prv.h"
#include "low_level_drivers\touch_screen\touch_screen_drivers\cr_touch\hw_iic_cfg.h"
Hopefully there is nothing else needed to get CR Touch up and running :smileygrin:
Kind regards,
Simo
Hello and thanks for attached files :smileyhappy:
It seems like there should be some more initializing to get I2C work. If I call the HwIIC_Init function it will fail because either the I2CO_BASE or the I2C1_BASE are not enabled, memory address is now in "-- -- -- --" mode. Could you tell how I should be able initialize next memory address?
/** Peripheral I2C0 base pointer */
#define I2C0_BASE_PTR ((I2C_MemMapPtr)0x40066000u)
Demo projects works so it should not be any hardware issue. Thank you for all help!
Regards,
Simo