Hi everyone! I hope someone can helpme with this problem.
I want to use the interruptions RBIE but, it happens that I put in HIGH GIE bit from INTCON register, the lcd does not show the message.
I'm using pic 18f485 and the mikroc compiler.
I have done tests in proteus and is ok but in the protoboard not run.
This is de code that I'm using. (I'm sorry for my english.)
sbit LCD_RS at RD2_bit;
sbit LCD_EN at RD3_bit;
sbit LCD_D4 at RD4_bit;
sbit LCD_D5 at RD5_bit;
sbit LCD_D6 at RD6_bit;
sbit LCD_D7 at RD7_bit;
sbit LCD_RS_Direction at TRISD2_bit;
sbit LCD_EN_Direction at TRISD3_bit;
sbit LCD_D4_Direction at TRISD4_bit;
sbit LCD_D5_Direction at TRISD5_bit;
sbit LCD_D6_Direction at TRISD6_bit;
sbit LCD_D7_Direction at TRISD7_bit;
void main( void ){
TRISB=0xFF;
GIE_bit=1;
RBPU_bit=1;
RBIE_bit=1;
CMCON=0b111;
Lcd_Init();
lcd_out(1,1, "hola");
while(1);
}
I want to use the interruptions RBIE but, it happens that I put in HIGH GIE bit from INTCON register, the lcd does not show the message.
I'm using pic 18f485 and the mikroc compiler.
I have done tests in proteus and is ok but in the protoboard not run.
This is de code that I'm using. (I'm sorry for my english.)
sbit LCD_RS at RD2_bit;
sbit LCD_EN at RD3_bit;
sbit LCD_D4 at RD4_bit;
sbit LCD_D5 at RD5_bit;
sbit LCD_D6 at RD6_bit;
sbit LCD_D7 at RD7_bit;
sbit LCD_RS_Direction at TRISD2_bit;
sbit LCD_EN_Direction at TRISD3_bit;
sbit LCD_D4_Direction at TRISD4_bit;
sbit LCD_D5_Direction at TRISD5_bit;
sbit LCD_D6_Direction at TRISD6_bit;
sbit LCD_D7_Direction at TRISD7_bit;
void main( void ){
TRISB=0xFF;
GIE_bit=1;
RBPU_bit=1;
RBIE_bit=1;
CMCON=0b111;
Lcd_Init();
lcd_out(1,1, "hola");
while(1);
}