When I compile my program using CCS compiler, I get this error in the line 6. My code is:
Code:
/*
Biblioteca lcd_4x20
Paulo Lacet
3/3/10
*/
#device *=16 ICD = TRUE
#use delay(clock=4000000)
#ifndef Fosc
#define Fosc 4 //Define a frequência do oscilador. Este valor deve corresponder a frequência do oscilador utilizado pelo PIC18.
// Os nome definidos são os próprios nomes dos pinos do display LCD.
#define B7 PORTBbits.RB7 //Define o nome B7 para a estrutra.
#define E_B7 TRISBbits.TRISB7=1;
#define S_B7 TRISBbits.TRISB7=0;
#define B6 PORTBbits.RB6 //Define o nome B6 para a estrutura.
#define E_B6 TRISBbits.TRISB6=1;
#define S_B6 TRISBbits.TRISB6=0;
#define B5 PORTBbits.RB5 //Define o nome B5 para a estrutura.
#define E_B5 TRISBbits.TRISB5=1;
#define S_B5 TRISBbits.TRISB5=0;
#define B4 PORTBbits.RB4 //Define o nome B4 para a estrutura.
#define E_B4 TRISBbits.TRISB4=1;
#define S_B4 TRISBbits.TRISB4=0;
#define E PORTDbits.RD6 //Define o nome E para a estrutura.
#define E_E TRISDbits.TRISD6=1;
#define S_E TRISDbits.TRISD6=0;
#define RW PORTDbits.RD1//Define o nome RW para a estrutura.
#define E_RW TRISDbits.TRISD1=1;
#define S_RW TRISDbits.TRISD1=0;
#define RS PORTDbits.RD7 //Define o nome RS para a estrutura.
#define E_RS TRISDbits.TRISD7=1;
#define S_RS TRISDbits.TRISD7=0;
#endif
I am using the PIC18F4550
Any ideas ?
dyeatman
Joined: 06 Sep 2003 Posts: 1938 Location: Norman, OK
Posted: Mon Mar 08, 2010 8:28 am
Where is your #include <18F4550.h> device definition line?
It has to be before the #device *=16 ICD = TRUE line. _________________ Google and Forum Search are some of your best tools!!!!
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum