{"id":573,"date":"2013-03-14T11:21:58","date_gmt":"2013-03-14T15:21:58","guid":{"rendered":"http:\/\/fll-freak.com\/blog\/?p=573"},"modified":"2025-04-21T00:54:36","modified_gmt":"2025-04-21T04:54:36","slug":"as3935-lightning-detector-update","status":"publish","type":"post","link":"https:\/\/fll-freak.com\/blog\/?p=573","title":{"rendered":"AS3935 lightning detector update"},"content":{"rendered":"<p>I was having problems with reliable communications with the lightning detector chip over the I2C bus. Sometimes I would read a register and it would not be at all what I was expecting. The situation was during calibration when I was reading register 8 and suddenly one of the control bits would get set to zero. Since I was only reading this register, having a bit change value was unexpected. And it was not just a read problem because the functionality of that was controlled by the bit changed as well.<!--more-->At first I figured I was not doing the I2C protocol properly. I send hours with a logic analyzer capturing data and going over it. Nothing. And then in a fit of desperation, I modified the bus speed from 100kHz to 50kHz and everything started to work reliably. But why? Why would reading a register at a fast rate cause bits to be changed? I am beginning to suspect this chip has more anomalies that will be revealed over time.<\/p>\n<p>I will be cleaning up the code shortly and will post it here. Perhaps this weekend if I do not get called into work as I have been for the last month.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was having problems with reliable communications with the lightning detector chip over the I2C bus. Sometimes I would read a register and it would not be at all what I was expecting. The situation was during calibration when I &hellip; <a href=\"https:\/\/fll-freak.com\/blog\/?p=573\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28,20,4,7],"tags":[],"class_list":["post-573","post","type-post","status-publish","format-standard","hentry","category-as3935","category-components","category-lightning-detector","category-projects"],"_links":{"self":[{"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/573","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=573"}],"version-history":[{"count":3,"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/573\/revisions"}],"predecessor-version":[{"id":1008,"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/573\/revisions\/1008"}],"wp:attachment":[{"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=573"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=573"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fll-freak.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=573"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}