main.c File Reference

#include "includes.h"
#include "configbit.h"

Go to the source code of this file.

Functions

void main (void)


Function Documentation

void main ( void   ) 

Definition at line 12 of file main.c.

00012                { 
00013     INT32U j;
00014  
00015     GIEH=0;             // disable all high priority interrupt 
00016     GIEL=0;             // disable all low priority interrupt
00017     IPEN=0;             // disable interrupt priority
00018     for(j=0;j<100000;j++); // delay for power stable 
00019                         // **87j10 driver initial
00020     GpioInit();         // pic18f87j10 hardware driver
00021     InterruptInit();    // pic18f87j10 hardware driver
00022     Uart1Init();        // pic18f87j10 hardware driver
00023     Timer0Init();       // pic18f87j10 hardware driver
00024     Timer1Init();       // pic18f87j10 hardware driver
00025                         // **device driver initial
00026     LedInit();          // led device driver using gpio
00027     KeyInit();          // keys device driver using gpio
00028     LcmInit();          // lcm device driver using gpio and timer 1 
00029                         // **application
00030     MenuInit();
00031     ShellInitial();     // shell application 
00032     IPEN=1;             // enable interrupt priority
00033     GIEH=1;             // enable all high priority interrupt 
00034     GIEL=1;             // enable all low priority interrupt
00035     while(1){
00036         MenuSvc();      // menu system
00037         ShellSvc();     // a simple shell using uart1
00038         LedSvc();       // display firmware running led
00039     }
00040 }


Generated on Tue Jul 7 20:39:55 2009 for A SIMPLE APPLICATION FOR PIC18F87J10 by  doxygen 1.5.9