2010-04-19 08:44 AM
loading images to stm3210E-eval LCD
2011-05-17 04:47 AM
Did anybody work on this before?
Any ideas please ?2011-05-17 04:47 AM
can any body help with this ?
2011-05-17 04:47 AM
I want to know if you use a software to draw or convert these icons.
Best Regards,2011-05-17 04:47 AM
The programm that can convert BMP 24 bit to BMP 16 bit calls photoshop
use ''save as -> *.bmp ->ok'' then photoshop will show message ''bmp format'' choose the 16-bit 565 - format. Best regards.2011-05-17 04:47 AM
http://www.imageconverterplus.com/how-to-convert/jpeg_bmp.html
can also save .bmp files in 16-bit 565 format. You can also easily specify the resolution and other futures. More images can be proced in one step (it is scripting software). And - most important - it cost much less then photoshop :) And the instalation file has approx. 10 MB.2011-05-17 04:47 AM
Hi,
I am using SD card, or NAND flash drive to store .bmp files and then I image them as icon in menu, or just as images on LCD. The whole project is attached. I am using KEIL uVision and ULINK2 withhttp://www.st.com/mcu/modules.php?name=mcu&file=devicedocsmdt&FAM=110&DEV=STM3210E-EVAL
. In order to have ability to read the images from FAT system (SD card, or NAND), you need to implement some FAT file system in STM I implementedhttp://elm-chan.org/fsw/ff/00index_e.html
file system as I am describing here:https://my.st.com/public/STe2ecommunities/mcu/Lists/ARM%20CortexM3%20STM32/DispForm.aspx?ID=11842
I implemented LCD_WriteBMP_FAT to read .bmp file from FAT file system and to draw it on LCD. The core is from LCD_WriteBMP that is located in stm3210e_lcd.c. It opens the .bmp file with defined name, read the image size from that file, set display window according to the image size and draw the image by 512 Bytes parts. It uses only 512 Bytes buffer in stack, so the whole image do not need to be loaded into the RAM at once. The original DEMO code from STM3210E-EVAL board was used, just the draw_bmp(); is called from draw_bmp.c before the menu is started. The images (.bmp files) have to be stored on SDcard, or NAND flash before this program can be runned. I am using the USB Mass Storage mode, that is implemented on demo program. The images in .bmp 16 bits Red : 5 Green: 6 Blue: 5 format are attached, just copy them to the SD, or NAND. To specify if you want to load files from NAND, or SD Card just comment / uncomment the: //#define SDCARD in diskio.c In order to use your own icons in menu, just replace the LCD_NORDisplay in menu.c with LCD_WriteBMP_FAT, e.g.: LCD_SetDisplayWindow(239, 319, 240, 320); LCD_NORDisplay(HELP); replace with: LCD_WriteBMP_FAT(239,319,''Ico_help.bmp''); the size of window (240 x 320) do nod need to be defined, it is read from .bmp file. The LCD_SetDisplayWindow function is called inside the LCD_WriteBMP_FAT. I have my own menu, with black background, with icons with black background :) Thehttp://www.imageconverterplus.com/how-to-convert/jpeg_bmp.html
, or Adobe Photoshop can save .bmp files in 16-bit 565 format. When using Adobe Photoshop uncomment the line: //size = size - 1; // Adobe Photoshop Anomaly :) in LCD_WriteBMP_FAT. The resolution of the .bmp image has to be even (not odd), otherwise the drawn image is incorrect. The FatFS was implemented for NAND as well as for SD Card. However writing to the NAND flash file system is not working till now. I am going to create new thread on this topic. Hope it will help to someone. Afi