Hi everyone
i have a sketch file for a control board for a synthesizer (Si5351a) it uses a mega2560 and a 3.2" tft display
which is supposed to display in lanscape mode.
i have loaded it into the mega2560 and it only showes in portate mode.
hp4:
Hi everyone
i have a sketch file for a control board for a synthesizer (Si5351a) it uses a mega2560 and a 3.2" tft display
which is supposed to display in lanscape mode.
i have loaded it into the mega2560 and it only showes in portate mode.
Hi
yeah had a bit of a break with this covid thing
well this sketch i have has its own libraries included and i have loaded them
it all seems to work ok just that the display is not showing in landscape mode
the display is a none touch one
would it help if i load the code ?
been looking at trees all day trying to sort it lol
That is a Shield designed for Mega2560. It even has the information printed on the pcb.
Install UTFT.h library (from rinkydink)
Run the examples e.g.
C:\Users\David Prentice\Documents\Arduino\libraries\UTFT\examples\Arduino (AVR)\UTFT_Demo_480x320\UTFT_Demo_480x320.ino
Edit the constructor e.g from this:
// Remember to change the model parameter to suit your display module!
UTFT myGLCD(CTE32HR,38,39,40,41);
to this:
// Remember to change the model parameter to suit your display module!
UTFT myGLCD(ILI9486, 38, 39, 40, 41);
You will need to do the same edit on every example. Report any problems.
I am fairly certain that every example uses Landscape mode (which is the default for UTFT).
If your project needs Portrait mode:
myGLCD.InitLCD(PORTRAIT);
Yes, there are several libraries that will run on your screen.
Personally, I would prefer a GFX-style library instead of the un-intuitive UTFT library.
e.g. Bodmer's TFT_HX8357.h library.
But this is your decision. Choose whichever library you are happiest with. (normally because the project code was written for that library)
No, I don't want to see any custom project code until you have run all the library examples successfully.
hi
well the sketch uses the Bodmer's TFT_HX8357.h library and there is a user file with it
but i will try the UTFT.h library (from rinkydink)
Thanks
Howard
// Define ONE driver, either HX8357B, HX8357C, ILI9481 or ILI9486
//
// ##################################################################################
//#define HX8357B
//#define HX8357C
#define ILI9481
//#define ILI9486
// ##################################################################################
Your photo in #3 says ILI9486. Change the define to ILI9486.
Don't worry about inverted colours. We can fix that for you. Just say whether TFT_BLACK shows as white. Or TFT_GREEN shows as magenta. Or TFT_BLUE shows as yellow.
hi
yes i have seen that, and Changed the define to ILI9486.
but i still have same problem with display not going landscape
most ot them UTFT examples worked ok and did landscape
byte multiplier;
byte Screen_rotation(1); // have tried 0 2 3
byte Screen_negative;
byte Grey_color_correction;
byte Syn_config;
int TFT_GREY1 = 0x8410 ; //#define TFT_GREY1 0x8410 // New colour // HERE WE CORRECT THE GRAY COLOR !!!!! 11 0x8410 - GREEN LABEL 0x39E7 - YELLOW LABEL
byte flag_plus_or_minus_IF;
byte number_of_channels = 9;
This is part of code from my sketch, as you can see i have tried to change Screen rotation but with no effect.
Hi
well the code is to big to put as a code so i have put it as an attachment with some other files that you might
need
Thanks again for your help so far
Howard
are they all required for one project in different tabs ?
i think so but when you load up the "Synthesizer_Mega_2560_v2_e.ino" it brings up all the other files into tabs
just checked the folder and yes you need to put all files in one folder.
I have got a full landscape with UTFT_Demo_480x320 by Henning Karlsen but i have a few more to test
it seems to me that most of the TFT demos have got set rotation set as landscape but the have about half of
screen not working