{"id":26,"date":"2014-12-16T04:51:50","date_gmt":"2014-12-16T03:51:50","guid":{"rendered":"http:\/\/elektronik.alexander-roehl.de\/?p=26"},"modified":"2016-02-28T23:32:47","modified_gmt":"2016-02-28T22:32:47","slug":"esm-externalserialmonitor","status":"publish","type":"post","link":"http:\/\/elektronik.alexander-roehl.de\/?p=26","title":{"rendered":"ESM &#8211; ExternalSerialMonitor"},"content":{"rendered":"<p>.<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/elektronik.alexander-roehl.de\/wp-content\/uploads\/2014\/12\/ETM1.jpg\"><img loading=\"lazy\" class=\"alignnone wp-image-422 size-medium\" src=\"http:\/\/elektronik.alexander-roehl.de\/wp-content\/uploads\/2014\/12\/ETM1-300x225.jpg\" alt=\"ETM\" width=\"300\" height=\"225\" srcset=\"http:\/\/elektronik.alexander-roehl.de\/wp-content\/uploads\/2014\/12\/ETM1-300x225.jpg 300w, http:\/\/elektronik.alexander-roehl.de\/wp-content\/uploads\/2014\/12\/ETM1-267x200.jpg 267w, http:\/\/elektronik.alexander-roehl.de\/wp-content\/uploads\/2014\/12\/ETM1-150x113.jpg 150w, http:\/\/elektronik.alexander-roehl.de\/wp-content\/uploads\/2014\/12\/ETM1.jpg 800w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><br \/>\n<\/a><a href=\"http:\/\/elektronik.alexander-roehl.de\/wp-content\/uploads\/2014\/12\/IMG284_a.jpg\"><img loading=\"lazy\" class=\"alignnone size-thumbnail wp-image-28\" src=\"http:\/\/elektronik.alexander-roehl.de\/wp-content\/uploads\/2014\/12\/IMG284_a-150x150.jpg\" alt=\"IMG284_a\" width=\"150\" height=\"150\" \/><\/a> <a href=\"http:\/\/elektronik.alexander-roehl.de\/wp-content\/uploads\/2014\/12\/IMG287_a.jpg\"><img loading=\"lazy\" class=\"alignnone size-thumbnail wp-image-29\" src=\"http:\/\/elektronik.alexander-roehl.de\/wp-content\/uploads\/2014\/12\/IMG287_a-150x150.jpg\" alt=\"IMG287_a\" width=\"150\" height=\"150\" \/><\/a><\/p>\n<p>Sometimes I needed an external serial monitor like the Serial Monitor in the Arduino Editor, to see what is going on. So I made one.<br \/>\nThe first picture shows an example how could be it designed.<br \/>\nFor the ESM I used an Atmel Atmega328 (based on the Arduino-Board) because it have an internal SRAM with 2KBytes. It&#8217;s necessary for the big data processing.<br \/>\nSo you need more than 1KByte SRAM.<\/p>\n<p>With the menu in the ESM you can do&#8230;<br \/>\n&#8230; setting the baud rate<br \/>\n&#8230; start and pause the reading<\/p>\n<p>&nbsp;<\/p>\n<h2 class=\"step-title\">Step 1: Circuit<\/h2>\n<p><a href=\"http:\/\/elektronik.alexander-roehl.de\/wp-content\/uploads\/2014\/12\/Schema.jpg\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-34\" src=\"http:\/\/elektronik.alexander-roehl.de\/wp-content\/uploads\/2014\/12\/Schema-300x225.jpg\" alt=\"Schema\" width=\"300\" height=\"225\" srcset=\"http:\/\/elektronik.alexander-roehl.de\/wp-content\/uploads\/2014\/12\/Schema-300x225.jpg 300w, http:\/\/elektronik.alexander-roehl.de\/wp-content\/uploads\/2014\/12\/Schema.jpg 1024w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h2 class=\"step-title\">Step 2: Parts list<\/h2>\n<p><a href=\"http:\/\/elektronik.alexander-roehl.de\/wp-content\/uploads\/2014\/12\/PartList_a.jpg\"><img loading=\"lazy\" class=\"alignnone wp-image-425 size-medium\" src=\"http:\/\/elektronik.alexander-roehl.de\/wp-content\/uploads\/2014\/12\/PartList_a-300x225.jpg\" alt=\"PartList_a\" width=\"300\" height=\"225\" srcset=\"http:\/\/elektronik.alexander-roehl.de\/wp-content\/uploads\/2014\/12\/PartList_a-300x225.jpg 300w, http:\/\/elektronik.alexander-roehl.de\/wp-content\/uploads\/2014\/12\/PartList_a-267x200.jpg 267w, http:\/\/elektronik.alexander-roehl.de\/wp-content\/uploads\/2014\/12\/PartList_a-150x113.jpg 150w, http:\/\/elektronik.alexander-roehl.de\/wp-content\/uploads\/2014\/12\/PartList_a.jpg 800w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<pre>C1,C8,C10\u00a0\u00a0\u00a0\u00a0 100nF\/50V\r\nC2,C3 \u00a0 \u00a0 \u00a0 \u00a0 22pF\/50V\r\nC4,C5,C6\u00a0\u00a0\u00a0\u00a0\u00a0 1\u00b5F\r\nC7,C9 \u00a0 \u00a0 \u00a0 \u00a0 47\u00b5F\/16V\r\nD1,D2,D3,D4\u00a0\u00a0 LED-SMD OSRAM TOPLED, 9 mcd, green\r\nDisplay1\u00a0\u00a0\u00a0\u00a0\u00a0 EA_DOG-S102-6\r\nIC1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ATMEGA328(DIL28S)\r\nIC3 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 L7805 5V VOLTAGE CONVERTER\r\nK1 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0FEMALE CONNECTOR\r\nQ1\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 16MHz\r\nR1,R2,R3,R4\u00a0\u00a0 100KOhm\r\nR5,R6,R7,R8 \u00a0 100 Ohm\r\nR9\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 3,3KOhm\r\nR10\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 1KOhm\r\nS2,S3,S4,S5\u00a0\u00a0 JTP-1230 BUTTON\r\nS6\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 SLIDE SWITCH\r\n9V\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Battery\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h2 id=\"step3\" class=\"step-title\">Step 3: Arduino sketch<\/h2>\n<p><strong>esm.ino<\/strong><br \/>\nThe main sketch.<\/p>\n<p><strong>vars.h<\/strong><br \/>\nGlobal variables are defined here.<\/p>\n<p><strong>menu.h<\/strong><br \/>\nThe menu-functions.<\/p>\n<p><strong>buttons.h<\/strong><br \/>\nThe buttons are here defined.<\/p>\n<p><strong>programs.h<\/strong><br \/>\nThe functions behind the menu.<br \/>\nmenu()<br \/>\nstartSerial()<br \/>\nsettings()<br \/>\nmode()<\/p>\n<p><strong>myDOG.h<\/strong><br \/>\nFunctions for the DOGS-102 display.<br \/>\nstatic void setChipSelectPin(PIN No. as const int)<br \/>\nstatic void writeByte(unsigned int)<br \/>\nstatic void Init()<br \/>\nstatic void begin()<br \/>\nstatic void drawPic(byte[8][102])<br \/>\nstatic void displayClear()<br \/>\nstatic void print(Text as char*)<br \/>\nstatic void print(Text as char*, Row as int)**<br \/>\nstatic void print(Text as char*, Col as int, Row as int)**<br \/>\nstatic void print(Number long, Col as int, Row as int)**<\/p>\n<p>** Col = 0 to 102 pix, Row 0 &#8211; 7<\/p>\n<p><strong>myfont.h<\/strong><br \/>\nFont definitions and functions.<\/p>\n<p><strong>myPic.h<\/strong><br \/>\nThe start image.<\/p>\n<p><strong>mySPI.h<\/strong><br \/>\nThe SPI function.<\/p>\n<h2 id=\"step4\" class=\"step-title\">Step 4: Example<\/h2>\n<p>The left homemade Arduino board contains the following code:<\/p>\n<p><code><br \/>\n\/ *<br \/>\nsender.ino<br \/>\nSerial Test Program<br \/>\n* \/<\/p>\n<p>void setup () {<br \/>\nSerial.begin (9600);<br \/>\n}<\/p>\n<p>void loop () {<br \/>\nfor (int a = 0; a &lt;1000; a + +) {<br \/>\nSerial.print (\"int a =\");<br \/>\nSerial.println (a);<br \/>\ndelay (100);<br \/>\n}<br \/>\n}<br \/>\n<\/code><br \/>\nThis arduino sketch is what I created to test.<br \/>\nThis program sends every 100 milliseconds a counter: &#8222;int a =&#8220; 0-1000.<br \/>\nThe ESM (original Arduino board) is connected to the other Arduino via TX and RX (crossed).<br \/>\nNow you can press the play-button and it appears the transfer on the display.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>. &nbsp; Sometimes I needed an external serial monitor like the Serial Monitor in the Arduino Editor, \u2026<\/p>\n<p class=\"continue-reading-button\"> <a class=\"continue-reading-link\" href=\"http:\/\/elektronik.alexander-roehl.de\/?p=26\">Continue reading<i class=\"crycon-right-dir\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":27,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[32],"tags":[15,13,12,14],"_links":{"self":[{"href":"http:\/\/elektronik.alexander-roehl.de\/index.php?rest_route=\/wp\/v2\/posts\/26"}],"collection":[{"href":"http:\/\/elektronik.alexander-roehl.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/elektronik.alexander-roehl.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/elektronik.alexander-roehl.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/elektronik.alexander-roehl.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=26"}],"version-history":[{"count":10,"href":"http:\/\/elektronik.alexander-roehl.de\/index.php?rest_route=\/wp\/v2\/posts\/26\/revisions"}],"predecessor-version":[{"id":432,"href":"http:\/\/elektronik.alexander-roehl.de\/index.php?rest_route=\/wp\/v2\/posts\/26\/revisions\/432"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/elektronik.alexander-roehl.de\/index.php?rest_route=\/wp\/v2\/media\/27"}],"wp:attachment":[{"href":"http:\/\/elektronik.alexander-roehl.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=26"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/elektronik.alexander-roehl.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=26"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/elektronik.alexander-roehl.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=26"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}