Skip to content

Commit 9dfb379

Browse files
committed
Cleanup main.c demo and annotate
1 parent 8063b0d commit 9dfb379

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

main.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,13 @@ int main(void)
2121
// initializes IO
2222
tinyuart_init();
2323

24-
25-
//tinyuart_send_uint8(0xff);
26-
// TINYUART_PIN |= (1 << TINYUART_IO_TX);
27-
// _delay_us(40);
28-
// TINYUART_PIN |= (1 << TINYUART_IO_TX);
29-
30-
//tinyuart_send_uint8(0b01010101);
24+
_delay_us(40);
25+
// toggle pattern test: after every bit delay the TX pin is toggled
26+
tinyuart_send_uint8(0b01010101);
3127
_delay_us(10);
3228

29+
// every character test: verify that your receiver can read all chars at the chosen baud rate
30+
// cheap UART-USB converts often have an issue with 0x00
3331
for (uint16_t n = 0; n<256; n++)
3432
{
3533
tinyuart_send_uint8((uint8_t)(255-n));

0 commit comments

Comments
 (0)