Arduino Compatible TFT LCD module (HCMODU0043)

LCD, TFT, OLED, LED modules
admin
Site Admin
Posts: 866
Joined: Sun Aug 05, 2012 4:02 pm

Arduino Compatible TFT LCD module (HCMODU0043)

Post by admin » Thu Oct 10, 2013 3:33 pm

Image

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.

Image


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:
GLCD_sch.pdf
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.

richard-at-home
Posts: 12
Joined: Tue Jun 25, 2013 10:41 pm

Re: Arduino Compatible TFT LCD module (HCMODU0043)

Post by richard-at-home » Mon May 12, 2014 11:54 am

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?

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: Arduino Compatible TFT LCD module (HCMODU0043)

Post by andrew » Mon May 12, 2014 4:36 pm

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.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

enrfbezo
Posts: 6
Joined: Sun Jul 06, 2014 2:01 am

Re: Arduino Compatible TFT LCD module (HCMODU0043)

Post by enrfbezo » Sun Jul 06, 2014 2:09 am

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

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: Arduino Compatible TFT LCD module (HCMODU0043)

Post by andrew » Sun Jul 06, 2014 10:00 am

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.

enrfbezo
Posts: 6
Joined: Sun Jul 06, 2014 2:01 am

Re: Arduino Compatible TFT LCD module (HCMODU0043)

Post by enrfbezo » Mon Jul 07, 2014 8:44 am

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.

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: Arduino Compatible TFT LCD module (HCMODU0043)

Post by andrew » Mon Jul 07, 2014 1:42 pm

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);
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

enrfbezo
Posts: 6
Joined: Sun Jul 06, 2014 2:01 am

Re: Arduino Compatible TFT LCD module (HCMODU0043)

Post by enrfbezo » Mon Jul 07, 2014 3:50 pm

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.

enrfbezo
Posts: 6
Joined: Sun Jul 06, 2014 2:01 am

Re: Arduino Compatible TFT LCD module (HCMODU0043)

Post by enrfbezo » Mon Jul 07, 2014 3:50 pm

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.

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: Arduino Compatible TFT LCD module (HCMODU0043)

Post by andrew » Tue Jul 08, 2014 8:03 am

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.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

Post Reply

Return to “Display”