sbit LCD_RS at RC0_bit; // LCD_RS assigned to PORT RC0;
sbit LCD_EN at RC1_bit; // LCD_EN assigned to PORT RC1;
sbit LCD_D4 at RC2_bit; // LCD_D4 assigned to PORT RC2;
sbit LCD_D5 at RC3_bit; // LCD_D5 assigned to PORT RC3;
sbit LCD_D6 at RC4_bit; // LCD_D6 assigned to PORT RC4;
sbit LCD_D7 at RC5_bit; // LCD_D7 assigned to PORT RC5;
sbit LCD_RS_Direction at TRISC0_bit; // LCD_RS assigned to TRIS C0;
sbit LCD_EN_Direction at TRISC1_bit; // LCD_EN assigned to TRIS C1;
sbit LCD_D4_Direction at TRISC2_bit; // LCD_D4 assigned to TRIS C2;
sbit LCD_D5_Direction at TRISC3_bit; // LCD_D5 assigned to TRIS C3;
sbit LCD_D6_Direction at TRISC4_bit; // LCD_D6 assigned to TRIS C4;
sbit LCD_D7_Direction at TRISC5_bit; // LCD_D7 assigned to TRIS C5;
#define OSC 20
void main(){
ADCON1 = 0x06; //Analog to Digital Conversion
TRISA=0xFF; //Set PORTA as Input
TRISB=0x00; //Set PORTB as Output
TRISC=0x80; //set direction of PORTC6 as output -- TX -- transmitter //set direction of PORTC7 as input -- RX -- reciever
TRISD =0x00;
TRISE =0x00;
RB0_bit=0;
UART1_init(9600); // Initialize UART at 9600bpm
delay_ms(1000);
Lcd_Init();
Lcd_cmd(_LCD_CLEAR);
Lcd_cmd(_LCD_CURSOR_OFF);
UART1_Write_Text("AT");
delay_ms(1000);
UART1_Write(0x0D); // ENTER
delay_ms(2000);
Lcd_Out(1,1, "Message Sent");
delay_ms(3000);
Lcd_cmd(_LCD_CLEAR);
Lcd_cmd(_LCD_CURSOR_OFF);
}