#include <16f877a.h>
#fuses HS, NOWDT, NOPROTECT, NOBROWNOUT, NOLVP, NOPUT, NOWRT, NODEBUG, NOCPD
#use delay (clock=4000000)
#use RS232 (baud=9600, bits=8, parity=N, xmit=PIN_C6, rcv=PIN_C7)
#use fast_io(a)
#use fast_io(b)
#define use_portb_lcd TRUE
#include <LCD.c>
#include <stdlib.h>
void main()
{
char letter;
lcd_init ();
while(1)
{
printf("Type 'r' to run.\r");
lcd_putc("\f");
lcd_gotoxy(1,1);
printf(lcd_putc,"Type 'r' to run.");
delay_ms(100);
letter = getc();
putc(letter);
printf(lcd_putc,"\%02d", letter);
if (letter == 'r')
{
lcd_putc("\f");
lcd_gotoxy(1,1);
printf(lcd_putc,"Running...");
while(1);
}
}
}