Arduino Compatible TFT LCD module (HCMODU0043)
Arduino Compatible TFT LCD module (HCMODU0043)
Description:
This Arduino compatible TFT screen has a colour backlit 1.77" LCD with a resolution of 160 x 128 pixels. Designed primarily for the Arduino Esplora (search for HCDVBD0014 in our shop) it had easy to access headers and communicates via SPI and so can be easily used with other Arduino boards such as the Uno, Mega, and Leonardo. The LCD is compatible with the Arduino TFT library and Esplora example TFT sketches.
Besides the LCD, the module also includes a microSD interface which works with the micro SD library allowing of storage of graphic data or other data.
The screen runs on +5 VDC
The micro-SD slot is accessible through the SD card library.
The LED backlight is dimmable by PWM.
The screen's headers are laid out so it easily sockets into the Arduino Esplora and Arduino Robot.
FAQ:
I'm using this module with an Arduino board and the Arduino TFT library but the colours seem to be messed up.
If using with the Arduino TFT library supplied as part of your Arduino development enviroment you will need to make a small modification to one of the library files. In your folder that contains your Arduino development environment open up the file \libraries\TFT\utility\Adafruit_GFX.cpp in a text editor.
Find the following code:
uint16_t Adafruit_GFX::newColor(uint8_t r, uint8_t g, uint8_t b) {
return ((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b >> 3);
}
Change it to this and save it:
uint16_t Adafruit_GFX::newColor(uint8_t r, uint8_t g, uint8_t b) {
// return ((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b >> 3);
return ((b & 0xF8) << 8) | ((g & 0xFC) << 3) | (r >> 3);
}
Downloads: The TFT Library is now built into the Arduino IDE from version 1.05 onwards. Example tutorial is available on the official Arduino website here: http://arduino.cc/en/Tutorial/TFTBitmapLogo
You do not have the required permissions to view the files attached to this post.
-
- Posts: 12
- Joined: Tue Jun 25, 2013 10:41 pm
Re: Arduino Compatible TFT LCD module (HCMODU0043)
Couple of questions on this module.
My module backlight seems quite dim. The screen is only really visible in low light. Certainly a lot dimmer than cell phone screens I have.
I have the backlight connected to +5v.
Secondly, how many bits per pixel colour does this module support?
My module backlight seems quite dim. The screen is only really visible in low light. Certainly a lot dimmer than cell phone screens I have.
I have the backlight connected to +5v.
Secondly, how many bits per pixel colour does this module support?
Re: Arduino Compatible TFT LCD module (HCMODU0043)
The backlight should defiantly not be that dim and should be visible in a normally lit room. Do you have the BL pin (backlight control) enabled?
The screen (Arduino TFT library) has 255 different levels of red green and blue giving a colour range of 24 bits per pixel in total.
The screen (Arduino TFT library) has 255 different levels of red green and blue giving a colour range of 24 bits per pixel in total.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.
Re: Arduino Compatible TFT LCD module (HCMODU0043)
Hi
I've been having the same problem the backlight is very dimmed i tried a fading command on PWM PIN to check the max intensity but still not great at full scale the white is more greyish than white. I'm also having issues regarding colors. I'm using a arduino nano with that screen and i also used a UNO just in case. If i upload a image white BG and pink logo the logo becomes blue on the display same issue if i program colors by RGB or color code. Any idea why?
Frederic
I've been having the same problem the backlight is very dimmed i tried a fading command on PWM PIN to check the max intensity but still not great at full scale the white is more greyish than white. I'm also having issues regarding colors. I'm using a arduino nano with that screen and i also used a UNO just in case. If i upload a image white BG and pink logo the logo becomes blue on the display same issue if i program colors by RGB or color code. Any idea why?
Frederic
Re: Arduino Compatible TFT LCD module (HCMODU0043)
If you use an image with separate red, green, and blue colours are you able to see them ok?
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.
Re: Arduino Compatible TFT LCD module (HCMODU0043)
Yes and the same happens with text colors. Black and white are right but after the colors seem to be in different order. Same if I use the tftgraph example I end up with purple and blue so in that case the yellow becomes purple and pink becomes blue. Ive noticed that if I change the order of the colors for text I can get the right color.
Re: Arduino Compatible TFT LCD module (HCMODU0043)
In your sketch can you try programming the colours in reverse order, i.e. BGR not RGB. So for instance in the TFT graph example if you use the following instead you should see a RED colour for the graph:
TFTscreen.stroke(0,0,255);
TFTscreen.stroke(0,0,255);
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.
Re: Arduino Compatible TFT LCD module (HCMODU0043)
Hi Andrew
Yes in the sketch that's what i've been doing and that's simple enough to be honest. But I don't know what to do when i use a BMP how do i change that? I've tried to convert it to CMYK but with no joy. Still had the color problem on the screen. Thank you for your help.
Yes in the sketch that's what i've been doing and that's simple enough to be honest. But I don't know what to do when i use a BMP how do i change that? I've tried to convert it to CMYK but with no joy. Still had the color problem on the screen. Thank you for your help.
Re: Arduino Compatible TFT LCD module (HCMODU0043)
Hi Andrew
Yes in the sketch that's what i've been doing and that's simple enough to be honest. But I don't know what to do when i use a BMP how do i change that? I've tried to convert it to CMYK but with no joy. Still had the color problem on the screen. Thank you for your help.
Yes in the sketch that's what i've been doing and that's simple enough to be honest. But I don't know what to do when i use a BMP how do i change that? I've tried to convert it to CMYK but with no joy. Still had the color problem on the screen. Thank you for your help.
Re: Arduino Compatible TFT LCD module (HCMODU0043)
Can you try this: In your folder that contains your Arduino development environment open up the file \libraries\TFT\utility\Adafruit_GFX.cpp in a text editor.
Find the following code:
uint16_t Adafruit_GFX::newColor(uint8_t r, uint8_t g, uint8_t b) {
return ((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b >> 3);
}
And change it to this and save it:
uint16_t Adafruit_GFX::newColor(uint8_t r, uint8_t g, uint8_t b) {
// return ((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b >> 3);
return ((b & 0xF8) << 8) | ((g & 0xFC) << 3) | (r >> 3);
}
Hopefully that will fix it. If you can confirm if it does or not it would be appreciated thanks.
Find the following code:
uint16_t Adafruit_GFX::newColor(uint8_t r, uint8_t g, uint8_t b) {
return ((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b >> 3);
}
And change it to this and save it:
uint16_t Adafruit_GFX::newColor(uint8_t r, uint8_t g, uint8_t b) {
// return ((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b >> 3);
return ((b & 0xF8) << 8) | ((g & 0xFC) << 3) | (r >> 3);
}
Hopefully that will fix it. If you can confirm if it does or not it would be appreciated thanks.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.