2009-05-16 14:10:42 +02:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
< html > < head > < meta http-equiv = "Content-Type" content = "text/html;charset=UTF-8" >
< title > glcd: include/lc7981.h File Reference< / title >
< link href = "doxygen.css" rel = "stylesheet" type = "text/css" >
< link href = "tabs.css" rel = "stylesheet" type = "text/css" >
< / head > < body >
<!-- Generated by Doxygen 1.5.5 -->
< div class = "navigation" id = "top" >
< div class = "tabs" >
< ul >
< li > < a href = "index.html" > < span > Main Page< / span > < / a > < / li >
< li class = "current" > < a href = "files.html" > < span > Files< / span > < / a > < / li >
< / ul >
< / div >
< / div >
< div class = "contents" >
< h1 > include/lc7981.h File Reference< / h1 > < code > #include < avr/io.h> < / code > < br >
< code > #include < util/delay.h> < / code > < br >
< code > #include < avr/pgmspace.h> < / code > < br >
< p >
< a href = "lc7981_8h-source.html" > Go to the source code of this file.< / a > < table border = "0" cellpadding = "0" cellspacing = "0" >
< tr > < td > < / td > < / tr >
< tr > < td colspan = "2" > < br > < h2 > Defines< / h2 > < / td > < / tr >
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > #define < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#e6ff861bd55f4dc46f25f5f6abfca15f" > LC7981_H_< / a > LC7981_H_< / td > < / tr >
2009-05-17 18:35:27 +02:00
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > protects this file from beeing double included < a href = "#e6ff861bd55f4dc46f25f5f6abfca15f" > < / a > < br > < / td > < / tr >
2009-05-16 14:10:42 +02:00
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > #define < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#8e945df7ca614325cafa08258e82a63c" > LCD_CTRL< / a > PORTC< / td > < / tr >
2009-05-17 18:35:27 +02:00
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Port used for control signals. < a href = "#8e945df7ca614325cafa08258e82a63c" > < / a > < br > < / td > < / tr >
2009-05-16 14:10:42 +02:00
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > #define < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#4b6c8400da9a1ca3d4d83f3ef1f9c34a" > LCD_CRTL_DDR< / a > DDRC< / td > < / tr >
2009-05-17 18:35:27 +02:00
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Data-Direction-Register for the control signals. < a href = "#4b6c8400da9a1ca3d4d83f3ef1f9c34a" > < / a > < br > < / td > < / tr >
2009-05-16 14:10:42 +02:00
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > #define < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#4781e073871c6f27f89b9463ad3a4ed1" > LCD_RS< / a > PC4< / td > < / tr >
2009-05-17 18:35:27 +02:00
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Register-Select Pin of the Display. < a href = "#4781e073871c6f27f89b9463ad3a4ed1" > < / a > < br > < / td > < / tr >
2009-05-16 14:10:42 +02:00
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > #define < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#26089a10ddd59a0dc7283c19ccc02533" > LCD_RW< / a > PC2< / td > < / tr >
2009-05-17 18:35:27 +02:00
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Read-Write-select Pin. < a href = "#26089a10ddd59a0dc7283c19ccc02533" > < / a > < br > < / td > < / tr >
2009-05-16 14:10:42 +02:00
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > #define < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#1640ffbc0d8ec0f7edb04a2b93918072" > LCD_EN< / a > PC0< / td > < / tr >
2009-05-17 18:35:27 +02:00
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Strobe Pin. < a href = "#1640ffbc0d8ec0f7edb04a2b93918072" > < / a > < br > < / td > < / tr >
2009-05-16 14:10:42 +02:00
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > #define < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#25e9d818788f36ed74d7c4579f87f2a6" > LCD_DATA< / a > PORTD< / td > < / tr >
2009-05-17 18:35:27 +02:00
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Port used for data. < a href = "#25e9d818788f36ed74d7c4579f87f2a6" > < / a > < br > < / td > < / tr >
2009-05-16 14:10:42 +02:00
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > #define < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#0c114e723aa4c162c415fb6d4d963dd7" > LCD_DATA_DDR< / a > DDRD< / td > < / tr >
2009-05-17 18:35:27 +02:00
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Data-Direction-Register for Data. < a href = "#0c114e723aa4c162c415fb6d4d963dd7" > < / a > < br > < / td > < / tr >
2009-05-16 14:10:42 +02:00
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > #define < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#795b48274d3f80bc744a707b67fd93e9" > lcd_rs_high< / a > () (LCD_CTRL |= (1 < < LCD_RS))< / td > < / tr >
2009-05-17 18:35:27 +02:00
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Set the Register-Select pin high. < a href = "#795b48274d3f80bc744a707b67fd93e9" > < / a > < br > < / td > < / tr >
2009-05-16 14:10:42 +02:00
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > #define < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#6edb13d59460246fb4cc32ada1c9f4a8" > lcd_rs_low< / a > () (LCD_CTRL & = ~(1 < < LCD_RS))< / td > < / tr >
2009-05-17 18:35:27 +02:00
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Set the Register-Select pin low. < a href = "#6edb13d59460246fb4cc32ada1c9f4a8" > < / a > < br > < / td > < / tr >
2009-05-16 14:10:42 +02:00
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > #define < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#d0ce3cd9b481370ad4de36eff08440c8" > lcd_rw_high< / a > () (LCD_CTRL |= (1 < < LCD_RW))< / td > < / tr >
2009-05-17 18:35:27 +02:00
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Set the Read-Write-Select pin high. < a href = "#d0ce3cd9b481370ad4de36eff08440c8" > < / a > < br > < / td > < / tr >
2009-05-16 14:10:42 +02:00
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > #define < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#7f5ebe0ca71b1298a7d3423850cc82b1" > lcd_rw_low< / a > () (LCD_CTRL & = ~(1 < < LCD_RW))< / td > < / tr >
2009-05-17 18:35:27 +02:00
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Set the Register-Select pin low. < a href = "#7f5ebe0ca71b1298a7d3423850cc82b1" > < / a > < br > < / td > < / tr >
2009-05-16 14:10:42 +02:00
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > #define < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#e14be306d3620577abc8613d40401b04" > lcd_en_high< / a > () (LCD_CTRL |= (1 < < LCD_EN))< / td > < / tr >
2009-05-17 18:35:27 +02:00
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Set the strobe pin high. < a href = "#e14be306d3620577abc8613d40401b04" > < / a > < br > < / td > < / tr >
2009-05-16 14:10:42 +02:00
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > #define < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#d8dcdb36a9410fd96b2c936b7c9355dd" > lcd_en_low< / a > () (LCD_CTRL & = ~(1 < < LCD_EN))< / td > < / tr >
2009-05-17 18:35:27 +02:00
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Set the strobe pin low. < a href = "#d8dcdb36a9410fd96b2c936b7c9355dd" > < / a > < br > < / td > < / tr >
2009-05-16 14:10:42 +02:00
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > #define < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#90a69d37f5c80f3ded970acf2dacf4c0" > LCD_TEXT< / a > 0< / td > < / tr >
2009-05-17 18:35:27 +02:00
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Constant for text mode. < a href = "#90a69d37f5c80f3ded970acf2dacf4c0" > < / a > < br > < / td > < / tr >
2009-05-16 14:10:42 +02:00
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > #define < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#720ef60606ac38ca3a5ab96a9c2b8168" > LCD_TEXT_LINES< / a > 10< / td > < / tr >
2009-05-17 18:35:27 +02:00
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Number of lines in text mode. < a href = "#720ef60606ac38ca3a5ab96a9c2b8168" > < / a > < br > < / td > < / tr >
2009-05-16 14:10:42 +02:00
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > #define < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#82f0a630f3c41b5233f2ceb07c7dd736" > LCD_TEXT_COLUMNS< / a > 26< / td > < / tr >
2009-05-17 18:35:27 +02:00
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Number of columns in text mode. < a href = "#82f0a630f3c41b5233f2ceb07c7dd736" > < / a > < br > < / td > < / tr >
2009-05-16 14:10:42 +02:00
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > #define < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#dfaedf8da8e73d39a98d709b519a3117" > LCD_GRAPHIC< / a > 1< / td > < / tr >
2009-05-17 18:35:27 +02:00
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Constant for graphic mode. < a href = "#dfaedf8da8e73d39a98d709b519a3117" > < / a > < br > < / td > < / tr >
2009-05-16 14:10:42 +02:00
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > #define < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#51e83be6f6929f2a29d5467cd937dfc6" > LCD_GRAPHIC_WIDTH< / a > 160< / td > < / tr >
2009-05-17 18:35:27 +02:00
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Horizontal display size in pixels. < a href = "#51e83be6f6929f2a29d5467cd937dfc6" > < / a > < br > < / td > < / tr >
2009-05-16 14:10:42 +02:00
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > #define < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#70265c4f840ef78872243e91c923af2f" > LCD_GRAPHIC_HEIGHT< / a > 80< / td > < / tr >
2009-05-17 18:35:27 +02:00
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Vertical display size in pixels. < a href = "#70265c4f840ef78872243e91c923af2f" > < / a > < br > < / td > < / tr >
2009-05-16 14:10:42 +02:00
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > #define < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#eb2d212a26da4a5a4d3231b2773023e5" > PIXEL_ON< / a > 1< / td > < / tr >
2009-05-17 18:35:27 +02:00
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > see lcd_plot_pixel < a href = "#eb2d212a26da4a5a4d3231b2773023e5" > < / a > < br > < / td > < / tr >
2009-05-16 14:10:42 +02:00
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > #define < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#cda2f1b1cf6310700d0d91643c40e068" > PIXEL_OFF< / a > 0< / td > < / tr >
2009-05-17 18:35:27 +02:00
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > see lcd_plot_pixel < a href = "#cda2f1b1cf6310700d0d91643c40e068" > < / a > < br > < / td > < / tr >
2009-05-16 14:10:42 +02:00
< tr > < td colspan = "2" > < br > < h2 > Functions< / h2 > < / td > < / tr >
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > void < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#9b18aca098d68e55bd7dd4b83f4f36e9" > lcd_init< / a > (uint8_t mode)< / td > < / tr >
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > lcd_init set the to default values. < a href = "#9b18aca098d68e55bd7dd4b83f4f36e9" > < / a > < br > < / td > < / tr >
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > void < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#35c08b1fa742e650f4873939707b893b" > lcd_clear< / a > ()< / td > < / tr >
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Clears the display by setting the whole memory to 0. < a href = "#35c08b1fa742e650f4873939707b893b" > < / a > < br > < / td > < / tr >
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > void < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#30251238a49999658455fdb0233757fb" > lcd_write_text< / a > (char *txt)< / td > < / tr >
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > void < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#dbf47a5efdf02367ded1ebf8f9edb5fe" > lcd_gotoxy< / a > (uint8_t x, uint8_t y)< / td > < / tr >
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Set the display cursor to a specific location. < a href = "#dbf47a5efdf02367ded1ebf8f9edb5fe" > < / a > < br > < / td > < / tr >
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > void < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#735111507ed83172f58d5af2953e31c6" > lcd_plot_pixel< / a > (uint8_t x, uint8_t y, uint8_t set)< / td > < / tr >
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > set or unset a pixel at the specified location < a href = "#735111507ed83172f58d5af2953e31c6" > < / a > < br > < / td > < / tr >
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > void < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#175d691feb304584c8c18e6456e07401" > lcd_plot_bitmap< / a > (uint8_t x, uint8_t y, const uint8_t *bitmap, uint8_t w, uint8_t h)< / td > < / tr >
2009-05-16 16:44:24 +02:00
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > This function will plot a bitmap with the upper left corner to the given coordinates. < a href = "#175d691feb304584c8c18e6456e07401" > < / a > < br > < / td > < / tr >
2009-05-16 14:10:42 +02:00
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > void < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#b4f286d6a313df7a5f692e0b4a9509ad" > lcd_strobe< / a > ()< / td > < / tr >
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Generates the strobe signal for writing data. < a href = "#b4f286d6a313df7a5f692e0b4a9509ad" > < / a > < br > < / td > < / tr >
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > void < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#b69146a9179fc5b5deef3fc61cf0208c" > lcd_write_command< / a > (uint8_t cmd, uint8_t data)< / td > < / tr >
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Writes a command and a data byte to the lcd. < a href = "#b69146a9179fc5b5deef3fc61cf0208c" > < / a > < br > < / td > < / tr >
< tr > < td class = "memItemLeft" nowrap align = "right" valign = "top" > uint8_t < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "lc7981_8h.html#6334333537ad1d0bd51cba1e80f32e74" > lcd_read_byte< / a > ()< / td > < / tr >
< tr > < td class = "mdescLeft" > < / td > < td class = "mdescRight" > Reads a byte from the display memory. < a href = "#6334333537ad1d0bd51cba1e80f32e74" > < / a > < br > < / td > < / tr >
< / table >
< hr > < h2 > Define Documentation< / h2 >
< a class = "anchor" name = "e6ff861bd55f4dc46f25f5f6abfca15f" > < / a > <!-- doxytag: member="lc7981.h::LC7981_H_" ref="e6ff861bd55f4dc46f25f5f6abfca15f" args="" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > #define LC7981_H_ LC7981_H_ < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
2009-05-17 18:35:27 +02:00
< p >
protects this file from beeing double included
2009-05-16 14:10:42 +02:00
< p >
< / div >
< / div > < p >
< a class = "anchor" name = "4b6c8400da9a1ca3d4d83f3ef1f9c34a" > < / a > <!-- doxytag: member="lc7981.h::LCD_CRTL_DDR" ref="4b6c8400da9a1ca3d4d83f3ef1f9c34a" args="" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > #define LCD_CRTL_DDR DDRC < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
2009-05-17 18:35:27 +02:00
< p >
Data-Direction-Register for the control signals.
2009-05-16 14:10:42 +02:00
< p >
< / div >
< / div > < p >
< a class = "anchor" name = "8e945df7ca614325cafa08258e82a63c" > < / a > <!-- doxytag: member="lc7981.h::LCD_CTRL" ref="8e945df7ca614325cafa08258e82a63c" args="" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > #define LCD_CTRL PORTC < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
2009-05-17 18:35:27 +02:00
< p >
Port used for control signals.
2009-05-16 14:10:42 +02:00
< p >
< / div >
< / div > < p >
< a class = "anchor" name = "25e9d818788f36ed74d7c4579f87f2a6" > < / a > <!-- doxytag: member="lc7981.h::LCD_DATA" ref="25e9d818788f36ed74d7c4579f87f2a6" args="" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > #define LCD_DATA PORTD < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
2009-05-17 18:35:27 +02:00
< p >
Port used for data.
2009-05-16 14:10:42 +02:00
< p >
< / div >
< / div > < p >
< a class = "anchor" name = "0c114e723aa4c162c415fb6d4d963dd7" > < / a > <!-- doxytag: member="lc7981.h::LCD_DATA_DDR" ref="0c114e723aa4c162c415fb6d4d963dd7" args="" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > #define LCD_DATA_DDR DDRD < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
2009-05-17 18:35:27 +02:00
< p >
Data-Direction-Register for Data.
2009-05-16 14:10:42 +02:00
< p >
< / div >
< / div > < p >
< a class = "anchor" name = "1640ffbc0d8ec0f7edb04a2b93918072" > < / a > <!-- doxytag: member="lc7981.h::LCD_EN" ref="1640ffbc0d8ec0f7edb04a2b93918072" args="" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > #define LCD_EN PC0 < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
2009-05-17 18:35:27 +02:00
< p >
Strobe Pin.
2009-05-16 14:10:42 +02:00
< p >
< / div >
< / div > < p >
< a class = "anchor" name = "e14be306d3620577abc8613d40401b04" > < / a > <!-- doxytag: member="lc7981.h::lcd_en_high" ref="e14be306d3620577abc8613d40401b04" args="()" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > #define lcd_en_high < / td >
< td > (< / td >
< / td >
< td class = "paramname" > < / td >
< td > ) < / td >
< td width = "100%" > (LCD_CTRL |= (1 < < LCD_EN))< / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
2009-05-17 18:35:27 +02:00
< p >
Set the strobe pin high.
2009-05-16 14:10:42 +02:00
< p >
< / div >
< / div > < p >
< a class = "anchor" name = "d8dcdb36a9410fd96b2c936b7c9355dd" > < / a > <!-- doxytag: member="lc7981.h::lcd_en_low" ref="d8dcdb36a9410fd96b2c936b7c9355dd" args="()" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > #define lcd_en_low < / td >
< td > (< / td >
< / td >
< td class = "paramname" > < / td >
< td > ) < / td >
< td width = "100%" > (LCD_CTRL & = ~(1 < < LCD_EN))< / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
2009-05-17 18:35:27 +02:00
< p >
Set the strobe pin low.
2009-05-16 14:10:42 +02:00
< p >
< / div >
< / div > < p >
< a class = "anchor" name = "dfaedf8da8e73d39a98d709b519a3117" > < / a > <!-- doxytag: member="lc7981.h::LCD_GRAPHIC" ref="dfaedf8da8e73d39a98d709b519a3117" args="" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > #define LCD_GRAPHIC 1 < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
2009-05-17 18:35:27 +02:00
< p >
Constant for graphic mode.
2009-05-16 14:10:42 +02:00
< p >
< / div >
< / div > < p >
< a class = "anchor" name = "70265c4f840ef78872243e91c923af2f" > < / a > <!-- doxytag: member="lc7981.h::LCD_GRAPHIC_HEIGHT" ref="70265c4f840ef78872243e91c923af2f" args="" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > #define LCD_GRAPHIC_HEIGHT 80 < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
2009-05-17 18:35:27 +02:00
< p >
Vertical display size in pixels.
2009-05-16 14:10:42 +02:00
< p >
< / div >
< / div > < p >
< a class = "anchor" name = "51e83be6f6929f2a29d5467cd937dfc6" > < / a > <!-- doxytag: member="lc7981.h::LCD_GRAPHIC_WIDTH" ref="51e83be6f6929f2a29d5467cd937dfc6" args="" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > #define LCD_GRAPHIC_WIDTH 160 < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
2009-05-17 18:35:27 +02:00
< p >
Horizontal display size in pixels.
2009-05-16 14:10:42 +02:00
< p >
< / div >
< / div > < p >
< a class = "anchor" name = "4781e073871c6f27f89b9463ad3a4ed1" > < / a > <!-- doxytag: member="lc7981.h::LCD_RS" ref="4781e073871c6f27f89b9463ad3a4ed1" args="" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > #define LCD_RS PC4 < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
2009-05-17 18:35:27 +02:00
< p >
Register-Select Pin of the Display.
2009-05-16 14:10:42 +02:00
< p >
< / div >
< / div > < p >
< a class = "anchor" name = "795b48274d3f80bc744a707b67fd93e9" > < / a > <!-- doxytag: member="lc7981.h::lcd_rs_high" ref="795b48274d3f80bc744a707b67fd93e9" args="()" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > #define lcd_rs_high < / td >
< td > (< / td >
< / td >
< td class = "paramname" > < / td >
< td > ) < / td >
< td width = "100%" > (LCD_CTRL |= (1 < < LCD_RS))< / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
2009-05-17 18:35:27 +02:00
< p >
Set the Register-Select pin high.
2009-05-16 14:10:42 +02:00
< p >
< / div >
< / div > < p >
< a class = "anchor" name = "6edb13d59460246fb4cc32ada1c9f4a8" > < / a > <!-- doxytag: member="lc7981.h::lcd_rs_low" ref="6edb13d59460246fb4cc32ada1c9f4a8" args="()" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > #define lcd_rs_low < / td >
< td > (< / td >
< / td >
< td class = "paramname" > < / td >
< td > ) < / td >
< td width = "100%" > (LCD_CTRL & = ~(1 < < LCD_RS))< / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
2009-05-17 18:35:27 +02:00
< p >
Set the Register-Select pin low.
2009-05-16 14:10:42 +02:00
< p >
< / div >
< / div > < p >
< a class = "anchor" name = "26089a10ddd59a0dc7283c19ccc02533" > < / a > <!-- doxytag: member="lc7981.h::LCD_RW" ref="26089a10ddd59a0dc7283c19ccc02533" args="" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > #define LCD_RW PC2 < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
2009-05-17 18:35:27 +02:00
< p >
Read-Write-select Pin.
2009-05-16 14:10:42 +02:00
< p >
< / div >
< / div > < p >
< a class = "anchor" name = "d0ce3cd9b481370ad4de36eff08440c8" > < / a > <!-- doxytag: member="lc7981.h::lcd_rw_high" ref="d0ce3cd9b481370ad4de36eff08440c8" args="()" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > #define lcd_rw_high < / td >
< td > (< / td >
< / td >
< td class = "paramname" > < / td >
< td > ) < / td >
< td width = "100%" > (LCD_CTRL |= (1 < < LCD_RW))< / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
2009-05-17 18:35:27 +02:00
< p >
Set the Read-Write-Select pin high.
2009-05-16 14:10:42 +02:00
< p >
< / div >
< / div > < p >
< a class = "anchor" name = "7f5ebe0ca71b1298a7d3423850cc82b1" > < / a > <!-- doxytag: member="lc7981.h::lcd_rw_low" ref="7f5ebe0ca71b1298a7d3423850cc82b1" args="()" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > #define lcd_rw_low < / td >
< td > (< / td >
< / td >
< td class = "paramname" > < / td >
< td > ) < / td >
< td width = "100%" > (LCD_CTRL & = ~(1 < < LCD_RW))< / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
2009-05-17 18:35:27 +02:00
< p >
Set the Register-Select pin low.
2009-05-16 14:10:42 +02:00
< p >
< / div >
< / div > < p >
< a class = "anchor" name = "90a69d37f5c80f3ded970acf2dacf4c0" > < / a > <!-- doxytag: member="lc7981.h::LCD_TEXT" ref="90a69d37f5c80f3ded970acf2dacf4c0" args="" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > #define LCD_TEXT 0 < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
2009-05-17 18:35:27 +02:00
< p >
Constant for text mode.
2009-05-16 14:10:42 +02:00
< p >
< / div >
< / div > < p >
< a class = "anchor" name = "82f0a630f3c41b5233f2ceb07c7dd736" > < / a > <!-- doxytag: member="lc7981.h::LCD_TEXT_COLUMNS" ref="82f0a630f3c41b5233f2ceb07c7dd736" args="" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > #define LCD_TEXT_COLUMNS 26 < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
2009-05-17 18:35:27 +02:00
< p >
Number of columns in text mode.
2009-05-16 14:10:42 +02:00
< p >
< / div >
< / div > < p >
< a class = "anchor" name = "720ef60606ac38ca3a5ab96a9c2b8168" > < / a > <!-- doxytag: member="lc7981.h::LCD_TEXT_LINES" ref="720ef60606ac38ca3a5ab96a9c2b8168" args="" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > #define LCD_TEXT_LINES 10 < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
2009-05-17 18:35:27 +02:00
< p >
Number of lines in text mode.
2009-05-16 14:10:42 +02:00
< p >
< / div >
< / div > < p >
< a class = "anchor" name = "cda2f1b1cf6310700d0d91643c40e068" > < / a > <!-- doxytag: member="lc7981.h::PIXEL_OFF" ref="cda2f1b1cf6310700d0d91643c40e068" args="" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > #define PIXEL_OFF 0 < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
2009-05-17 18:35:27 +02:00
< p >
see lcd_plot_pixel
2009-05-16 14:10:42 +02:00
< p >
< / div >
< / div > < p >
< a class = "anchor" name = "eb2d212a26da4a5a4d3231b2773023e5" > < / a > <!-- doxytag: member="lc7981.h::PIXEL_ON" ref="eb2d212a26da4a5a4d3231b2773023e5" args="" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > #define PIXEL_ON 1 < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
2009-05-17 18:35:27 +02:00
< p >
see lcd_plot_pixel
2009-05-16 14:10:42 +02:00
< p >
< / div >
< / div > < p >
< hr > < h2 > Function Documentation< / h2 >
< a class = "anchor" name = "35c08b1fa742e650f4873939707b893b" > < / a > <!-- doxytag: member="lc7981.h::lcd_clear" ref="35c08b1fa742e650f4873939707b893b" args="()" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void lcd_clear < / td >
< td > (< / td >
< td class = "paramname" > < / td >
< td > ) < / td >
< td width = "100%" > < code > [inline]< / code > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p >
Clears the display by setting the whole memory to 0.
< p >
< / div >
< / div > < p >
< a class = "anchor" name = "dbf47a5efdf02367ded1ebf8f9edb5fe" > < / a > <!-- doxytag: member="lc7981.h::lcd_gotoxy" ref="dbf47a5efdf02367ded1ebf8f9edb5fe" args="(uint8_t x, uint8_t y)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void lcd_gotoxy < / td >
< td > (< / td >
< td class = "paramtype" > uint8_t < / td >
< td class = "paramname" > < em > x< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint8_t < / td >
< td class = "paramname" > < em > y< / em > < / td > < td > < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td > < td width = "100%" > < code > [inline]< / code > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p >
Set the display cursor to a specific location.
< p >
Right now this does only work in text mode, since there's no need for it now in graphics mode. < br >
If the x and y values are to big, the function does nothing.< p >
< dl compact > < dt > < b > Parameters:< / b > < / dt > < dd >
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > x< / em > < / td > < td > the horizontal cursorposition (starts at 0) < / td > < / tr >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > y< / em > < / td > < td > the vertical cursorposition (starts at 0) < / td > < / tr >
< / table >
< / dl >
< / div >
< / div > < p >
< a class = "anchor" name = "9b18aca098d68e55bd7dd4b83f4f36e9" > < / a > <!-- doxytag: member="lc7981.h::lcd_init" ref="9b18aca098d68e55bd7dd4b83f4f36e9" args="(uint8_t mode)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void lcd_init < / td >
< td > (< / td >
< td class = "paramtype" > uint8_t < / td >
< td class = "paramname" > < em > mode< / em > < / td >
< td > ) < / td >
< td width = "100%" > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p >
lcd_init set the to default values.
< p >
< dl compact > < dt > < b > Parameters:< / b > < / dt > < dd >
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > mode< / em > < / td > < td > LCD_TEXT for text mode and LCD_GRAPHIC for graphic mode < / td > < / tr >
< / table >
< / dl >
< / div >
< / div > < p >
< a class = "anchor" name = "175d691feb304584c8c18e6456e07401" > < / a > <!-- doxytag: member="lc7981.h::lcd_plot_bitmap" ref="175d691feb304584c8c18e6456e07401" args="(uint8_t x, uint8_t y, const uint8_t *bitmap, uint8_t w, uint8_t h)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void lcd_plot_bitmap < / td >
< td > (< / td >
< td class = "paramtype" > uint8_t < / td >
2009-05-17 18:02:52 +02:00
< td class = "paramname" > < em > x_off< / em > , < / td >
2009-05-16 14:10:42 +02:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint8_t < / td >
2009-05-17 18:02:52 +02:00
< td class = "paramname" > < em > y_off< / em > , < / td >
2009-05-16 14:10:42 +02:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > const uint8_t * < / td >
< td class = "paramname" > < em > bitmap< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint8_t < / td >
< td class = "paramname" > < em > w< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint8_t < / td >
< td class = "paramname" > < em > h< / em > < / td > < td > < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td > < td width = "100%" > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
2009-05-16 16:44:24 +02:00
< p >
This function will plot a bitmap with the upper left corner to the given coordinates.
2009-05-16 14:10:42 +02:00
< p >
2009-05-17 18:02:52 +02:00
< br >
If the bitmap doesn't fit on the display at this location, nothing is drawn at all.< br >
Unset pixels are treated as transparent < br >
This function is by far the most tricky piece of code in this project,< br >
don't worry if you don't understand it at first sight. < br >
And if you know a better way to do this, tell me.< br >
< p >
2009-05-17 18:35:27 +02:00
< dl compact > < dt > < b > Parameters:< / b > < / dt > < dd >
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > x< / em > < / td > < td > horizontal position of the bitmap < / td > < / tr >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > y< / em > < / td > < td > vertical position of the bitmap < / td > < / tr >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > bitmap< / em > < / td > < td > pointer to the bitmap in pgmspace < / td > < / tr >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > w< / em > < / td > < td > width of the bitmap < / td > < / tr >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > h< / em > < / td > < td > height of the bitmap< / td > < / tr >
< / table >
< / dl >
2009-05-17 18:02:52 +02:00
This function is dedicated to Greta, one of the most important persons in my life so far.< br >
Even though I can't remember her actual name.< br >
2009-05-16 14:10:42 +02:00
< / div >
< / div > < p >
< a class = "anchor" name = "735111507ed83172f58d5af2953e31c6" > < / a > <!-- doxytag: member="lc7981.h::lcd_plot_pixel" ref="735111507ed83172f58d5af2953e31c6" args="(uint8_t x, uint8_t y, uint8_t set)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void lcd_plot_pixel < / td >
< td > (< / td >
< td class = "paramtype" > uint8_t < / td >
< td class = "paramname" > < em > x< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint8_t < / td >
< td class = "paramname" > < em > y< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint8_t < / td >
< td class = "paramname" > < em > set< / em > < / td > < td > < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td > < td width = "100%" > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p >
set or unset a pixel at the specified location
< p >
< dl compact > < dt > < b > Parameters:< / b > < / dt > < dd >
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > x< / em > < / td > < td > horizontal position of the pixel (starts at 0) < / td > < / tr >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > y< / em > < / td > < td > horizontal position of the pixel (starts at 0) < / td > < / tr >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > set< / em > < / td > < td > can be PIXEL_ON or PIXEL_OFF < / td > < / tr >
< / table >
< / dl >
< / div >
< / div > < p >
< a class = "anchor" name = "6334333537ad1d0bd51cba1e80f32e74" > < / a > <!-- doxytag: member="lc7981.h::lcd_read_byte" ref="6334333537ad1d0bd51cba1e80f32e74" args="()" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > uint8_t lcd_read_byte < / td >
< td > (< / td >
< td class = "paramname" > < / td >
< td > ) < / td >
< td width = "100%" > < code > [inline]< / code > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p >
Reads a byte from the display memory.
< p >
lcd_gotoxy can be used to set the location. Important : lcd_gotoxy doesn't work in graphics mode yet.< p >
< dl class = "return" compact > < dt > < b > Returns:< / b > < / dt > < dd > the byte which has been read < / dd > < / dl >
< dl class = "see" compact > < dt > < b > See also:< / b > < / dt > < dd > < a class = "el" href = "lc7981_8h.html#dbf47a5efdf02367ded1ebf8f9edb5fe" title = "Set the display cursor to a specific location." > lcd_gotoxy< / a > < / dd > < / dl >
< / div >
< / div > < p >
< a class = "anchor" name = "b4f286d6a313df7a5f692e0b4a9509ad" > < / a > <!-- doxytag: member="lc7981.h::lcd_strobe" ref="b4f286d6a313df7a5f692e0b4a9509ad" args="()" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void lcd_strobe < / td >
< td > (< / td >
< td class = "paramname" > < / td >
< td > ) < / td >
< td width = "100%" > < code > [inline]< / code > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p >
Generates the strobe signal for writing data.
< p >
This function is meant for internal usage only.
< / div >
< / div > < p >
< a class = "anchor" name = "b69146a9179fc5b5deef3fc61cf0208c" > < / a > <!-- doxytag: member="lc7981.h::lcd_write_command" ref="b69146a9179fc5b5deef3fc61cf0208c" args="(uint8_t cmd, uint8_t data)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void lcd_write_command < / td >
< td > (< / td >
< td class = "paramtype" > uint8_t < / td >
< td class = "paramname" > < em > cmd< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint8_t < / td >
< td class = "paramname" > < em > data< / em > < / td > < td > < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td > < td width = "100%" > < code > [inline]< / code > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p >
Writes a command and a data byte to the lcd.
< p >
< dl compact > < dt > < b > Parameters:< / b > < / dt > < dd >
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > cmd< / em > < / td > < td > the command byte < / td > < / tr >
< tr > < td valign = "top" > < / td > < td valign = "top" > < em > data< / em > < / td > < td > the data that is going to be written after the command < / td > < / tr >
< / table >
< / dl >
< / div >
< / div > < p >
< a class = "anchor" name = "30251238a49999658455fdb0233757fb" > < / a > <!-- doxytag: member="lc7981.h::lcd_write_text" ref="30251238a49999658455fdb0233757fb" args="(char *txt)" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void lcd_write_text < / td >
< td > (< / td >
< td class = "paramtype" > char * < / td >
< td class = "paramname" > < em > txt< / em > < / td >
< td > ) < / td >
< td width = "100%" > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p >
< / div >
< / div > < p >
< / div >
2009-05-17 18:35:27 +02:00
< hr size = "1" > < address style = "text-align: right;" > < small > Generated on Sun May 17 18:34:49 2009 for glcd by
2009-05-16 14:10:42 +02:00
< a href = "http://www.doxygen.org/index.html" >
< img src = "doxygen.png" alt = "doxygen" align = "middle" border = "0" > < / a > 1.5.5 < / small > < / address >
< / body >
< / html >