2014-04-11 02:21 AM
Guys,
Does anyone of you have experience on decoding bmp ? I want to display bmp file to my LCD... Any clues ? thanks #i-have-a-clue2014-04-28 06:31 AM
I'd look at the BMP, but the JPG/PNG provided so far are not usable by me, attach the real BMP to your post as an attachment.
Also please don't use line-numbering when posting code, it just makes it more difficult to paste.2014-04-28 06:59 AM
allright, here's the bmp
thanks ________________ Attachments : test32.bmp : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I1CG&d=%2Fa%2F0X0000000bkq%2Fomt75OK3rNqkqJEvI6ao2XI9hWwOTBaLvgRqrkeQN3w&asPdf=false2014-04-28 07:25 AM
Does you display go white when you write 0xFFFF as the colour? If it doesn't I'd look more carefully at how it's set up and connected.
LCD_Clear(0xFFFF);
2014-04-28 07:35 AM
It's not going to be white, looks like transparent ?
2014-04-28 08:07 AM
Ok, so what's the right RGB colour space number for White?
2014-04-28 03:24 PM
Well, I have no clue on how to know white color for this LCD ?
How to test white color for it ? thanks2014-04-28 04:30 PM
Well I think there is a problem with your display, or it's attachment. What you should probably do is test the primary colours, and try reading back the values programmed into the buffer.
/* LCD colour */
#define White 0xFFFF
#define Black 0x0000
#define Blue 0x001F
#define Red 0xF800
#define Magenta 0xF81F
#define Green 0x07E0
#define Cyan 0x7FFF
#define Yellow 0xFFE0
2014-04-28 04:36 PM
In this function ?
void LCD_Clear(uint16_t Color)
{
uint32_t index=0;
LCD_SetCursor(0,0);
LCD_WriteRAM_Prepare(); /* Prepare to write GRAM */
for(index=0;index<76800;index++)
{
LCD_RAM=Color;
printf(Color);
}
}
2014-04-28 04:43 PM
I've made a test function :
void LCD_Color_test()
{
LCD_Clear(Black);
delay_ms(1000);
LCD_Clear(White);
delay_ms(1000);
LCD_Clear(Grey);
delay_ms(1000);
LCD_Clear(Blue);
delay_ms(1000);
LCD_Clear(Blue2);
delay_ms(1000);
LCD_Clear(Red);
delay_ms(1000);
LCD_Clear(Magenta);
delay_ms(1000);
LCD_Clear(Green);
delay_ms(1000);
LCD_Clear(Cyan);
delay_ms(1000);
LCD_Clear(Yellow);
}
Can you display white properly in your LCD ? thanks
2014-04-28 04:51 PM
It can do Grey, but can not do White, why is it ?