Hi everybody,
I built my own Arduino board based on an ATMEGA2560. Burnt the bootloader successfully, loaded up a test sketch - so far so good.
But when I hook up a Touchscreen LCD (one of these: https://ae01.alicdn.com/kf/HTB12yLsOVXXXXa0apXXq6xXFXXXa/module-2-8inch-TFT-font-b-Touch-b-font-font-b-Shield-b-font-Lcd-Module.jpg ) there is a strage problem:
-
On my prototyping setup with the Arduino Mega everything works without problems.
-
On my own board the same sketch only displays a black, slightly flickering screen:
note: I know the screen is broken, but this isn't the problem (tested already with another, not broken screen) -
However, if I load a sketch onto my board which only displays text and does NOT use the touchscreen.h library, it works without problems.
So I guess there must be something wrong with my board? But what would be wrong? I already checked for all pins if they are connected, especially the 4 pins which are used for the touchscreen; which are:
#define YP A2
#define XM A3
#define YM 8
#define XP 9
Did I forget a capacitor or something like that anywhere? But as far as I can see on the Arduino MEGA Reference Layout, the 4 pins mentioned above are straight going to the microcontroller (ATMEGA2560)
Would be really nice if someone has a good hint on what I should check, because I already spent all day searching the issue.
Especially that the LCD works and displays everything I want to, but as soon as I initialize the touchscreen pins in the sketch I only get the blank black screen with backlight on.