#include <p18f4580.h>
#pragma config OSC = HS
#pragma config LVP = OFF
#pragma config WDT = OFF
void main (void)
{
SPBRG = 0X20;
TXSTA = 0X20;
RCSTA = 0X90;
TXSTAbits.TXEN = 1;
RCSTAbits.SPEN = 1;
while (1)
{
while (PIR1bits.RCIF==0);
if (RCREG=='Z')
{
TXREG = 'G';
while (PIR1bits.TXIF==0);
}
else
{
TXREG = 'F';
while (PIR1bits.TXIF==0);
}
}
}
PUT YOUR CURSOR AT MENU BUTTON AND SCROLL UP DOWN