| View previous topic :: View next topic |
| Author |
Message |
jonloveslou
Joined: 20 Jul 2007 Posts: 13
|
Posted: Sun Jun 22, 2008 1:07 pm Post subject: 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 |
|
| Back to top |
|
 |
shraddha
Joined: 12 Jan 2007 Posts: 8 Location: bangalore
|
Posted: Tue Jun 24, 2008 2:20 am Post subject: |
|
|
facing the same problem will anybody share his working code
(LPC2378STK+OpenOCD+Wiggler) |
|
| Back to top |
|
 |
Sak1s
Joined: 01 Jul 2008 Posts: 3 Location: Athens ,Greece
|
Posted: Tue Jul 01, 2008 9:38 pm Post subject: |
|
|
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 _________________ the (in)Love for the men.....is the delusion that a woman differs from the other |
|
| Back to top |
|
 |
jonloveslou
Joined: 20 Jul 2007 Posts: 13
|
Posted: Wed Jul 09, 2008 7:46 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
Sak1s
Joined: 01 Jul 2008 Posts: 3 Location: Athens ,Greece
|
Posted: Wed Jul 09, 2008 6:45 pm Post subject: |
|
|
ok....its fixed ! _________________ the (in)Love for the men.....is the delusion that a woman differs from the other |
|
| Back to top |
|
 |
jonloveslou
Joined: 20 Jul 2007 Posts: 13
|
Posted: Thu Jul 10, 2008 1:26 am Post subject: |
|
|
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! |
|
| Back to top |
|
 |
jonloveslou
Joined: 20 Jul 2007 Posts: 13
|
Posted: Fri Jul 11, 2008 1:21 am Post subject: |
|
|
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:
| Code: | // 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:
| Code: | 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 |
|
| Back to top |
|
 |
Tactcom
Joined: 22 Nov 2008 Posts: 2 Location: Plymouth (UK)
|
Posted: Sat Nov 22, 2008 2:09 pm Post subject: |
|
|
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) |
|
| Back to top |
|
 |
Sak1s
Joined: 01 Jul 2008 Posts: 3 Location: Athens ,Greece
|
Posted: Sat Mar 21, 2009 8:43 pm Post subject: |
|
|
...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 _________________ the (in)Love for the men.....is the delusion that a woman differs from the other |
|
| Back to top |
|
 |
vickyfires
Joined: 12 Apr 2009 Posts: 2
|
Posted: Sun Apr 12, 2009 8:42 pm Post subject: wats ur compiler? |
|
|
| what compiler r u people using for this olimex lpc2378 sdk? |
|
| Back to top |
|
 |
jharvey
Joined: 14 Jul 2009 Posts: 20 Location: USA
|
Posted: Wed Sep 16, 2009 7:05 pm Post subject: |
|
|
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_projects/arm_projects/#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. |
|
| Back to top |
|
 |
jharvey
Joined: 14 Jul 2009 Posts: 20 Location: USA
|
Posted: Tue Sep 22, 2009 3:02 am Post subject: |
|
|
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.
| Code: | // --- 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.
| Code: | // 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. |
|
| Back to top |
|
 |
cfb
Joined: 30 Aug 2008 Posts: 87
|
Posted: Tue Sep 22, 2009 6:03 pm Post subject: |
|
|
| jharvey wrote: | | 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/documents/microcontrollers/?type=user _________________ Chris Burrows
Armaide: ARM Development for Pascal Programmers
http://www.armaide.com |
|
| Back to top |
|
 |
jharvey
Joined: 14 Jul 2009 Posts: 20 Location: USA
|
Posted: Wed Sep 23, 2009 9:30 am Post subject: |
|
|
| That PDF has answered a great many questions. Thanks. |
|
| Back to top |
|
 |
jharvey
Joined: 14 Jul 2009 Posts: 20 Location: USA
|
Posted: Sat Sep 26, 2009 8:29 am Post subject: |
|
|
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.
and a link to the larger larger version of this thumbnail.
http://i324.photobucket.com/albums/k352/kb1gtt/phase1_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_merged_working.rar |
|
| Back to top |
|
 |
|