Graphics library for LPC1788

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Graphics library for LPC1788

1,044 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by amlwwalker on Wed Aug 14 11:24:16 MST 2013
Hi everyone,
ok, those who helped me before to get my board talking with my jtag with my computer, thank you very much. Its working! serial data is coming through beautifully.

Now I want to get my lcd working.

I have downloaded emwin and swim-nxp, as I dont know why I would choose one over the other, however:

emWin seems to be compiled code. I dont have a problem with that, however I dont know how to set it up for my board.
I assume there is a way to define the connections to the lcd, and an LCD_init(), a lcd_drawLine() etc etc, or functions to that affect once i have setup the connections. emWin also seems to only have code available for VisualStudio2010, uVision4, LPCXpress_5 and EmbeddedWorkbench_6. I want to compile from the command line using my Makefile and Make. I therefore dont think I can use these - or Im not sure how if I can.

swim-nxp seems to be closer to what Im after, it has documentation outlining the available functions/variables etc, and source code in a folder called swim.
I assume then, I can take the source code and put them in a directory near my program, then in the makefile point to it, and then call the intitalization, drawing functions from main. Fine.
However I cant find the way to set it up or how to initalize it. Also I think my size lcd isnt supported (4.3inch).

If someone could point me to the right files for the LPC1788 and give me some instruction on how to set it up I would be very grateful. Thanks
Labels (1)
0 Kudos
5 Replies

763 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by amlwwalker on Mon Aug 19 02:40:11 MST 2013
Hmmmmm.

After doing:
for f in *.a; do ar t $f | grep "LCD_Get"; done

I.e show me all the functions in the libraries that contain LCD_Get there seems to be none. Where are these functions?
0 Kudos

763 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by amlwwalker on Thu Aug 15 11:44:53 MST 2013
Wow thanks that guide is great.
So as I am using the same chip as the original in that example I dont have to change that stuff. What I have to worry about is:

1. The amount of external RAM, where it is connected and how to change the connections in the code
2. The LCD driver - known as LCDConf.h and to try and find one for my board.
3. The touch screen controller, because it says that I will lose alot of its functionality if I change LCDConf.h

How do I know the type of connection my screen is using. In the document the author says that the original is using Parallel interface, where as the new board is using SPI.
Can external RAM be connected anywhere? I.e will I have to change the connections?

This is my board documentation: https://www.olimex.com/Products/Modules/LCD/MOD-LCD4.3''/resources/MOD-LCD4.3_Rev_A.pdf
and this is the LCD: http://www.datamate-j.com/201202/GFT043HA480272Y_Rev.A.pdf
I cant see what type of connection it is using and I cant tell what LCD/LCD controller it is to know which driver to use from Segger, any chance you can look and see if its more obvious to you.

Thanks
A
0 Kudos

763 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Thu Aug 15 09:02:15 MST 2013
Hi amlwwalker,
The example BSP for LPC1788/LPC4088 embedded artist board(http://www.embeddedartists.com/products/kits/lpc1788_kit.php)
is at
http://www.lpcware.com/content/nxpfile/emwin-522-board-support-package-ea1788-board

This BSP already includes emWin library, header files and configuration files you mentioned in your post. Please have a look.
You can also customize it according to your need.
Please have a look on the documents  for porting from one board to another board mentioned by Wouter at
http://www.nxp.com/documents/application_note/AN11244.pdf
http://www.lpcware.com/content/nxpfile/emwin-porting-guide-ea-lpc1788-bsp-keil-mcb1700-english-versi...


Regards,
MC
0 Kudos

763 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by amlwwalker on Thu Aug 15 08:10:54 MST 2013
Hi Wouter,
Thanks for the reply.
I dont mind using Makefiles etc, I've always wanted to learn how, and I can put an IDE over the top of the source files at any point to edit them. The reason I have gone with this is because I don't have a board specifically supported by LPCXpresso, and the person helped me get my board setup had developed the required files to get it all working. The other thin is LPCXpresso doesnt support my JTAG - which requires a .hex file - at least thats what I understand from reading here.

OK cool, the pictures of what has been done with emWin makes it look really good. I'd like to go with that!
Cool I'll read all that documentation.

so ok, I can use the precompiled libraries, when I download the .exe from the page you linked to it installs the libraries to C:/nxp etc etc.When I extract them there are three folders:
emWin522_Config
emWin522_header
emWin522_library

The first two have .c and .h files, the third one has .a or .lib files depending on the development enviroment you are using. It seems to support embedded workbench, LPCXpresso, uVision and VisualStudio.

So I assume I will need the first two (_Config and _header), they are standard source code, but Im not sure which of the other ones I can pull out and abstract away from the IDE they are setup for. Do they, for instance rely on something in the IDE?

Can you give me a basic run down of how a simple main.c would look if it was including the files for emWin and initialising an LCD with it? Thanks
A
0 Kudos

763 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Wouter on Thu Aug 15 01:20:49 MST 2013
Hi,

Good to hear you managed to get it all working!

Swim vs. emWin:
Swim is very basic, e.g. you can draw lines, print text, read out the touch-screen etc. But, therefore is also really light-weight.
emWin requires more in terms of processing power and memory, but has much more features. You can check what you can do with emWin at http://www.segger.com/emwin-samples.html. The application source-code and a simulated executable (windows) are available for every listed example.
Since your board meets the requirements for emWin, I'd definitely go for emWin!
I'd recommend you to read the startup guide and the porting guide (the latter shows how to port our existing BSPs to your own custom board), both available at our emWin page:
http://www.lpcware.com/content/project/emwin-graphics-library

Using emWin:
Indeed we only provide the pre-compiled libraries for free. You can get the source code if you license it from Segger.
But, also with the pre-compiled libraries it's still very easy to use in any of the supported tool chains.
Simply parse the path of the library and the library itself to you compiler (for GCC something like -L./path/to/library -lemWin_522_LPCXpresso510_M3_LE_Redlib) and make sure your compiler can find all include files (again for GCC something like -I./path/to/include/dir).
But, why make it yourself so difficult? An IDE makes life much easier, and you can use LPCXPresso for free. You'll get easy debugging for free too!

Regards,
Wouter
0 Kudos