{"id":52,"date":"2008-05-18T23:03:27","date_gmt":"2008-05-19T03:03:27","guid":{"rendered":"http:\/\/nuxx.net\/blog\/?p=52"},"modified":"2008-05-19T09:39:38","modified_gmt":"2008-05-19T13:39:38","slug":"playing-with-the-pic12f629","status":"publish","type":"post","link":"https:\/\/nuxx.net\/blog\/2008\/05\/18\/playing-with-the-pic12f629\/","title":{"rendered":"Playing with the PIC12F629"},"content":{"rendered":"<p>Tonight I did some more digging into the <a href=\"https:\/\/nuxx.net\/blog\/2008\/05\/16\/p3-v15-midi-sync-issue\/\">problems I&#8217;ve been having getting the MIDI sync working in Ivan&#8217;s P3<\/a>. I had been sent some new firmware to try, and while that (in the disassembler) appears to deal with the right pins (<tt>GP0<\/tt> as output, <tt>GP5:GP4<\/tt> as input), it didn&#8217;t work. Tonight I did a good bit more digging and eventually ended up writing <a href=\"https:\/\/nuxx.net\/files\/synctest1.pbas.txt\">this program<\/a> as a test.<\/p>\n<p>Based on my understanding of how the PIC in the P3 with v1.5 PCB works, this program does the following: <tt>GP0<\/tt> is set to low, then whenever <tt>GP4<\/tt> changes state <tt>GP0<\/tt> is changed as well, but only if <tt>GP5<\/tt> is high. The end result is that on the output pin of the PIC, which connects through to the SYNC output, I basically see a mirror of the inputted sync signal whenever the sequencer is running.<\/p>\n<p>I don&#8217;t think that it would be a huge stretch to write my own version of the software that is supposed to be in this PIC, but I haven&#8217;t gone that far. As far as I&#8217;m aware all I&#8217;d need to do is have each sync pulse received cause a MIDI Clock message to be sent out of <tt>GP0<\/tt>, and whenever <tt>GP5<\/tt> goes high or low send a respective MIDI Start or Stop. That said, this P3 should really be running its official software, not my replacement stuff.<\/p>\n<p>Hopefully I&#8217;ll receive some new firmware for it soon, and hopefully that firmware will do what it needs to. If I&#8217;m bored enough tonight maybe I&#8217;ll try and follow the flow through the entire program in the disassembler and figure out where it&#8217;s going wrong.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tonight I did some more digging into the problems I&#8217;ve been having getting the MIDI sync working in Ivan&#8217;s P3. I had been sent some&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/nuxx.net\/blog\/2008\/05\/18\/playing-with-the-pic12f629\/\">Continue reading<span class=\"screen-reader-text\">Playing with the PIC12F629<\/span><\/a><\/div>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,11],"tags":[],"class_list":["post-52","post","type-post","status-publish","format-standard","hentry","category-electronics","category-making-things","entry"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/posts\/52","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/comments?post=52"}],"version-history":[{"count":0,"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/posts\/52\/revisions"}],"wp:attachment":[{"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/media?parent=52"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/categories?post=52"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nuxx.net\/blog\/wp-json\/wp\/v2\/tags?post=52"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}