New Text Document

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

#include <16F887.

h>
#include <DEF16F887.h>
#use delay(clock=4000000)
#use fast_io(b)
char a ;
const unsigned char dig[]={'1','2','3','4','5','6','7','8','9','a','b','c','d','
e','f','g'};
#include <LCD4.C>
#int_RB
main(void)
{
char b,c;
set_tris_b(0xff);
while(true)
{
delay_ms(10);
if(RB0==0)
a=dig[0];else
if(RB1==0)
a=dig[1];else
if(RB2==0)
a=dig[2];
if (a!=c)
{ c=a;
lcd_init();
lcd_gotoxy(7,1);
lcd_putc(c);
}
}
}

You might also like