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.


Messages - Kevin

Pages: [1] 2
1
µTasker general / Re: How to use the UART to get data and send data!
« on: September 04, 2010, 03:05:51 AM »
Thanks.  I initially read the defin as LPC21xxx, but its for not LCP21xx.  Thanks!

-Kevin

2
µTasker general / Re: How to use the UART to get data and send data!
« on: September 03, 2010, 02:11:21 AM »
Where are the port assignments for the UART TXD and RXD?  I found CTS and RTS in app_hw_lpc23xx.h.

I want to add two additional uarts one for a radio link and another for irda.

3
µTasker general / Re: How to use the UART to get data and send data!
« on: August 19, 2010, 02:38:44 AM »
Thanks Martin!

4
NXPTM LPC2XXX and LPC17XX / Re: Sharp LQ043 4.3" 480x272 TFT
« on: August 13, 2010, 10:01:45 PM »
Found the fix for the noisy picture - Don't invert the panel clock.

Picture looks great!

#if defined TFT_LQ043
   LCD_POL    = (BYPASS_PIXEL_CLOCK_DIVIDER | INVERT_VERT_SYNC | INVERT_HORIZ_SYNC | ((GLCD_X-1) << 16));
#else
   LCD_POL    = (BYPASS_PIXEL_CLOCK_DIVIDER | INVERT_VERT_SYNC | INVERT_HORIZ_SYNC | INVERT_PANEL_CLOCK | ((GLCD_X-1) << 16));
#endif

-Kevin

5
It seems like every LPC has an SD controller.  You'd think they would have fixed the issue before the LPC23/24xx where introduced.

-Kevin

6
Mark-

Just a thought.  Could the over runs be caused by writing images from the sd card to the same memory read from the tft controller?

Have you tried writing the image to one buffer, while the image being displayed is being read from another buffer, then switching buffers?

-Kevin

7
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)


8
NXPTM LPC2XXX and LPC17XX / Re: Sharp LQ043 4.3" 480x272 TFT
« on: July 21, 2010, 06:49:37 AM »
Wow it worked great!

Once I got the 480x272 working in the simulator, I tried it out on the target and it worked

some pixels are off color, bit mainly noticeable in fine gradients. I'll have to work on the color space.

I changed tft.c based on the LQ043 datasheet

Code: [Select]
#define PIXEL_CLOCK_RATE         9000000 //9Mhz
#define HORIZONTAL_BACK_PORCH    2 //2 clocks
#define HORIZONTAL_FRONT_PORCH   2 //2 clocks
#define HORIZONTAL_PULSE         41 //41 clocks
#define VERTICAL_BACK_PORCH      2 //2 lines
#define VERTICAL_FRONT_PORCH     2 //2 lines
#define VERTICAL_PULSE           10 //10 lines
#elif defined OLIMEX_LPC2478_STK
#define PIXEL_CLOCK_RATE         6400000
#define HORIZONTAL_BACK_PORCH    38
#define HORIZONTAL_FRONT_PORCH   20
#define HORIZONTAL_PULSE         30
#define VERTICAL_BACK_PORCH      15
#define VERTICAL_FRONT_PORCH     5
#define VERTICAL_PULSE           3
#endif

and config .h
Code: [Select]
#define SUPPORT_TFT
#define LCD_PARTNER_TASK       TASK_APPLICATION
#define GLCD_X                 480                                   // horizontal resolution of the LCD display in pixels
#define GLCD_Y                 272                                   // vertical resolution of the LCD display in pixels
#define LCD_PIXEL_COLOUR       (COLORREF)RGB(255,255,255)
#define GLCD_COLOR                                                   // color GLCD being used
#define LCD_ON_COLOUR          (COLORREF)RGB(0,0,0)                  // RGB colour of LCD when backlight is on
#define LCD_OFF_COLOUR         (COLORREF)RGB(0,0,0)                  // RGB colour of LCD when backlight is off
    #elif defined OLIMEX_LPC2478_STK
   #define SUPPORT_TFT
#define LCD_PARTNER_TASK       TASK_APPLICATION
#define GLCD_X                 320                                   // horizontal resolution of the LCD display in pixels
#define GLCD_Y                 240                                   // vertical resolution of the LCD display in pixels
#define LCD_PIXEL_COLOUR       (COLORREF)RGB(255,255,255)
#define GLCD_COLOR                                                   // color GLCD being used
#define LCD_ON_COLOUR          (COLORREF)RGB(0,0,0)                  // RGB colour of LCD when backlight is on
#define LCD_OFF_COLOUR         (COLORREF)RGB(0,0,0)                  // RGB colour of LCD when backlight is off
    #endif

Here is a shot of the display (You can see the pixels set to the wrong colors)


original is located at http://static.cargurus.com/images/site/2009/12/03/05/51/2009_ferrari_f430_spider-pic-5687950062379790964.jpeg

