{"id":13563,"date":"2016-04-22T09:00:55","date_gmt":"2016-04-22T16:00:55","guid":{"rendered":"https:\/\/blog.digilentinc.com\/?p=13563"},"modified":"2016-04-22T09:37:43","modified_gmt":"2016-04-22T16:37:43","slug":"always-check-your-pins","status":"publish","type":"post","link":"https:\/\/digilent.com\/blog\/always-check-your-pins\/","title":{"rendered":"Always Check Your Pins!"},"content":{"rendered":"<p>It hasn&#8217;t been a week since I posted the <a href=\"https:\/\/digilent.com\/blog\/index.php\/mapping-the-dp32\/\">Pinout Diagram for the DP32<\/a>, and already I&#8217;ve run into a serious roadblock that would have been easily solved if I&#8217;d only used my own diagram!<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-13568\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/04\/DP32-Pin-Diagram-3-Blog-Title-Edit-545x600.png\" alt=\"Title Image\" width=\"364\" height=\"400\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/04\/DP32-Pin-Diagram-3-Blog-Title-Edit-545x600.png 545w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/04\/DP32-Pin-Diagram-3-Blog-Title-Edit-768x845.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/04\/DP32-Pin-Diagram-3-Blog-Title-Edit-931x1024.png 931w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/04\/DP32-Pin-Diagram-3-Blog-Title-Edit-800x880.png 800w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/04\/DP32-Pin-Diagram-3-Blog-Title-Edit.png 960w\" sizes=\"auto, (max-width: 364px) 100vw, 364px\" \/><\/p>\n<p>If you follow me on <a href=\"http:\/\/www.instructables.com\/id\/For-Cheap-Robots\/\">Instructables<\/a>, you know that I&#8217;ve recently put out a tutorial on <a href=\"http:\/\/www.instructables.com\/id\/Debouncing-Interrupts-With-MPIDE-Part-2-RC-Filters\/\">debouncing RC filters with the DP32 and uC32<\/a>. During the majority of that tutorial, I focus on the uC32, because, as I pointed out at the end, the DP32 had some weird behavior. Well, as I began working more with RC filters and the DP32, that weird behavior grew into a serious headache, as I couldn&#8217;t get any RC filter to work properly!<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-13567\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/04\/DP32-Tuning-1.gif\" alt=\"DP32 Interrupt Not Working Properly\" width=\"480\" height=\"270\" \/><\/p>\n<p>I was using two interrupts on pins 2 and 3 (INT3 and INT1 respectively). The circuit I was using is below:<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-13566\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/04\/RC-Filter_schem-600x535.jpg\" alt=\"RC Filter_schem\" width=\"400\" height=\"357\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/04\/RC-Filter_schem-600x535.jpg 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/04\/RC-Filter_schem.jpg 693w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/p>\n<p>As you can see, my pulldown resistor (R2) is quite low. I found that if I made my pulldown resistors too large, the interrupts stopped working, but that&#8217;s the exact opposite of the behavior I expected! Larger pulldown resistors should\u00a0<em>increase\u00a0<\/em>the voltage difference seen by the interrupt pins. So what the heck was going on?<\/p>\n<p>Everyone I asked for help was stumped. It wasn&#8217;t until an insightful observation from one of the engineering interns prompted me to take a different approach. What he suggested was that I check the performance of the\u00a0<em>pins themselves<\/em>. That got me thinking, and finally I did what I\u00a0<em>should have<\/em> done in the first place! I checked the DP32 Pinout Diagram I&#8217;d made the previous week.<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-13565\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/04\/DP32-Pin-Diagram-Jumper-Edit-for-Blog-600x452.png\" alt=\"Pin Diagram DUH!\" width=\"600\" height=\"452\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/04\/DP32-Pin-Diagram-Jumper-Edit-for-Blog-600x452.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/04\/DP32-Pin-Diagram-Jumper-Edit-for-Blog.png 666w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>Sure enough, I had\u00a0<em>completely forgotten<\/em> about the jumpers connected to pins 2 and 3, which pull those pins up during normal operation. All I had to do was remove those jumpers and suddenly the DP32 was perfectly behaved.<\/p>\n<p>That just goes to show that you need to check the\u00a0<em>whole row<\/em> of signals on whatever pins you&#8217;re using, otherwise you might miss something that&#8217;ll end up causing no end of headaches later on down the line.<\/p>\n<p>So for now my problem is solved with just a little bit of reading. At Digilent, we&#8217;re working hard to provide resources for new learners and experienced makers alike. We&#8217;re doing that the best way that we know how, by making neat things with our own products, and that means we frequently run into little stumbling blocks just like this one.<\/p>\n<div class='watch-action'><div class='watch-position align-left'><div class='action-like'><a class='lbg-style6 like-13563 jlk' data-task='like' data-post_id='13563' data-nonce='6d5ef3a62d' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Like' \/><span class='lc-13563 lc'>0<\/span><\/a><\/div><div class='action-unlike'><a class='unlbg-style6 unlike-13563 jlk' data-task='unlike' data-post_id='13563' data-nonce='6d5ef3a62d' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Unlike' \/><span class='unlc-13563 unlc'>0<\/span><\/a><\/div><\/div> <div class='status-13563 status align-left'>Be the 1st to vote.<\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p>Jay details a personal experience of trial and error with the DP32!<\/p>\n","protected":false},"author":21,"featured_media":13567,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[18],"tags":[],"ppma_author":[4472],"class_list":["post-13563","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-academia"],"jetpack_featured_media_url":"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/04\/DP32-Tuning-1.gif","jetpack_sharing_enabled":true,"authors":[{"term_id":4472,"user_id":21,"is_guest":0,"slug":"jayweeks","display_name":"Jay Weeks","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/c9032c373b20f91ecd2c2ebd3b378c3da3e5f6e50cf0d516941ba1dafaf29b73?s=96&d=mm&r=g","1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":"","9":"","10":""}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/13563","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/comments?post=13563"}],"version-history":[{"count":0,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/13563\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media\/13567"}],"wp:attachment":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media?parent=13563"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/categories?post=13563"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/tags?post=13563"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=13563"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}