{"id":235,"date":"2017-11-23T00:06:01","date_gmt":"2017-11-22T23:06:01","guid":{"rendered":"http:\/\/mikrocontroller.bplaced.net\/wordpress\/?page_id=235"},"modified":"2023-03-04T23:50:08","modified_gmt":"2023-03-04T22:50:08","slug":"18-i2c_lolevel-library-stm32f4","status":"publish","type":"page","link":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/?page_id=235","title":{"rendered":"18-I2C_LoLevel-Library (STM32F4)"},"content":{"rendered":"<p><div id=\"nav-below\" class=\"navigation\"><div class=\"nav-previous\"><a href=\"https:\/\/mikrocontroller.bplaced.net\/wordpress\/?page_id=233\" title=\"17-SPI_LIS302DL-Library (STM32F4)\"><span class=\"meta-nav\">\u2190<\/span> 17-SPI_LIS302DL-Library (STM32F4)<\/a><\/div><\/div><!-- #nav-below --><div id=\"nav-below\" class=\"navigation\"><div class=\"nav-next\"><a href=\"https:\/\/mikrocontroller.bplaced.net\/wordpress\/?page_id=237\" title=\"19-I2C_M24C02-Library (STM32F4)\">19-I2C_M24C02-Library (STM32F4) <span class=\"meta-nav\">&rarr;<\/span><\/a><\/div><\/div><!-- #nav-below --><\/p>\n<p>-diese Library dient zum benutzen der I2C-Schnittstelle im Master-Mode<\/p>\n<p>-die I2C-Pins die benutzt werden sollen, m\u00fcssen im C-File eingetragen werden<br \/>\n(im H-File kann die I2C-Clock-Frq eingestellt werden)<\/p>\n<p>-auf der Hardware d\u00fcrfen die zwei externen Pull-Up Widerst\u00e4nde (je 4k7) an SCL und SDA nicht vergessen werden, sonst funktioniert das ganze nicht.<\/p>\n<p>-die Library kann als LoLevel-Funktion die Schnittstelle initialisieren und Daten zu einem Slave senden und von einem Slave empfangen.<\/p>\n<p>-es gibt Funktionen um ein einzelnes Datenbyte zu senden\/empfangen und Funktionen um mehrere Bytes zu senden\/empfangen. In dem Fall m\u00fc\u00dfen die Daten vor dem senden in einem Array stehen bzw. stehen nach dem empfangen in einem Array.<\/p>\n<p>-Die Funktion \u201cUB_I2C1_WriteCMD\u201d sendet nur ein einzelnes Byte an den Slave.<\/p>\n<p>-es gibt auch noch eine \u201cPausenfunktion\u201d was einfach nur ein Z\u00e4hler auf 0 ist um z.B. f\u00fcr langsame I2C-Devives eine Wartefunktion einf\u00fcgen zu k\u00f6nnen.<\/p>\n<p>-es gibt 3 identische Librarys, getrennt f\u00fcr I2C1, I2C2 und I2C3<\/p>\n<p>-im Beispiel wurde I2C1 benutzt mit dieser Pinbelegung :<\/p>\n<pre lang=\"c\" line=\"1\">SCL an PB6\r\nSDA an PB7<\/pre>\n<p><strong>Voraussetzungen :<\/strong><\/p>\n<pre lang=\"c\" line=\"1\">Benutzte Module der CooCox-IDE : GPIO, I2C\r\nBenutzte Librarys : keine<\/pre>\n<p><strong><strong>Funktionen (f\u00fcr I2C1) :<\/strong><\/strong><\/p>\n<pre lang=\"c\" line=\"1\">void UB_I2C1_Init(void);                                                     \/\/ zum initialisieren der I2C-Schnittstelle\r\nint16_t UB_I2C1_ReadByte(uint8_t slave_adr, uint8_t adr);                    \/\/ um ein Byte zu lesen\r\nint16_t UB_I2C1_WriteByte(uint8_t slave_adr, uint8_t adr, uint8_t wert);     \/\/ um ein Byte zu schreiben\r\nint16_t UB_I2C1_ReadMultiByte(uint8_t slave_adr, uint8_t adr, uint8_t cnt);  \/\/ um mehrere Bytes zu lesen\r\nint16_t UB_I2C1_WriteMultiByte(uint8_t slave_adr, uint8_t adr, uint8_t cnt); \/\/ um mehrere Bytes zu schreiben\r\nint16_t UB_I2C1_WriteCMD(uint8_t slave_adr, uint8_t cmd);                    \/\/ ein einzelnes Byte senden\r\nint16_t UB_I2C1_ReadByte16(uint8_t slave_adr, uint16_t adr);                 \/\/ 16bit adresse auslesen\r\nint16_t UB_I2C1_WriteByte16(uint8_t slave_adr, uint16_t adr, uint8_t wert);  \/\/ 16bit adresse beschreiben\r\nvoid UB_I2C1_Delay(volatile uint32_t nCount);                                \/\/ Pausenfunktion<\/pre>\n<p><strong>Beispiel :<\/strong><\/p>\n<pre lang=\"c\" line=\"1\">\/\/--------------------------------------------------------------\r\n\/\/ File     : main.c\r\n\/\/ Datum    : 07.03.2013\r\n\/\/ Version  : 1.0\r\n\/\/ Autor    : UB\r\n\/\/ EMail    : mc-4u(@)t-online.de\r\n\/\/ Web      : www.mikrocontroller-4u.de\r\n\/\/ CPU      : STM32F4\r\n\/\/ IDE      : CooCox CoIDE 1.7.0\r\n\/\/ Module   : CMSIS_BOOT, M4_CMSIS_CORE\r\n\/\/ Funktion : Demo der I2C-LoLevel-Library\r\n\/\/ Hinweis  : Diese zwei Files muessen auf 8MHz stehen\r\n\/\/              \"cmsis_boot\/stm32f4xx.h\"\r\n\/\/              \"cmsis_boot\/system_stm32f4xx.c\"\r\n\/\/--------------------------------------------------------------\r\n\r\n#include \"main.h\"\r\n#include \"stm32_ub_i2c1.h\"\r\n\r\nint main(void)\r\n{\r\n  int16_t wert;\r\n\r\n  SystemInit(); \/\/ Quarz Einstellungen aktivieren\r\n\r\n  UB_I2C1_Init(); \/\/ Init der I2C1-Schnittstelle\r\n\r\n  \/\/ ein Byte vom I2C-Slave mit Adr 0xA0\r\n  \/\/ aus Register-Adr 0x01 auslesen\r\n  wert=UB_I2C1_ReadByte(0xA0,0x01);\r\n  if(wert&lt;0) {\r\n    \/\/ Fehler\r\n  }\r\n\r\n  \/\/ den Wert 0x12 zum I2C-Slave mit Adr 0xC0\r\n  \/\/ in Register-Adr 0x02 speichern\r\n  wert=UB_I2C1_WriteByte(0xC0,0x02,0x12);\r\n  if(wert&lt;0) {\r\n    \/\/ Fehler\r\n  }\r\n\r\n  UB_I2C1_Delay(400); \/\/ kleine Pause nach dem schreiben\r\n\r\n  while(1)\r\n  {\r\n\r\n  }\r\n}\r\n<\/pre>\n<p>Hier die Library zum\u00a0<strong>Download :<\/strong><\/p>\n<p><a href=\"https:\/\/mikrocontroller.bplaced.net\/wordpress\/wp-content\/uploads\/2016\/02\/ub_stm32f4_i2c_v103.zip\">ub_stm32f4_i2c_v103<\/a><\/p>\n<p>Hier der komplette CooCox-Projektordner zum\u00a0<strong>Download :<\/strong><\/p>\n<p><a href=\"https:\/\/mikrocontroller.bplaced.net\/wordpress\/wp-content\/uploads\/2016\/02\/Demo_18_I2C_LoLevel.zip\">Demo_18_I2C_LoLevel<\/a><\/p>\n<h3 id=\"comments-title\">29 Antworten auf <em>18-I2C_LoLevel-Library (STM32F4)<\/em><\/h3>\n<ol class=\"commentlist\">\n<li id=\"li-comment-1154\" class=\"comment even thread-even depth-1\">\n<div id=\"comment-1154\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/1.gravatar.com\/avatar\/701d50d336b1d575a9524ccf8f01fb29?s=40&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Slevin<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">14. Dezember 2013 um 20:00<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Hi,<\/p>\n<p>erstmal vielen Dank f\u00fcr deine Lib, die bei mir sehr gut funktioniert.<\/p>\n<p>Ich verwende dein I2C Besipiel und w\u00fcrde gerne 2 Bytes empfangen.<br \/>\nLeider habe ich es bisher nicht zum laufen gebracht.<br \/>\nWie m\u00fcsste ich deinen Code anpassen, damit ich das 2. Byte empfangen kann:<\/p>\n<p>Danke!<br \/>\nMfG<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-1158\" class=\"comment byuser comment-author-admin_ub bypostauthor odd alt depth-2\">\n<div id=\"comment-1158\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/67426419ead44d5afa132e92685bb460?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">admin_ub<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">16. Dezember 2013 um 20:25<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Hi Slevin, lad dir mal die Version 1.1 von der Library runter. Da hab ich zwei neue Funktionen eingef\u00fcgt. Mit denen kann man mehrere Bytes senden\/empfangen. In deinem Fall zum empfangen von zwei Bytes w\u00fcrde ein Beispiel so aussehen :<\/p>\n<pre class=\"brush: plain; title: ; notranslate\">UB_I2C1_Init();\r\n\/\/ 2 Bytes vom I2C-Slave mit Adr 0xA0\r\n\/\/ ab Register-Adr 0x01 auslesen\r\ncheck=UB_I2C1_ReadMultiByte(0xA0,0x01,2);\r\n\/\/ wenn check==0 dann stehen die zwei Byte\r\n\/\/ in dem Array \"I2C1_DATA\"\r\n<\/pre>\n<p>probier das mal aus und schreib ob es funktioniert<br \/>\ndann mach ich die \u00c4nderung auch beim STM32F429<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/li>\n<\/ul>\n<\/li>\n<li id=\"li-comment-1167\" class=\"comment even thread-odd thread-alt depth-1\">\n<div id=\"comment-1167\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/1.gravatar.com\/avatar\/701d50d336b1d575a9524ccf8f01fb29?s=40&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Slevin<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">17. Dezember 2013 um 20:17<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Hi, leider funktioniert die Funktion UB_I2C1_ReadMultiByte bei mir (teilweise) nicht. Der Slave (Beschleunigungssensor ADXL345) h\u00e4ngt sich beim lesen der Bytes bzw. bei der \u00dcbermittlung der Slave-Adresse (0xA6) auf \u2013 kurz bevor ich die Bytes lesen m\u00f6chte.<br \/>\nIch habe zus\u00e4tzlich eine Stop-Sequenz vor der zweiten Start-Sequenz eingef\u00fcgt (laut Datenblatt).<br \/>\nEin einzelnes Byte kann ich problemlos lesen, nur zwei klappen irgendwie nicht.<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-1168\" class=\"comment byuser comment-author-admin_ub bypostauthor odd alt depth-2\">\n<div id=\"comment-1168\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/67426419ead44d5afa132e92685bb460?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">admin_ub<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">17. Dezember 2013 um 20:34<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>lass mal die zus\u00e4tzliche \u201cSTOP-Sequenz\u201d weg, und probier es nochmal \u2026 und schau mal um Debugger nach welchen R\u00fcckgabewert die Funktion liefert. Da sieht man wo sie rausfliegt.<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-1169\" class=\"comment even depth-3\">\n<div id=\"comment-1169\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/1.gravatar.com\/avatar\/701d50d336b1d575a9524ccf8f01fb29?s=40&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Slevin<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">17. Dezember 2013 um 22:21<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>es klappt!!! Ich habe testweise das Auslesen der Register in den IRQHandler geschoben und nun funktioniert es. Irgendwie scheint der Timer die I2C Kommunikation zu st\u00f6ren, das muss ich nochmal genauer anschauen.<br \/>\nAlso, deine I2C Funktionen laufen einwandfrei.<br \/>\nVielen Dank nochmals!<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li id=\"li-comment-1531\" class=\"comment odd alt thread-even depth-1\">\n<div id=\"comment-1531\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/1.gravatar.com\/avatar\/17bb7e4dc5ce046255db73bdeb0ffbd6?s=40&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Slevin<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">5. April 2014 um 13:24<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Hi, k\u00f6nnte man die I2C Schnittstelle auch mit DMA realisieren?<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-1532\" class=\"comment even depth-2\">\n<div id=\"comment-1532\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/1.gravatar.com\/avatar\/b894d67379dd0647dd316009f47155d2?s=40&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Joerg B.<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">5. April 2014 um 14:58<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Klar kann man das, sie StdLibs Beispiel 2 Boards<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/li>\n<\/ul>\n<\/li>\n<li id=\"li-comment-1608\" class=\"comment odd alt thread-odd thread-alt depth-1\">\n<div id=\"comment-1608\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/e082ef318971e911d792dfdbeb8b78d7?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Ilyas<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">27. April 2014 um 15:44<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Hallo,<\/p>\n<p>ich bin noch recht neu auf dem Gebiet der Mikrocontroller und habe seit kurzem mit dem stm32f4 zu tun.<br \/>\nIch m\u00f6chte mit I2C arbeiten, als IDE verwende ich Keil\u00b5Vision 4 (Laborrechner unserer Uni).<br \/>\nLeider bekomme ich es nicht zum Laufen, \u00fcber Hilfe freue ich mich sehr.<\/p>\n<p>Gr\u00fc\u00dfe, Ilyas<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-1609\" class=\"comment byuser comment-author-admin_ub bypostauthor even depth-2\">\n<div id=\"comment-1609\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/67426419ead44d5afa132e92685bb460?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">admin_ub<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">27. April 2014 um 17:05<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>deine Fehlerbeschreibung \u201cleider bekomme ich es nicht zum laufen\u201d ist zu kurz. Lese dich in die Funktionsweise vom I2C-Protokoll ein, messe die Signale nach, vergleiche den Ist-Zustand mit dem Soll-Zustand und schreib dann nochmal was genau nicht funktioniert wie es soll.<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-1610\" class=\"comment odd alt depth-3\">\n<div id=\"comment-1610\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/e082ef318971e911d792dfdbeb8b78d7?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Ilyas<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">27. April 2014 um 17:37<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Hallo,<br \/>\nentschuldige, dass es bissl ungl\u00fccklich (und zu kurz) formuliert habe, mein Fehler.<br \/>\nDie Funktionsweise des I2C ist mir im Grunde klar. Ich m\u00f6chte das dicovery-board einem I2c-f\u00e4higen AD-Wandler verbinden (ADS7830 von Texas Instruments).<br \/>\nWie die Anfrage vom Discoveryboard an den ADC aussehen soll ist mir klar. Leider bin ich mit der Vielzahl der Einstellm\u00f6glichkeiten am STM32F4 \u00fcberfordert.<br \/>\nIch habe mir dein Beispiel angesehen, bekomme es aber in meiner IDE (Keil \u00b5Vision 4) nicht zum laufen.<\/p>\n<p>Beste Gr\u00fc\u00dfe, Ilyas<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-1611\" class=\"comment byuser comment-author-admin_ub bypostauthor even depth-4\">\n<div id=\"comment-1611\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/67426419ead44d5afa132e92685bb460?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">admin_ub<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">27. April 2014 um 17:55<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>schon wieder \u201cbekomm es nicht zum laufen\u201d !! du musst am F4 gar nichts \u201ceinstellen\u201d das macht die Library alles f\u00fcr dich und die ist nicht compilerspezifisch.<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li id=\"li-comment-1614\" class=\"comment odd alt thread-even depth-1\">\n<div id=\"comment-1614\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/e082ef318971e911d792dfdbeb8b78d7?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Ilyas<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">27. April 2014 um 23:12<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Guten Abend,<\/p>\n<p>habe mir in diesem Zusammenhang auch die Standard Peripherals Library von ST zum STM32F4 angeschaut. Beim Versuch die dort enthaltenen Beispiele zu nutzen sto\u00dfe ich auf das Problem, dass w\u00e4hrend des Linkens Fehler auftauchen wie bespielsweise:<br \/>\n\u201c.\\STM32F40_41xxx\\STM32F40_41xxx.axf: Error: L6218E: Undefined symbol LCD_Clear (referred from main.o).\u201d<br \/>\nIm entsprechenden readme des Beispielprojekts wird darauf hingewiesen, dass 3 .c-files \u201cAdd the following files in the project source list\u201d dem Projekt hinzugef\u00fcgt werden m\u00fcssen. Jedoch behebt dies den Fehler nicht.<br \/>\nMein Board ist das STM32F407VGT6.<br \/>\nVielen Dank f\u00fcr eure Hilfe.<\/p>\n<p>Gr\u00fc\u00dfe, Ilyas<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-1615\" class=\"comment byuser comment-author-admin_ub bypostauthor even depth-2\">\n<div id=\"comment-1615\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/67426419ead44d5afa132e92685bb460?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">admin_ub<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">28. April 2014 um 08:31<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>sorry, f\u00fcr linkerfehler bin ich nicht zust\u00e4ndig.<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/li>\n<\/ul>\n<\/li>\n<li id=\"li-comment-1696\" class=\"comment odd alt thread-odd thread-alt depth-1\">\n<div id=\"comment-1696\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/e082ef318971e911d792dfdbeb8b78d7?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Ilyas<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">12. Mai 2014 um 13:52<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Guten Tag,<\/p>\n<p>arbeite jetzt mit der CoIDE und deinem Beispielcode (18-I2C_LoLevel).<br \/>\nIch finde die Kommentare und erl\u00e4uterungen im Code sehr hilfreich, vielen Dank hierf\u00fcr.<br \/>\nZun\u00e4chst will ich mich am Audio-DAC (Cirrus CS43L22) versuchen.<br \/>\nDieser befindet sich an I2C1 (PB6 bzw. PB9). Von au\u00dfen habe ich 2x 4,7 kOhm Widerst\u00e4nde mit +3V verbunden, da auf dem Discovery-Board selbst nur f\u00fcr I2C3 Pullups vorhanden sind.<br \/>\nIn \u201cstm32_ub_i2c1.h\u201d habe ich f\u00fcr SCL PB6 und f\u00fcr SDA PB9 ausgew\u00e4hlt.<br \/>\nWenn ich nun beispielsweise die Lautst\u00e4rke f\u00fcr Kanal A (Master A Vol) schreiben m\u00f6chte, erhalte ich als R\u00fcckgabewert der UB_I2C1_WriteByte eine -2.<\/p>\n<p>Aufruf: UB_I2C1_WriteByte(0\u00d794,0\u00d720,0\u00d700)<br \/>\n0\u00d794 ist die Adresse des Audio-DAC, 0\u00d720 die Register-Adresse f\u00fcr die Lautst\u00e4rke von Kanal A und 0\u00d700 der zu schreibende Wert f\u00fcr die Lautst\u00e4rke.<\/p>\n<p>Was habe ich vergessen zu beachten?<br \/>\nGr\u00fc\u00dfe, Ilyas<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-1697\" class=\"comment even depth-2\">\n<div id=\"comment-1697\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/e082ef318971e911d792dfdbeb8b78d7?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Ilyas<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">12. Mai 2014 um 15:08<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Fehler gefunden:<br \/>\nMan muss den Audio-DAC noch einschalten. Mit dem Schaltplan des Discovery-Boards wird ersichtlich, dass RESET\/ per 10k Widerstand mit Masse verbunden ist\u2026<\/p>\n<p>Ich hoffe, dass diese Information auch f\u00fcr andere User hilfreich ist.<\/p>\n<p>Gr\u00fc\u00dfe, Ilyas<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/li>\n<\/ul>\n<\/li>\n<li id=\"li-comment-2150\" class=\"comment odd alt thread-even depth-1\">\n<div id=\"comment-2150\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/6d15e4d56c3c35c346924280a60ba191?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Michi<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">20. September 2014 um 16:12<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Hallo,<br \/>\nkurze Verst\u00e4ndnisfrage, meine Main:<br \/>\nint main(void)<br \/>\n{<br \/>\nint16_t wert;<br \/>\nint16_t wert2;<\/p>\n<p>SystemInit(); \/\/ Quarz Einstellungen aktivieren<br \/>\nUB_I2C3_Init(); \/\/ Init der I2C1-Schnittstelle<\/p>\n<p>wert=UB_I2C3_WriteByte(0\u00d788,0\u00d700,0\u00d702);<br \/>\nif(wert&lt;0) {<br \/>\n\/\/ Fehler<br \/>\n}<br \/>\nUB_I2C3_Delay(400); \/\/ kleine Pause nach dem schreiben<\/p>\n<p>wert2=UB_I2C3_ReadByte(0\u00d788,0\u00d700);<br \/>\nif(wert2&lt;0) {<br \/>\n\/\/ Fehler<br \/>\n}<\/p>\n<p>UB_I2C3_Delay(400);<br \/>\nwhile(1)<br \/>\n{<br \/>\n}<br \/>\n}<br \/>\nAlso isch Schreibe einen Wert 0\u00d702 in ein Register und lese ihn dann wieder aus.<br \/>\nM\u00fcsste dann nicht dieser Wert in der Variable wert2 stehen? Bei mir steht da n\u00e4mlich nur 1 drinnen egal was ich mache \u2026.<br \/>\nDanke<br \/>\nGru\u00df Michi<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-2151\" class=\"comment byuser comment-author-admin_ub bypostauthor even depth-2\">\n<div id=\"comment-2151\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/67426419ead44d5afa132e92685bb460?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">admin_ub<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">20. September 2014 um 17:35<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>was f\u00fcr einen Slave hast du den angeschlossen ? Event. ist die Adresse 0\u00d700 eine Read-Only.<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-2155\" class=\"comment odd alt depth-3\">\n<div id=\"comment-2155\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/6d15e4d56c3c35c346924280a60ba191?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Michi<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">21. September 2014 um 13:44<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Hallo,<br \/>\nAls Slave habe ich einen TDA7439 (Digitale Klangregelung):<br \/>\n<a href=\"http:\/\/www.st.com\/web\/en\/resource\/technical\/document\/datasheet\/CD00004906.pdf\" rel=\"nofollow\">http:\/\/www.st.com\/web\/en\/resource\/technical\/document\/datasheet\/CD00004906.pdf<\/a><br \/>\nangeschlossen\u2026 Eine Read Only Adresse kann es nicht sein!<br \/>\nDie 4,7k Ohm Wid. auf 5V sind auch vorhanden.<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-2156\" class=\"comment byuser comment-author-admin_ub bypostauthor even depth-4\">\n<div id=\"comment-2156\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/67426419ead44d5afa132e92685bb460?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">admin_ub<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">21. September 2014 um 15:09<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>im Datasheet steht nichts von READ also vermutlich geht das gar nicht. Wenn der R\u00fcckgabewert der Write Funktion =0 ist, dann hat das IC mit einem ACK geantwortet und alles sollte gut sein. Du kannst zum Spass ja mal eine andere Slave adresse senden z.B. 0\u00d790 dann sollte eine Fehler zurueckgemeldet werden.<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-2157\" class=\"comment odd alt depth-5\">\n<div id=\"comment-2157\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/6d15e4d56c3c35c346924280a60ba191?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Michi<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">21. September 2014 um 16:26<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Danke f\u00fcr deine Hilfe!<br \/>\nHast recht bei einer anderen Addresse kommt ein Fehler.<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li id=\"li-comment-2380\" class=\"comment even thread-odd thread-alt depth-1\">\n<div id=\"comment-2380\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/eef39ab5667d6669c5c929c1a3caa658?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Benedikt<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">22. Oktober 2014 um 17:36<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Hallo,<br \/>\nleider habe ich nun schon l\u00e4nger Probleme mit der I2C Schnittstelle. Ich habe dein Beispiele als Master und als Slave \u00fcbernommen und diese aufeinander geschalten. Also die I2C1 Schnittstelle als Master auf die I2C2 Schnittstelle als Slave. Aber ich bekomme immer -1 zur\u00fcck. Auch bei meinen Test mit einem MPU6050 kam immer nur -1 zur\u00fcck.<br \/>\nKann mir hier jemand weiterhelfen?<br \/>\nVielen Dank<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-2381\" class=\"comment byuser comment-author-admin_ub bypostauthor odd alt depth-2\">\n<div id=\"comment-2381\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/67426419ead44d5afa132e92685bb460?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">admin_ub<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">22. Oktober 2014 um 20:31<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Hast du die Beispiel 1:1 \u00fcbernommen oder was abge\u00e4ndert ?<br \/>\nSind die externen 4k7 Pull-Up Widerst\u00e4nde in SCL und SDA eingel\u00f6tet ?<br \/>\nIch denke doch du hast ZWEI STM32F4 benutzt, einer als Master und einer als Slave richtig ? Eine CPU kann nicht Master und Slave gleichzeitig sein (zumindest nicht mit meinen Librarys)<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-2388\" class=\"comment even depth-3\">\n<div id=\"comment-2388\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/eef39ab5667d6669c5c929c1a3caa658?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Benedikt<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">24. Oktober 2014 um 14:11<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Ich habe nur den Master das richtige Byte schreiben lassen. Sonst habe ich nichts ge\u00e4ndert (UB_I2C1_WriteByte(0\u00d770,0\u00d700,0\u00d712);).<br \/>\nIch habe 2 STMF4 und die Widerst\u00e4nde sind auch vorhanden. Habe auch schon versucht die internen zu nehmen. Habe PB8 mit PB8 und PB7 mit PB7 verbunden. Leider ohne Erfolg. LED bleibt Rot und return Value ist -1.<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-2394\" class=\"comment byuser comment-author-admin_ub bypostauthor odd alt depth-4\">\n<div id=\"comment-2394\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/67426419ead44d5afa132e92685bb460?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">admin_ub<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">25. Oktober 2014 um 09:44<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>hast du auch GND von beiden Boards verbunden ?<br \/>\nHast du die \u00c4nderung f\u00fcr PB8 in beiden C-Files (Master und Slave) gemacht ?.Laufen beide Boards mit der richtigen Frequenz ?. Zur Not wirst du mit dem Oszi Fehler suchen m\u00fcssen. Die Librarys funktionieren (hab ich beide getestet)<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-2415\" class=\"comment even depth-5\">\n<div id=\"comment-2415\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/eef39ab5667d6669c5c929c1a3caa658?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Benedikt<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">29. Oktober 2014 um 18:51<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Ja, habe ich alles gemacht. Hatte heute die M\u00f6glichkeit mit einem Oszi zu messen. Der Master scheint richtig zu arbeiten. Nur antwortet der Slave nicht.<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/li>\n<li id=\"li-comment-2418\" class=\"comment byuser comment-author-admin_ub bypostauthor odd alt depth-5\">\n<div id=\"comment-2418\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/67426419ead44d5afa132e92685bb460?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">admin_ub<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">29. Oktober 2014 um 18:59<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>sorry, da kann ich nicht helfen. Event. sendet der Master schon Daten bevor der Slave bereit ist.<br \/>\nMach mal eine Pause von 1sec bevor das Byte zum Slave gesendet wird. Und schalte den Slave zuerst ein.<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li id=\"li-comment-3274\" class=\"comment even thread-even depth-1\">\n<div id=\"comment-3274\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/1.gravatar.com\/avatar\/5c5b046aad2e0bcb34c085c9c6e2c7ba?s=40&amp;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">sadok<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">20. Mai 2015 um 17:51<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>hallo alle zuzamen ..konnte vlt jemanden mir helfen !!!!<br \/>\nich versuche mehere byte von meine Sensor zu lesen aber irgenwie klappt es nicht mit diese funktion <img decoding=\"async\" class=\"wp-smiley\" src=\"wp-includes\/images\/smilies\/icon_sad.gif\" alt=\":(\" \/> <img decoding=\"async\" class=\"wp-smiley\" src=\"wp-includes\/images\/smilies\/icon_sad.gif\" alt=\":(\" \/><br \/>\nUB_I2C2_ReadMultiByte(uint8_t slave_adr, uint8_t adr, uint8_t cnt)!!!<\/p>\n<p>ich kann nur eine byte lesen mit das andere funktion<\/p>\n<p>bitte kann mir jemanden helfen ??<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/p>\n<ul class=\"children\">\n<li id=\"li-comment-3276\" class=\"comment byuser comment-author-admin_ub bypostauthor odd alt depth-2\">\n<div id=\"comment-3276\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/67426419ead44d5afa132e92685bb460?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">admin_ub<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">21. Mai 2015 um 19:21<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>was f\u00fcr ein \u201cSensor\u201d ist das ? Und welche Daten willst du auslesen ?<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/li>\n<\/ul>\n<\/li>\n<li id=\"li-comment-4418\" class=\"comment even thread-odd thread-alt depth-1\">\n<div id=\"comment-4418\">\n<div class=\"comment-author vcard\"><img loading=\"lazy\" decoding=\"async\" class=\"avatar avatar-40 photo\" src=\"http:\/\/0.gravatar.com\/avatar\/8ee1edc4df18d1afd12eb0c4c8a55091?s=40&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D40&amp;r=G\" alt=\"\" width=\"40\" height=\"40\" \/><cite class=\"fn\">Christian<\/cite> <span class=\"says\">sagt:<\/span><\/div>\n<p><!-- .comment-author .vcard --><\/p>\n<div class=\"comment-meta commentmetadata\">30. November 2015 um 18:25<\/div>\n<p><!-- .comment-meta .commentmetadata --><\/p>\n<div class=\"comment-body\">\n<p>Hallo,<\/p>\n<p>ich wollte diese Funktionen heute abend mal testen. da ich schon recht viel mit I2C gemacht habe frage ich mich allerdings, wie hier NAK und ACk gehandhabt werden, bzw das Einf\u00fcgen von Stop Bits? Das ist bei jedem Baustein anders, daher macht es auch wenig Sinn I2C auf High-Level zu schreiben. Wichtig sind nur die Timeouts, da mit jedem beliebigen Busfehler gerechnet werden muss.<\/p>\n<p>Ich wollte das heute abend mal mit einem 24LC32 von Microchip testen.<\/p>\n<\/div>\n<\/div>\n<p><!-- #comment-## --><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>-diese Library dient zum benutzen der I2C-Schnittstelle im Master-Mode -die I2C-Pins die benutzt werden sollen, m\u00fcssen im C-File eingetragen werden (im H-File kann die I2C-Clock-Frq eingestellt werden) -auf der Hardware d\u00fcrfen die zwei externen Pull-Up Widerst\u00e4nde (je 4k7) an SCL &hellip; <a href=\"https:\/\/mikrocontroller.bplaced.net\/wordpress\/?page_id=235\">Weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":144,"menu_order":18,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[128],"tags":[98,9,7],"class_list":["post-235","page","type-page","status-publish","hentry","category-stm32f4","tag-i2c","tag-library","tag-stm32f4"],"_links":{"self":[{"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=\/wp\/v2\/pages\/235","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=235"}],"version-history":[{"count":4,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=\/wp\/v2\/pages\/235\/revisions"}],"predecessor-version":[{"id":3668,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=\/wp\/v2\/pages\/235\/revisions\/3668"}],"up":[{"embeddable":true,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=\/wp\/v2\/pages\/144"}],"wp:attachment":[{"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=235"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=235"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mikrocontroller.bplaced.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=235"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}