Full Version : error: 'SRE'Undeclared
avr >>C PROGRAMMING (AVR) >>error: 'SRE'Undeclared


waitak- 02-08-2007
Hello,

I'm a student trying to use a Atmel Atmega162 to use a Graphic LCD (160x128) with Toshiba T6963C controller.

I have got a lot of code ready, but I keep with these errors:

CODE
lcd.c: In function 'lcd_command':
lcd.c:47: error: 'SRE' undeclared (first use in this function)
lcd.c:47: error: (Each undeclared identifier is reported only once
lcd.c:47: error: for each function it appears in.)
lcd.c:49: error: 'DDRE' undeclared (first use in this function)
lcd.c:51: error: 'PORTE' undeclared (first use in this function)


The fucntion lcd_command looks like this:

CODE
void lcd_command(unsigned char data){
cli();
cbi(MCUCR, SRE);  
outp(0xff,DDRC);  
outp(0x07,DDRE);  
outp(data,PORTC);  
sbi(PORTE, 2);    
cbi(PORTE, 3);    
cbi(PORTE, 1);
etc. }


I am including the following:

CODE
#include <string.h>
#include <io.h>
#include <progmem.h>
#include <sig-avr.h>
#include <interrupt.h>


Does anyone of you got an idea why the E port is "undeclared"?

(I tried changing to other port with the same result.)


Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.