This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| et:examples:communication:rs232 [2010/02/18 12:01] – mikk.leini | et:examples:communication:rs232 [2020/07/20 09:00] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 32: | Line 32: | ||
| // | // | ||
| #include < | #include < | ||
| - | #include < | + | #include < |
| // | // | ||
| Line 55: | Line 55: | ||
| // LCD ekraani seadistamine | // LCD ekraani seadistamine | ||
| - | lcd_alpha_init(LCD_ALPHA_DISP_ON_BLINK); | + | lcd_gfx_init(); |
| // Ekraanil tervituse ütlemine | // Ekraanil tervituse ütlemine | ||
| - | lcd_alpha_write_string(" | + | lcd_gfx_write_string(" |
| // Kursori teise rea algusesse viimine | // Kursori teise rea algusesse viimine | ||
| - | lcd_alpha_goto_xy(0, row); | + | lcd_gfx_goto_char_xy(0, row); |
| // Arvutile tere ütlemine | // Arvutile tere ütlemine | ||
| Line 71: | Line 71: | ||
| // Jadaliidesest märgi lugemine | // Jadaliidesest märgi lugemine | ||
| if (usart_try_read_char(port, | if (usart_try_read_char(port, | ||
| - | { | + | { |
| // Kas tegu on reavahetuse märgiga? | // Kas tegu on reavahetuse märgiga? | ||
| if (c == ' | if (c == ' | ||
| Line 79: | Line 79: | ||
| // Rea tühjendamine eelmisest teatest | // Rea tühjendamine eelmisest teatest | ||
| - | lcd_alpha_clear_line(row); | + | lcd_gfx_clear_line(row); |
| } | } | ||
| else | else | ||
| { | { | ||
| // Märgi otse ekraanile väljastamine | // Märgi otse ekraanile väljastamine | ||
| - | lcd_alpha_write_char(c); | + | lcd_gfx_write_char(c); |
| } | } | ||
| } | } | ||
| } | } | ||
| } | } | ||
| + | |||
| </ | </ | ||
| + | |||
| + | [[et: | ||
| [{{ : | [{{ : | ||
| Windows XP operatsioonisüsteemiga on kaasas programm HyperTerminal. See avaneb //Start// menüüst // | Windows XP operatsioonisüsteemiga on kaasas programm HyperTerminal. See avaneb //Start// menüüst // | ||