User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C section within the Software Development category of DaniWeb, a massive community of 456,515 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,817 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C advertiser: Programming Forums
Views: 805 | Replies: 2 | Solved
Reply
Join Date: Aug 2007
Posts: 7
Reputation: psyman_86 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
psyman_86 psyman_86 is offline Offline
Newbie Poster

Question Parse Error

  #1  
Oct 3rd, 2007
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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2004
Posts: 3,755
Reputation: Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light 
Rep Power: 17
Solved Threads: 147
Colleague
Dave Sinkula's Avatar
Dave Sinkula Dave Sinkula is offline Offline
long time no c

Re: Parse Error

  #2  
Oct 3rd, 2007
Originally Posted by psyman_86 View Post
[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?
Reply With Quote  
Join Date: Aug 2007
Posts: 7
Reputation: psyman_86 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
psyman_86 psyman_86 is offline Offline
Newbie Poster

Re: Parse Error

  #3  
Oct 3rd, 2007
Originally Posted by Dave Sinkula View Post
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
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb C Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the C Forum

All times are GMT -4. The time now is 4:00 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC