I am workng with sifive-Hifive1 micro controller (Arduino compatible), i ve got 2.8" tft lcd resistive breakout display
Now my question is to access the touch function what should i do?
Constraints: My micro controller does not have analog header pins
i thought to use ADC so i bought MCP3008
I took TouchScreen library and made some changes in the code to support my Hifive1 (in C language) and compiled it in my terminal using risc-v compiler.
The problem is with the connections as in the actual touchscreen library it sets the digitalWrite()/pinMode() to analog pins also. So i had to give this following pin connections
Y+ HiFive pin6 and MCP3008 Chan 1
Y- HiFive pin7
X+ HiFive pin9
X- HiFive pin8 and MCP3008 Chan 0
but i dont know where the problem is! i have taken breakout_touchPaint as an example code , when i place my finger on the screen it prints somewhere else.
How to fix this issue?
is it advisable to go with ADC ? or shall i try resistive touchscreen controller like STMPE610 ?
i will attach my code also.
touchScreen.c (13.5 KB)