{"id":614,"date":"2017-11-25T19:57:59","date_gmt":"2017-11-25T18:57:59","guid":{"rendered":"http:\/\/mikrocontroller.bplaced.net\/wordpress\/?page_id=614"},"modified":"2017-12-30T19:47:23","modified_gmt":"2017-12-30T18:47:23","slug":"06-lcd-library-atmega","status":"publish","type":"page","link":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/?page_id=614","title":{"rendered":"06-LCD-Library (ATMega)"},"content":{"rendered":"<p><div id=\"nav-below\" class=\"navigation\"><div class=\"nav-previous\"><a href=\"https:\/\/mikrocontroller.bplaced.net\/wordpress\/?page_id=612\" title=\"05-ADC-Library (ATMega)\"><span class=\"meta-nav\">\u2190<\/span> 05-ADC-Library (ATMega)<\/a><\/div><\/div><!-- #nav-below --><div id=\"nav-below\" class=\"navigation\"><div class=\"nav-next\"><a href=\"https:\/\/mikrocontroller.bplaced.net\/wordpress\/?page_id=616\" title=\"07-V24-Library (ATMega)\">07-V24-Library (ATMega) <span class=\"meta-nav\">&rarr;<\/span><\/a><\/div><\/div><!-- #nav-below --><\/p>\n<p>-diese Library dient zum ansteuern des Grafik-LCD-Displays auf<br \/>\ndem Evaluation-Board \u201c<a href=\"http:\/\/mikrocontroller.bplaced.net\/wordpress\/?page_id=550\">myAVR MK3<\/a>\u2033<\/p>\n<p><strong>Funktionen :<\/strong><\/p>\n<pre lang=\"c\" line=\"1\">void MK3_INIT_LCD(void);                         \/\/ zum initialisieren des LCD\r\nvoid MK3_LCD_LIGHT(bool wert);                   \/\/ zum ein-ausschalten der Beleuchtung\r\nvoid MK3_LCD_CLEAR(void);                        \/\/ zum loeschen des LCD\r\nvoid MK3_LCD_SETCURSOR(char x,char y);           \/\/ zum setzen des cursors\r\nvoid MK3_LCD_PRINT_BYTE(char wert);              \/\/ zum schreiben von daten ab Cursor\r\nvoid MK3_LCD_PRINT_AT(char x,char y,char wert);  \/\/ zum schreiben von daten\r\nvoid MK3_LCD_PIXEL_AT(char x,char y,DRAWTYP m);  \/\/ zum zeichnen eines pixels\r\nvoid MK3_LCD_STRING_AT(char x,char y,const char *ptr); \/\/ zum schreiben eines Strings\r\nvoid MK3_LCD_UINT_AT(char x,char y,unsigned int wert); \/\/ zum schreiben einer Zahl\r\nvoid MK3_LCD_FLOAT_AT(char x,char y,double wert);      \/\/ zum schreiben einer Float\r\nvoid MK3_LCD_DARK(bool wert);                    \/\/ zum ein-ausschalten des Display\r\nvoid MK3_LCD_INVERS(bool wert);                  \/\/ zum invertieren des Display\r\nvoid MK3_LCD_PRINT_STRING(const char *ptr);      \/\/ zum schreiben von texten ab Cursor\r\nvoid MK3_LCD_PRINT_UINT(unsigned int wert);      \/\/ zum schreiben von zahlen ab Cursor\r\nvoid MK3_LCD_PRINT_FLOAT(double wert);                    \/\/ zum schreiben von float ab Cursor\r\nvoid MK3_LCD_PRINT_UTYP(unsigned int wert,U_ZAHLTYP typ);                     \/\/ unsigned zahlentyp\r\nvoid MK3_LCD_PRINT_STYP(int wert,S_ZAHLTYP typ);                              \/\/ signed zahlentyp\r\nvoid MK3_LCD_PRINT_FTYP(double wert,F_ZAHLTYP typ);                           \/\/ float zahlentyp\r\nvoid MK3_LCD_BMP_AT(char x,char y,const unsigned char *ptr,int laenge);       \/\/ Bild anzeigen\r\nvoid MK3_LCD_BMP_FLASH_AT(char x,char y,const unsigned char *ptr,int laenge); \/\/ Bild anzeigen\r\nvoid MK3_LCD_STRING_PX(char x,char y,const char *ptr);                        \/\/ String (Pixelgenau)\r\nvoid MK3_LCD_UTYP_PX(char x,char y,unsigned int wert,U_ZAHLTYP typ);          \/\/ unsigned (Pixelgenau)<\/pre>\n<p><strong>Beispiel :<\/strong><\/p>\n<pre lang=\"c\" line=\"1\">\/\/-----------------------------------------------------------------------------\r\n\/\/ Title      : bsp_ub008_mk3_lcd2\r\n\/\/-----------------------------------------------------------------------------\r\n\/\/ Funktion   : LCD Test2\r\n\/\/ Schaltung  : myAVR MK3\r\n\/\/-----------------------------------------------------------------------------\r\n\/\/ Prozessor  : ATMega2560\r\n\/\/ Takt       : 16 MHz\r\n\/\/ Sprache    : C\r\n\/\/ Date       : 06.02.2010\r\n\/\/ Version    : 1.0\r\n\/\/ Autor      : UB\r\n\/\/ LinkerOption:    -Wl,-u,vfprintf -lprintf_flt -lm\r\n\/\/-----------------------------------------------------------------------------\r\n#define F_CPU 16000000\r\n#include &lt;avr\/io.h&gt;\r\n#include &lt;ub_mk3_2560\/MK3_2560_LCD.h&gt;\r\n#include &lt;ub_mk3_2560\/MK3_2560_ADC.h&gt;\r\n\r\n\/\/-----------------------------------------------------------------------------\r\n\/\/ Hinweis : Quick-Jumper Port-C+A muss gesetzt sein\r\n\/\/ - zeichnet verschiedene Texte und Zahlen auf das Display\r\n\/\/ - Zwei Potis Port-F0 und Port-F1 anschliessen\r\n\/\/ - Potistellung wird am Display angezeigt\r\n\/\/-----------------------------------------------------------------------------\r\nint main (void)\r\n{\r\n  unsigned int n;\r\n  char led_wert=0;\r\n  char x,y;\r\n  unsigned int ad_wert;\r\n\r\n  MK3_INIT_LCD(); \/\/ init des LCD\r\n  MK3_INIT_ADC(); \/\/ init des ADC\r\n\r\n  MK3_LCD_CLEAR(); \/\/ LCD loeschen\r\n  MK3_LCD_LIGHT(true); \/\/ beleuchtung einschalten\r\n\r\n  MK3_LCD_SETCURSOR(0,0);\r\n  MK3_LCD_PRINT_STRING(\"Hallo\");\r\n\r\n  MK3_LCD_STRING_AT(7,8,\"Leute\");\r\n\r\n  MK3_LCD_SETCURSOR(20,16);\r\n  MK3_LCD_PRINT_UINT(12345); \/\/ zahl ausgeben\r\n\r\n  MK3_LCD_FLOAT_AT(50,16,13.1415);\r\n\r\n  while (true)\r\n  {\r\n    ad_wert=MK3_ADC_READ_CH(ADC0);\r\n    MK3_LCD_UINT_AT(20,32,ad_wert);\r\n\r\n    ad_wert=MK3_ADC_MITTEL_CH(ADC1,MW_8);\r\n    MK3_LCD_UINT_AT(20,48,ad_wert);\r\n\r\n  }\r\n  return 0;\r\n}\r\n<\/pre>\n<p>Hier die Library zum download :<\/p>\n<p><a href=\"wp-content\/uploads\/2013\/02\/UB_MK3_2560_LCD_v107.zip\">UB_MK3_2560_LCD_v107<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>-diese Library dient zum ansteuern des Grafik-LCD-Displays auf dem Evaluation-Board \u201cmyAVR MK3\u2033 Funktionen : void MK3_INIT_LCD(void); \/\/ zum initialisieren des LCD void MK3_LCD_LIGHT(bool wert); \/\/ zum ein-ausschalten der Beleuchtung void MK3_LCD_CLEAR(void); \/\/ zum loeschen des LCD void MK3_LCD_SETCURSOR(char x,char y); &hellip; <a href=\"https:\/\/mikrocontroller.bplaced.net\/wordpress\/?page_id=614\">Weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":554,"menu_order":6,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[127],"tags":[11,21,9],"class_list":["post-614","page","type-page","status-publish","hentry","category-atmega","tag-atmega2650","tag-lcd-display","tag-library"],"_links":{"self":[{"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=\/wp\/v2\/pages\/614","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=614"}],"version-history":[{"count":3,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=\/wp\/v2\/pages\/614\/revisions"}],"predecessor-version":[{"id":942,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=\/wp\/v2\/pages\/614\/revisions\/942"}],"up":[{"embeddable":true,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=\/wp\/v2\/pages\/554"}],"wp:attachment":[{"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=614"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=614"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}