-Kevin


9
NXPTM LPC2XXX and LPC17XX / Re: Sharp LQ043 4.3" 480x272 TFT
« on: July 20, 2010, 03:52:58 PM »
Mark-
 
 First I want to say the simulator is a great tool.  The new development board had access to SPI0 on port 2.  After reconfiguring utasker, I checked the pins on the simulator to see that they were assigned correctly.  With the simulator, I could see that the SSEL line had not been programmed correctly and was able to correct it without touching the HW.  SDCARD worked the first time I flashed the image in the new board.


One question:
I had to quit last night because it was getting late, but I could not find how to change the simulator TFT to 480x272.  Where is that configured?

-Kevin

10
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

11
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

12
Mark-
  I'm having some FTP problems with the real target and an SD CARD
  Working on the LPC2478-STK target.
  I've got an SD CARD hanging off of SPI0 (as indicated above).

  I can put small files, but when I try to put the 320x240 images only 64240 bytes transfer and then the target closes the ftp connection.  This happens no matter which image I use.

  The attached session shows that a 4096 byte file works fine (I can also create directories from ftp)

  When I try to transfer the f430.bmp (It's just renamed from F430_320x240_24.bmp) the session is closed and only 64240 bytes are transferred.

  After loading images from the PC directly to the sd card, I have been viewing files on the TFT from the SD card with no issues.

  I have not checked the SD card signals with a scope yet.



Code: [Select]
ftp> dir
200 OK.
150 Data.
drwxr-xr-x 1 502 502 0 Jan 03 2010 dir1
drwxr-xr-x 1 502 502 0 Jul 10 2010 images
226 OK.
ftp: 84 bytes received in 0.14Seconds 0.60Kbytes/sec.
ftp> binary
200 OK.
ftp> put B4096.txt
200 OK.
150 Data.
226 OK.
ftp: 4096 bytes sent in 0.00Seconds 4096000.00Kbytes/sec.
ftp> put B8890.txt
200 OK.
150 Data.
226 OK.
ftp: 8890 bytes sent in 0.00Seconds 8890000.00Kbytes/sec.
ftp> put f430.bmp
200 OK.
150 Data.
> Netout :Connection reset by peer
Connection closed by remote host.
ftp>

Code: [Select]
ftp> dir
200 OK.
150 Data.
drwxr-xr-x 1 502 502 0 Jan 03 2010 dir1
-rw-r--r-- 1 502 502 4096 Jan 03 2010 B4096.txt
-rw-r--r-- 1 502 502 8890 Jan 03 2010 B8890.txt
drwxr-xr-x 1 502 502 0 Jul 10 2010 images
-rw-r--r-- 1 502 502 64240 Jan 03 2010 f430.bmp
226 OK.
ftp: 231 bytes received in 0.22Seconds 1.05Kbytes/sec.
ftp>


13
I got the SD card working with SPI0.
-Kevin

14
Mark-

In app_hw_lpc23xx.h: The SD card SPI pin assignments are as follows:
  
   #define SPI_CS1_0                  PORT0_BIT14
    PINSEL0 |= (PINSEL0_P0_8_MISO1 | PINSEL0_P0_9_MOSI1 | PINSEL0_P0_7_SCK1); \

    PORT0_BIT14 is pin 69 which is the VBUS line connected to the usb_dev connector (I verified continuity)

    PINSEL0_P0_8_MISO1 is pin 160 and connected to LCD16 on the TFT and EXT-8 (I verified continuity)
    PINSEL0_P0_9_MOSI1 is pin 158 and connected to LCD17 on the TFT and EXT-9 (did not check continuity)
    PINSEL0_P0_7_SCK1 is pin 162 and is connected to LCD9 on the TFT and EXT-7 (did not check continuity)

    I don't think you are actually using these connections on teh LPC2478-STK since they would interfere with teh USB and TFT.

    Have you tried using SPI or SPI0?  This pins connect to the UEXT connector and are otherwise not used on the board.

    Unfortunately,  it looks like SCK0 is on PINSEL0 but MOSI, MISO and SSEL are on PINSEL1.
    SCK0: PINSEL0_P0_15_SCK0 pin 128
    SSEL0: PORT0_BIT16  pin 130
    MISO0: PINSEL1_P0_17_MISO0 pin 126
    MOSI0: PINSEL1_P0_18_MOSI0 pin 124

    What signals are you using in the development version?

   -Kevin




  


15
This morning I tried re-formatting the sd card and everything started working!  (note this is all in the simulator).

I added DO_VIEW_FILE to the debug command list, ftp the bmp files to the sd-card and type "view [file.bmp]" and the picture shows up on the simulator tft display.

Next, I'm going to try compiling for the target (after hooking up the spi bus to the sd card).

-Kevin

Pages: [1] 2