/* Name : main.c
* Purpose : Main file.
* Author : S.Dhanaraj
* Date : 23-11-13
* Copyright : All rights reserved for Silicon Micro Smith
* Revision : Ver 1.0
*/
#include<stdio.h>
#include<htc.h>
#include "Include.h"
#include "LCD.h"
#include "Serial.h"
#include "IO.h"
//Chip Settings
//__CONFIG(1H, RCIO6 & FCMDIS & IESODIS); // 1H
// __CONFIG(2, WDTDIS & PWRTEN & BORDIS ); // 2H 2L
#pragma config CONFIG1H IESO = OFF, OSC = HS, FCMEN = OFF
#pragma config CONFIG2 WDT = OFF, PWRT = ON, BOREN = OFF
char _scanf_buf_[10];
#define inbuf _scanf_buf_
unsigned char g_welcome_stratgy_comp;
unsigned char g_update_LCD;
// Main Function
void main(void)
{
unsigned int i,j;
// Init_Keypad();
Timer0_Init();
TRISA = 0x00;
TRISB0 = 0;
TRISC0 = 0;
TRISD0 = 0;
TRISE0 = 0;
OSCCON = 0b00000000;
LATA0 = 1;
PORTBbits.RB0 = 1;
PORTCbits.RC0 = 1;
PORTDbits.RD0 = 1;
PORTEbits.RE0 = 1;
InitLCD(); // Initialize the LCD
WriteDataToLCD('b');
// Lcd4_Write_String("Welcome to BLACK CAT"); // Welcome String
// GotoYXPositionOnLCD(LCD_LINE2, 0); // Goto Line2 offset 38
// Lcd4_Write_String("GSM 431234"); // Write String
while(1)
{
LATA = 0xFF;
for ( i = 0; i < 20; i++)
{ __delay_ms(50);}
// Keypad_handler();
LATA = 0;
for ( i = 0; i < 20; i++)
{ __delay_ms(50);}
}
}
char getche(){return 0;}
void putch(char c){}