Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Kevin

Pages: [1]
1
Mark-

In one of my previous posts I mentioned that my .bmp pictures reduced to fit the tft in photoshop 6.0 had two extra bytes in the length and two extra nulls appended at the end of the file.

When displaying these files utasker would hang.

From what I can tell it looks like fnDisplayBitmap is reading from the file 3 bytes at a time, but at the end there are only two bytes available.  I added the following to fnDisplayBitmap in TFT.c

BMP_Length = (BMP_Length/3) * 3;   //{kevin 1} bmp file must be multiple of color bytes (3 bytes = 24bit)

after BMP_Length is read from the file.  Since it's int math, any file not divisible by 3 is truncated.

This seemed to work fine for me.

-Kevin

Code: [Select]
                    BMP_Length = (ptrBMP_info->biSizeImage[3] << 24);    // bit map content length
                    BMP_Length |= (ptrBMP_info->biSizeImage[2] << 16);
                    BMP_Length |= (ptrBMP_info->biSizeImage[1] << 8);
                    BMP_Length |= (ptrBMP_info->biSizeImage[0]);
                    if (BMP_Length == 0) {
                        BMP_Length = (ptrBMP->bmLength[3] << 24);        // if the content length is zero, take it from the header
                        BMP_Length |= (ptrBMP->bmLength[2] << 16);
                        BMP_Length |= (ptrBMP->bmLength[1] << 8);
                        BMP_Length |= (ptrBMP->bmLength[0]);
                        BMP_Length -= ptrBMP->bmOffBits[0];
                    }
BMP_Length = (BMP_Length/3) * 3; //{kevin 1} bmp file must be multiple of color bytes (3 bytes = 24bit)


2
NXPTM LPC2XXX and LPC17XX / Sharp LQ043 4.3" 480x272 TFT
« on: July 20, 2010, 03:14:48 AM »
I found an LPC2478 development board that has the Sharp LQ043 4.3" 480x272 TFT instead of the 3.5" display on the OLIMEX board.

I've got utasker and an SD Card working on the board. 

Now I'm going to try and get the tft going.

Has anyone else got the LQ043 http://www.sparkfun.com/commerce/product_info.php?products_id=8335 working with the LPC2478?

-Kevin

3
NXPTM LPC2XXX and LPC17XX / LPC2478-STK SDRAM one or two chip support
« on: July 19, 2010, 02:53:52 AM »
Mark-

In the utasker1.4LCD.pdf you mention that one or both SDRAM chips may be installed on the LPC2478-STK.  Does the code use both chips or only one?

One chip is used for D0-15 and the other for D16-D31.

-Kevin

4
I'm using the simulator with SD CARD support and the debug disk command print.

When I use the disk > print file command on a file larger than 4096 bytes,  I get "READ ERROR occured".  Is this a limit in uTFat or just in the debug print command?

-Kevin

5
I'm using only the simulator at this time, but the target is the LPC2478-STK.

1. I've enabled SDCARD_SUPPORT and re-named the HTTP default file BMenu.htm (I think that's the spelling), ftp'd the HTTP files to the SD-Card and the Web page is being served from the SD-CARD (with a few glitches like the refresh generating a 404 error).

2. Do you have a recommendation fro displaying .bmp files from the SD card?  I was trying to use place the file in the same sdram location as when the image is posted from the web page, but I can't find the routine that does it or the location of the buffer.  I thought I might try adding a uart menu command to load bmp's from the sd card.

3. When I want to run this on hardware, can I just use the SEL0, SCLK0, MISO0 and MOSI0 lines that appear to be unused on the LPC2478-STK?

Thanks
Kevin

Pages: [1]