EX_LCDKB.C  



EXAMPLE to use KBD.C and LCD.C drivers

/////////////////////////////////////////////////////////////////////////
////                           EX_LCDKB.C                            ////
////                                                                 ////
////  This program uses both the KBD.C and LCD.C drivers to allow    ////
////  keypad entry and LCD display.  All keys are echoed except *    ////
////  that will clear the display.  Either the kbd_getc or lcd_putc  ////
////  may be replaced with getc or putc to use just one device with  ////
////  the RS-232.                                                    ////
////                                                                 ////
////        (C) Copyright 1996,1997 Custom Computer Services         ////
////                                                                 ////
/////////////////////////////////////////////////////////////////////////

#include <16F84.H>
#fuses XT,NOPROTECT,NOWDT

#use delay(clock=4000000)
#include 
#include 


main() {
   char k;

   lcd_init();
   kbd_init();

   lcd_putc("\fReady...\n");

   while (TRUE) {
      k=kbd_getc();
      if(k!=0)
        if(k=='*')
          lcd_putc('\f');
        else
          lcd_putc(k);
   }
}


Navigation Bar

tech_support@blitzlogic.com