Hi,
As you mentioned that after you press a button then the current goes down. You have also found out that it is the buzzer that is drawing the current. So when you are starting up your PIC if the port is set to an output you expect a low. If that was true then with the other end connected to VSS rules out any possibilities of drawing current. So the port is not low as expected. This is what I meant. You should always setup the initial states of the port yourself. The capacitor is acting as a DC blocking only and thus even if your port is high at startup it prevent current draw from the PIC. An interesting phenomena could be excessive switching noise at the PIC port (which starts as a input by default ), your buzzer can actually create signal if it is vibrated. Connect your scope to its ends and tap it to see for yourself. But that will not cause so much of current drain due to the internal CMOS structure switching with noise. So I still doubt what is the state of the pin when first start it up. 16F88 has got onboard peripherals which are connected to the same pin. Hope I have made myself clear this time.
Bookmarks