Indirect 8bit parallel question

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

Indirect 8bit parallel question

690 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by DT1 on Tue Oct 01 08:57:45 MST 2013
Hi,

I'm currently reading the documentation and setting up my project to add graphics. I'm going to use a Sunplus SPLC501C controller and the hardware connected to it is parallel 8bit. According to what I read so far, GUIDRV_SPAGE is going to be what I need.

I'm using:
- LPC1788 (EA dev board). Ultimately, LPC1778 on custom board.

I downloaded the BSP for that board and the emWin5.22 source also. So far I think I understand a good part of the configuration process. However, there is one gray zone in my mind. Our custom board uses GPIOs for the parallel 8bit bus. I'm not sure how to tell emWin which pin is which GPIO. Looking at "LCD_X_8080_8.c", I can see how to define address pin, RW, etc.:

#define LCD_CLR_RESET()   P7 &= ~(1<<0)
#define LCD_SET_RESET()   P7 |=  (1<<0)
#define LCD_CLR_A0()      P8 &= ~(1<<0)
#define LCD_SET_A0()      P8 |=  (1<<0)
#define LCD_CLR_WR()      P8 &= ~(1<<1)
#define LCD_SET_WR()      P8 |=  (1<<1)
#define LCD_CLR_RD()      P8 &= ~(1<<2)
#define LCD_SET_RD()      P8 |=  (1<<2)
#define LCD_CLR_CS()      P8 &= ~(1<<4)
#define LCD_SET_CS()      P8 |=  (1<<4)
#define LCD_DATA_IN       P10
#define LCD_DATA_OUT      P10
#define LCD_SET_DIR_IN()  P10D = 0
#define LCD_SET_DIR_OUT() P10D = 0xff

As for the data bits, I currently have no clue on how to tell emWin which GPIO I'm using.

Any advices?

Thanks!
Labels (1)
0 Kudos
3 Replies

609 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by hugo12 on Mon May 26 03:54:31 MST 2014
Hi,

I've got nearly the same problems in understanding the code. I'm new in programming MCUs and trying to use the porting guide to have some first sucesses. I'm using a LPC 1765 with following hardware connections:

RS on 0.19
/WR on 0.20
/RD on 0.21
/CS on 0.22
FLM on 1.16
/RST on 1.17
DB0:DB7 on 2.0 : 2.7

Now I don't know what to change in the LCD_X_8080.c

Do you have any advices for me?
Thank you
0 Kudos

609 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Wouter on Thu Oct 17 03:08:48 MST 2013
Hi DT1,

That's right, you should indeed implement the LCD I/O code in LCD_X_READ() and LCD_X_WRITE.
Perhaps you already found it, but the emWin porting guide may help you too: http://www.nxp.com/documents/application_note/AN11218.pdf

Regards,
Wouter
0 Kudos

609 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by DT1 on Wed Oct 02 07:25:13 MST 2013
Ok, taking a morning coffee helped me.

I asked the question because my GPIOs were not all on the same port. But I just notice that I just have to actually modify the LCD_X_READ() and LCD_X_WRITE() macros and do what I need to do there. At first, I was thinking that all that was in the compiled library.

Nevermind!
0 Kudos