Mar 23, 2014 #21 andre_luis Super Moderator Staff member Joined Nov 7, 2006 Messages 9,601 Helped 1,190 Reputation 2,399 Reaction score 1,208 Trophy points 1,403 Location Brazil Activity points 55,713 215 said: It complains about Sbit.. It does not recognize it.. Click to expand... The sbit statement is an intrinsic macro from KEIL compiler used for bit mapping, not a C standard compatible command available for other compilers. +++
215 said: It complains about Sbit.. It does not recognize it.. Click to expand... The sbit statement is an intrinsic macro from KEIL compiler used for bit mapping, not a C standard compatible command available for other compilers. +++
Mar 23, 2014 #22 2 215 Junior Member level 1 Joined Mar 22, 2014 Messages 17 Helped 0 Reputation 0 Reaction score 0 Trophy points 1 Activity points 264 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; ^ Click to expand... 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; ^ Click to expand... Last edited by a moderator: Mar 24, 2014
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; ^ Click to expand... 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; ^ Click to expand...
Mar 24, 2014 #23 M milan.rajik Banned Joined Apr 1, 2013 Messages 2,524 Helped 540 Reputation 1,078 Reaction score 524 Trophy points 1,393 Activity points 0 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.
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.