Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

gLCD compile error - #device required

Status
Not open for further replies.

bjhotmail

Junior Member level 2
Joined
Sep 29, 2007
Messages
20
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
South Africa
Activity points
1,407
Hi everyone, hope someone can help out. I am trying to build the PIC based oscilloscope from semi-fluid.com but im having trouble compiling the GLCD-modified.c file. I have no C experience but have followed the steps given on the site on how to modify the original glcd.c file. When I try to compile it always gives an error on the same line:



#define ON 1
#define OFF 0

#define YES 1
#define NO 0


BYTE glcd_readByte(BYTE chip);
void glcd_writeByte(BYTE chip, BYTE data);
void glcd_fillScreen(int1 color);


const BYTE TEXT[51][5] ={0x00, 0x00, 0x00, 0x00, 0x00, // SPACE
0x00, 0x00, 0x5F, 0x00, 0x00, // !



the error is:

A #DEVICE required before this line.



The compiler is PCWH version 3.18 IDE version 3.4

This page also describes the same problem but the answer is not clear to me and is therefore unhelpfull.
https://www.ccsinfo.com/forum/viewtopic.php?t=35308
An example of what to add to this file and where would be appreciated.

This GLCD-modified file is to be used in conjunction with the file
18F452 GLCD Oscilloscope DR1r1 - no bootloader as from the semi-fluid site

Thanks for any help in advance![/i]
 

Wrong code
Code:
#include<lcd.c>
#include<18f4550.h>


Correct code
Code:
#include<18f4550.h>
#include<lcd.c>


Good luck.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top