Hi,
Im trying to implement a LCD screen as part of a engineering design project. The screen is to be connected to a M16C/62 microcontroller. In order to compile the software I am using the NC30WA V5.20 Release 1 compiler, as it is the compiler which comes with the development environent i need to use.

When i try to compile my code the following error is produced:
******** Cleaning...
----*
******** Complete...
******** Executing...
NC30 -c -dir . -g Project.c
R8C/Tiny, M16C/60 NC30 COMPILER V.5.20 Release 1 -Entry
COPYRIGHT(C) 2001(2003) RENESAS TECHNOLOGY CORPORATION
AND RENESAS SOLUTIONS CORPORATION ALL RIGHTS RESERVED

[Error(ccom):lcd.h,line 44] parse error at near 'LCDSetCursorPosn'
===> bool LCDSetCursorPosn(unsigned char column, unsigned char row);
Sorry, compilation terminated because of these errors in main().
Project.c
C:\M16\MTOOL\BIN\MAKE.EXE: *** [.\Project.r30] Error 4
******** Finish...

As far as i can tell there isnt a parse error at or near line 44 (The line before the #endif). I would be very grateful for any suggestions that could be made.

Thanks,
Simon

#ifndef _LCD_H
#define _LCD_H

#include <string.h>
#include "timerdelay.h"

#define LCDRows     4
#define LCDColumns 20
#define LCDBufferSize LCDRows*LCDColumns

// I/O allocations for the Mitsubishi microcontroller Developement Board
#define LCD_DATA p3         //Port connected to LCDz
#define LCD_DIR  pd3_addr   //Direction of port

#define LCD_DB4  p3_4       //Data bus line
#define LCD_DB5  p3_5       //Data bus line         DB0-3 not connected in 4-bit mode
#define LCD_DB6  p3_6       //Data bus line
#define LCD_DB7  p3_7       //Data bus line
#define LCD_RS   p3_1       //Register select
#define LCD_RW   p3_2       //Read/Write select    H: Read  L: Write
#define LCD_E    p3_3       //Enable

#define LCDBufferOffset(C,R) ((((R)-1)*LCDColumns)+((C)-1))
#define LCDCursorPosnValid(C,R) (((C>0)&&(C<=LCDColumns))&&((R>0)&&(R<=LCDRows)))

#define LCDWrite(x) (LCD_DATA=((LCD_DATA&0xF0)|((x)&0x0F)))

/* Function Prototypes */
void LCDInitialisePort(void);
void LCDInitialise(void);
void LCDClear(void);
void LCDClearLine(unsigned char row);
void LCDClearPartialLine(unsigned char from,unsigned char to,unsigned char row);
void LCDMoveLine(unsigned char from,unsigned char to);
void LCDMovePartialLine(unsigned char from_column,unsigned char to_column,unsigned char from_row,unsigned char to_row);
void LCDWriteChar(unsigned char column, unsigned char row,char data);
void LCDWriteInt(unsigned char column, unsigned char row,unsigned int number,unsigned char numofchars);
void LCDWriteHex(unsigned char column, unsigned char row,unsigned int number,unsigned char numofchars);
void LCDWriteString(unsigned char column, unsigned char row,const char *message);
char LCDReadChar(unsigned char column, unsigned char row);
void LCDWriteCustomChars(void);
void LCDToggleE(void);
void LCDWaitForBusyBit(void);   
bool LCDSetCursorPosn(unsigned char column, unsigned char row);
#endif

[Error(ccom):lcd.h,line 44] parse error at near 'LCDSetCursorPosn'

I love that compiler's diagnostic messages! Some day we oughtta compare HEW war stories.

bool LCDSetCursorPosn(unsigned char column, unsigned char row);

Where does bool come from?

commented: NIce catch +11

I love that compiler's diagnostic messages! Some day we oughtta compare HEW war stories.

bool LCDSetCursorPosn(unsigned char column, unsigned char row);

Where does bool come from?

Thanks Dave, that turned out to be a very good question to ask. Apparently C doesnt have a boolean variable, which i just found out. I have used a few languages but not much C. I fixed up the boolean varaibles just using chars and everything appears to be compiling for the moment. This compiler is indeed going to drive me crazy over the next couple of weeks.
Thanks again for your comment.

Simon

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.