volatile uint8_t rx_fill = 0xFF;
volatile uint8_t input[128] = { 0 };
volatile uint8_t latch[128] = { 0 };
-uint8_t log_pos = 0;
+uint8_t log_row = 0;
+uint8_t log_col = 0;
int main()
{
lcd_gotoxy(19-offset-nibbles, 0);
for(i=0; i<=nibbles; ++i)
lcd_write(rx_buf[3+i]);
- log_pos |= 0x80;
}
}
rx_fill = 0xFF;
rx_fill = 0xFF;
}
- lcd_gotoxy(log_pos%20, 1+log_pos/20);
+ lcd_gotoxy(log_col, 1+log_row);
lcd_write(c);
- ++log_pos;
- if(log_pos>=60)
- log_pos = 0;
- if(log_pos%20==0)
- lcd_gotoxy(log_pos%20, 1+log_pos/20);
+ ++log_col;
+ if(log_col>=20)
+ {
+ log_col = 0;
+ ++log_row;
+ if(log_row>=3)
+ log_row = 0;
+ lcd_gotoxy(log_col, 1+log_row);
+ }
lcd_write(255);
}