How do i initialize LCD mounted on my microcontroler ???

Status
Not open for further replies.
Well..
The direction part is setup somewhere else..
but the other defines is done like this

Code:
#define LCD_RS   (GPIO_PORTA_DATA_R << 7)

which give me these kind of problems
16: error: lvalue required as left operand of assignment
[cc] LCD_EN = 1;
^
Yout LCD_DATA if defined like this
Code:
INT32U LCD_DATA =  GPIO_PORTB_DATA_R;
But it is also troublesome because it gives this error message,
error: initializer element is not constant
[cc] INT32U LCD_DATA = GPIO_PORTB_DATA_R;
^
 
Last edited by a moderator:


Code C - [expand]
1
#define LCD_RS, LCD_RW, LCD_EN

are bits and you should check your compiler manual about how to define Port bits?


Code C - [expand]
1
#define LCD_PORT ...

is a complete PORT.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…