Olimex LPC2378-STK and the Nokia 6110 screen

Hi guys,

Does anybody have any working code for the LCD screen on the 2378-STK dev board from Olimex?

I’ve tried initialising the display using Jim Lynch’s code and I think I’ve set the SSP0 peripheral up correctly and selected the various pins to do their required function.

The boards come with the Olimex symbol already on them when new so somebody, somewhere has got the displays working!

Regards,

Jon

facing the same problem will anybody share his working code

(LPC2378STK+OpenOCD+Wiggler)

i am trying to make the LCD works with the eclipse IDE as the example of James P. Lynch ,but the code its a bit buggy ,but give it a look and post any fixes or any ideas.

download from here :

http://insane.homelinux.net/lpc2378stk.zip

I’m getting the following error message when trying to download that zip file:

Error - Bad Request

This web server is running in SSL mode. Try the URL https://10.17.132.126:80/ instead.

ok…its fixed !

Ok, I’ve got a copy now.

I’ve left my version at home (with no internet!) so I have nothing to compare it to at the moment, but I will take a look through and see.

Cheers!

Brilliant. The code works great.

I’ve only tried the PutChar, PutStr, SetPixel, ClearScreen and Write130x130bmp functions and they seem to behave well.

Apart from the PutChar…

Any letters that require pixels in the bottom row (y, p, q, etc) get messed up and the bottom row is placed at the top of the character instead.

I fixed this by doing the following:

// get pointer to the last byte of the desired character
pChar = pFont + (nBytes * (c - 0x1F)) + nBytes;

I removed “- 1” from the end of that line and also, further down:

