PS2 mouse arduino mega freeze?

Hi, today I discovered a ps2 mouse example here Arduino Playground - HomePage and decided to try it out. It work but only for a few seconds them my arduino mega would freeze or at least stop to the serial communication. I discover that I was connecting it wrong on digital 6 and 5 instead of analog pins 6 and 5. My question is why would it work on digital pins for only a few seconds?

Thanks in advance.