{"id":1945,"date":"2019-03-12T19:51:36","date_gmt":"2019-03-12T18:51:36","guid":{"rendered":"http:\/\/wildlab.org\/?p=1945"},"modified":"2019-03-15T21:40:41","modified_gmt":"2019-03-15T20:40:41","slug":"logic-analyzer-do-we-need-it","status":"publish","type":"post","link":"https:\/\/wildlab.org\/index.php\/2019\/03\/12\/logic-analyzer-do-we-need-it\/","title":{"rendered":"Logic analyzer &#8211; do we need it?"},"content":{"rendered":"<h2>Logic analyzer and its use<\/h2>\n<p>When programming any MCU, no matter Arduino IDE, Keil, Atmel studio or other compilers and assemblers, many times we got intro problem not knowing what happening on our data transfer from and to MCU. For example, we want to use I2C protocol for communicating with some sensor, but it does not respond. Many things can be wrong, and without logic analyzer, we just don&#8217;t know whether our code is wrong, the sensor is broken, or maybe something else.<\/p>\n<h2>Cheap Chinese clone or professional one?<\/h2>\n<p>Good question, depend of many factors. Do you use it for your work, or do you program for fun? I am using for my personal projects, and this one that cost less than $50 US.:<\/p>\n<p><a href=\"https:\/\/wildlab.org\/wp-content\/uploads\/2019\/03\/Logic_a_16_ch_.jpg\"><img loading=\"lazy\" class=\"aligncenter size-large wp-image-1948\" src=\"https:\/\/wildlab.org\/wp-content\/uploads\/2019\/03\/Logic_a_16_ch_-1024x819.jpg\" alt=\"analyzer\" width=\"474\" height=\"379\" srcset=\"https:\/\/wildlab.org\/wp-content\/uploads\/2019\/03\/Logic_a_16_ch_-1024x819.jpg 1024w, https:\/\/wildlab.org\/wp-content\/uploads\/2019\/03\/Logic_a_16_ch_-300x240.jpg 300w, https:\/\/wildlab.org\/wp-content\/uploads\/2019\/03\/Logic_a_16_ch_.jpg 1920w\" sizes=\"(max-width: 474px) 100vw, 474px\" \/><\/a><\/p>\n<p>It works fine, but there is limit in speed, especially with more than one channel. It is USB 2.0 product and has no analog part as it has original <a href=\"https:\/\/www.saleae.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">Saleae Logic analyzer<\/a>. It is too much expensive for my pocket, especially because I am not professional. I just have dream that it will be mine one day, but until then&#8230; Anyway, here is video for anyone who are interested and does not know what I am talking about:<\/p>\n<p><iframe loading=\"lazy\" title=\"On your request here is video about logic analyzer and why we need it WL\" width=\"474\" height=\"267\" src=\"https:\/\/www.youtube.com\/embed\/Gp_aHRRGKOE?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>Recently I had problem programming STM32 and connecting OLED display. Despite spending hours googling what exact command should be implemented, and reading their documentation, I was not able to get picture on the OLED display. Then got idea &#8211; programmed Atmega 328p with Arduino example, then put logic analyzer to I2C bus, and got the codes for initialization of the display.<\/p>\n<p>Another example is when I wanted to know toy grade quadcopters, how transmitter and receiver know where to &#8216;jump&#8217; by using &#8216;frequency hopping&#8217;. Using SPI protocol and Logic analyzer, I was able to see exactly what is &#8216;the secret&#8217;. Aside many bytes that transmitter sending for moving flying device up\/down, left and right, there is one byte that constantly changes even when remote sticks are still &#8211; that is information for next channel. So, TX sending information on current channel, then last bit is channel number for next transmission. Whole protocol is made so that if it goes briefly out of range, or missing one packet due to noise, receiver back to original &#8216;calling&#8217; channel, and in the same time transmitter sending on this channel periodically next possible channel where will be next time. That is so cool to know.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Logic analyzer and its use When programming any MCU, no matter Arduino IDE, Keil, Atmel studio or other compilers and assemblers, many times we got intro problem not knowing what happening on our data transfer from and to MCU. For example, we want to use I2C protocol for communicating with some sensor, but it does &hellip; <a href=\"https:\/\/wildlab.org\/index.php\/2019\/03\/12\/logic-analyzer-do-we-need-it\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Logic analyzer &#8211; do we need it?<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":1967,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/wildlab.org\/index.php\/wp-json\/wp\/v2\/posts\/1945"}],"collection":[{"href":"https:\/\/wildlab.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wildlab.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wildlab.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wildlab.org\/index.php\/wp-json\/wp\/v2\/comments?post=1945"}],"version-history":[{"count":2,"href":"https:\/\/wildlab.org\/index.php\/wp-json\/wp\/v2\/posts\/1945\/revisions"}],"predecessor-version":[{"id":1949,"href":"https:\/\/wildlab.org\/index.php\/wp-json\/wp\/v2\/posts\/1945\/revisions\/1949"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wildlab.org\/index.php\/wp-json\/wp\/v2\/media\/1967"}],"wp:attachment":[{"href":"https:\/\/wildlab.org\/index.php\/wp-json\/wp\/v2\/media?parent=1945"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wildlab.org\/index.php\/wp-json\/wp\/v2\/categories?post=1945"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wildlab.org\/index.php\/wp-json\/wp\/v2\/tags?post=1945"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}