for (i = nRows; i >= 0; i--) {
// copy pixel row from font table and then decrement row
PixelRow = *pChar--;

I removed “- 1” from nRows.

If there any other bugs you can think of, let me know and I will take a look.

Jon

Gus im in the same kinda boat as well lol…

Tried the link but both don’t work :S anyone got a working link?

Thanks,

(another person called Jon… lol)

…the source code is here…

http://insane.homelinux.net/lcd.rar

In the rar there are 2 projects…i dont remember which is the working one !

Test and post any comment

what compiler r u people using for this olimex lpc2378 sdk?

The above posted code works great on my 2378 board. However, I’ve attempted to modify it and now it no worky. I’ve been racking my head trying to figure out what’s gone wonky.

I currently get error(s) similar to this, followed by a bunch of others messages, when I compile the project “LPC_LCD-ADC_Sample”.

ADC.c:150: warning: implicit declaration of function ‘InitSpi’

ADC.c:150: warning: nested extern declaration of ‘InitSpi’

Eventually these warning turn into this.

c:/gccfd/yagarto/bin/…/lib/gcc/arm-elf/4.2.2/…/…/…/…/arm-elf/bin/ld.exe: BFD

(GNU Binutils) 2.18 assertion fail …/…/binutils-2.18/bfd/elf32-arm.c:6532

C:\gccfd\projects\LPC_LCD-ADC_merged/ADC.c:178: dangerous relocation: (null)

collect2: ld returned 1 exit status

Looks like I didn’t do the declaration correctly. I see them in the .h files perhaps I don’t call for the .h file in the correct location. Or perhaps I’ve buggered the make file some how and the .o files can’t see each other or something. Not really sure what changed from the LCD file to this one and caused the problem. I also don’t know how to fix it.

At the below link are three projects I’m working with.

http://jaredharvey.com/temp/projects_2009-08-29.zip

I’m compiling with the prepackage collection of windows based compiler tools that came with the 2378 board. This includes eclipse Version: 3.4.1 Build id: M20080911-1700, arm-elf-gcc (GCC) 4.2.2, and flash magic.

LPC_LCD_Sample is the slightly modified project from the above posted code and it displays a custom message on the LCD screen. This has been only slightly modified.

LPC_ADC_Sample is a modified copy of a project at a winarm page. It was orginally for a LPC21XX chips, I replaced the LPC21XX.h file with LPC23XX, and it appears to compile. I think it runs. It is to large for RAM so it runs from ROM. It also uses the Thumb mode compression. I found that code here and is also public domain.

http://www.siwawi.arubi.uni-kl.de/avr_p … #gcc_stdio

LPC_LCD-ADC_Sample is a copy of LPC_ADC_Sample, with bits of the LCD code copied and pasted into the orginal sample code.

It does not compile. I have no need for the UART stuff. I seem to recall ADC is defined in there. So I have to keep it, but I’d be willing to remove it from the make file if I can.

My goal is to get the accelerometer displaying on the LCD.

Any help will be much appreciated, and thanks in advance.

Turns out make clean, then make all fixed my little red wagon on the above post. Appears when I copied the original file, there were some other files that needed updating that weren’t being updated. Now I’ve got different issues.

I appear to have a clock issue, when I merge this LCD and ADC code together, if I enable the ADC or the PLL, it causes the LCD to fail. So I’m looking at the lower level bits now to confirm exactly what’s going on. However, I can’t find information about what the lower level bits do.

Is there is a better data sheet out there for the 2378? All I can find from NXP is this little 55 page doc that’s really just an overview titled LPC2377_78_4.pdf Right now I’m looking for a break down of the memory. For example, I’m looking to learn exactly what this does.

// --- enable and connect the PLL (Phase Locked Loop) ---
// a. set multiplier and divider
PLLCFG = MSEL | (0<<PSEL1) | (1<<PSEL0);

I see PLLCFG equates to 0xE01FC084, however, I don’t know what the bits at this memory location will do, so I can’t confirm if the above bit manipulation will work. Also from the ADC side I see this.

// Setup A/D: 10-bit AIN0 @ 4,2MHz "Non-Burst"-Mode

PINSEL1  |=  (1UL<<22);  //  set function P0.27 as AIN0

In this case PINSEL1 equates to 0xE002C004, so what do the bits at this location do? I can’t determine that with the data sheet I have. All I can determine is that this section of memory is the APB PERIPHERALS. Perhaps there is a generic ARM7 doc out there or something that I’m missing. Not sure.

Any help would be much appreciated.

jharvey:
Is there is a better data sheet out there for the 2378? All I can find from NXP is this little 55 page doc that’s really just an overview titled LPC2377_78_4.pdf

What you need is the 684 page LPC23xx User Manual (UM10211). You can download a copy from:

http://www.standardics.nxp.com/support/ … ?type=user

That PDF has answered a great many questions. Thanks.

I got my above project working. I thought I’d post it here as it started from the I2C code found in this thread. The attached zip was compiled with winbloz XP using the prepackaged CD that came with the dev board.

This code will read the X and Y of the accelerometer, and display it on the LCD. There are some unfinished parts like the PLL, ect. It compiles with some complaint about implicit functions, but it works so I haven’t paid it much concern. Here’s a picture of it working.

http://i324.photobucket.com/albums/k352 … 20x240.jpg

and a link to the larger larger version of this thumbnail.

http://i324.photobucket.com/albums/k352 … ase1_1.jpg

Seems only fair to post what I’ve got, might be handy for someone else who is working with the ADC.

http://jaredharvey.com/temp/LPC_LCD-ADC … orking.rar

Hi Jared,

I’ve been struggling, with the same LCD you are using, to get images to display correctly. Could you post a picture of what the bmp.h image should look like? Do you know if the controller on the Nokia display still supports 8 bits/pixel? I know you are using the 12 bpp mode but thought I would ask anyhow.

I’m starting to think the latest release of these displays has a controller that dropped the support of 8 bpp.

Thanks in advance,

Dan

Sorry I’m actually quite ignorant about the LCD. I used the above posted copy from Sak1s titled LCD.rar. I see it has a bmp.h file, but I have no idea what it should look like or how to display it. I’m mostly interested in the LCD as a means of text display.

I just took a look, I see LCDWrite130x130bmp with a note that you should generate the bmp with Olimex BmpToArray.exe utility. I just tried it and I got a display that looks intentional, not random, or broken. A variety of colors and pico kind of image. I have no idea what is should have drawn, but id dit appear to be the bits from the bmp file.

I don’t have an idea how one gets the BmpToArray program. I do see posted code for a BmpToArray program. Perhaps that will work.

Hi,

I also figured the bmp.h image was correct with the various overlapping color bars. I’m not trying to find the program that converts images (probably found on the olimex site), really just looking to see if anyone has been able to use the 8 bits/pixel format with the screen.

It looks like that mode may have been dropped with the latest controllers.

Thanks for your reply.

Hello

I’ve been trying to get the lcd screen to work on the LPC2378-STK, I am using the Eclipse/GCC environment with the “blinky” project working as it should.

The links in the previous posts are old and do not work anymore, so if anyone could help with some new links with eclipse projects for the lcd or anything more advanced from the blinky it will be great!

There are full sets of sample projects for the IAR EW and Keil IDEs, but I cannot find out how to make my arm-usb-tiny jtag programmer to work with them or how to at least get the compiled .bin file flashed using the eclipse’s configuration…

Thanks in advance for your help!

Dear all,

I am new to arm processors and embedded systems. I have purchased an lpc2378-stk kit. i have tried doing everything possible to run the lcd. The lcd has GE 8 sticker. pls write a simple c program for me displaying some text like abcd…i want to know the details of ssp control registers especially the ssp0cro and ssp0cr1 values. also i have understood that if we write any values to data register, it will automatically transmit serially. also that values has to be hexa equivalent of ascii values of characters. all my questions can be answered by writing a small program for me pls. i request your help pls. thanks.