If it is only one coin, and the machine rejects all other coins of the wrong size (in the states, like putting a penny into a quarter slot, or anything other than what is desired), use an optical sensor. This way, there is no debounce. If you must determine the TYPE of coin, then it gets harder. I agree, use one PIC per machine. Maybe just one of the 8 pin devices, a Maxim chip for RS232.