Hi Regni,
I think I understand what you are asking.
If you do not want to use an external debounce circuit, it can be done in software.
You could use either an analog input or a digital.
In either case you will want to emulate what would be happening in a hardware de-bounce ckt.
You should first convince yourself about how the switch works. Examples are How fast will switch be switched?
How long does the bouncing continue, etc.
In your code you will then have to watch the incoming switch signal and determine if the bouncing is done and what state it ended up setling in. For this, I would look for some number of contiguous samples to be in one state or the other. When the code detects that the required number of samples are the same, THEN I would call
that done bouncing and read the value.
Another way of handling this, would be to use the hardware filters on the board. If so equiped, you may be able to configure the input for a low pass filter, where the cut-off freq. is lower than your bounce freq.
This may get you started, Are we getting close yet?
Ben