Code: Select all
unsigned short data = 0, ro = 0;
unsigned short *er;
void main() {
er = &ro;
Soft_Uart_Init(PORTA, 1, 0, 9600);
Lcd_Config(&PORTB,7,4,6,3,2,1,0);
Lcd_Cmd(LCD_CLEAR);
Lcd_Cmd(LCD_FIRST_ROW);
Lcd_Cmd(LCD_CURSOR_OFF);
LCD_Out_CP("RS-232: ");
do {
do {
data = Soft_Uart_Read(er);
} while (*er);
if(data >= 48 && data <= 122)
{
Lcd_Chr_CP(data);
}
} while (1);
}
i'vb tried to set the variable data = 0; after Lcd_Chr_CP(data);, but this doesn't change anything.
any suggestions?
P.S. i'm using a 16F84A with 10 MHz Xt
thanks