Microcontroller › PIC › need help with an isr code › Compiler for PIC18f4550
sbit LCD_RS at RB4_bit;
sbit LCD_EN at Rb5_bit;
sbit LCD_D4 at Rb0_bit;
sbit LCD_D5 at Rb1_bit;
sbit LCD_D6 at Rb2_bit;
sbit LCD_D7 at Rb3_bit;
sbit LCD_RS_Direction at TRISb4_bit;
sbit LCD_EN_Direction at TRISb5_bit;
sbit LCD_D4_Direction at TRISb0_bit;
sbit LCD_D5_Direction at TRISb1_bit;
sbit LCD_D6_Direction at TRISb2_bit;
sbit LCD_D7_Direction at TRISb3_bit;
// End LCD module connections
char txt1[] = "mikroElektronika";
char txt2[] = "EasyPIC6";
char txt3[] = "Lcd4bit";
char txt4[] = "example";
char i; // Loop variable
void Move_Delay() { // Function used for text moving
Delay_ms(500); // You can change the moving speed here
}
void main(){
// ANSEL = 0; // Configure AN pins as digital I/O
// ANSELH = 0;
// C1ON_bit = 0; // Disable comparators
// C2ON_bit = 0;
CMCON = 7; // turn off comparators
ADCON1 = 0x0F; // turn off analog inputs
TRISA = 0x00;
TRISE = 0x00; // PORTB is output
TRISB = 0x00;
delay_ms(100);
Lcd_Init(); // Initialize LCD
Lcd_Cmd(_LCD_CLEAR); // Clear display
Lcd_Cmd(_LCD_CURSOR_OFF); // Cursor off
Lcd_Out(1,6,txt3); // Write text in first row
Lcd_Out(2,6,txt4); // Write text in second row
Delay_ms(2000);
Lcd_Cmd(_LCD_CLEAR); // Clear display
Lcd_Out(1,1,txt1); // Write text in first row
Lcd_Out(2,5,txt2); // Write text in second row
Delay_ms(2000);
// Moving text
for(i=0; i<4; i++) { // Move text to the right 4 times
Lcd_Cmd(_LCD_SHIFT_RIGHT);
Move_Delay();
}
while(1) { // Endless loop
for(i=0; i<8; i++) { // Move text to the left 7 times
Lcd_Cmd(_LCD_SHIFT_LEFT);
Move_Delay();
}
for(i=0; i<8; i++) { // Move text to the right 7 times
Lcd_Cmd(_LCD_SHIFT_RIGHT);
Move_Delay();
}
}
}
Can anyone tell me the compiler for this code.
i need as soon as possible.
if anyone knows the tell me it will be helpfull for me.