Hello all.
I have been playing with the idea of creating a simple arcade game (Mame) controller using a PicAxe chip. I have created a 'breadboard version' prototype with 4 buttons which worked OK while testing a couple of games. The code is mainly a loop which scans the input pins for changes. In the complete version, I'm thinking of using 8 pins for input and since some games require fast moves I'm trying to figure out a way to benchmark my code while trying to achieve a faster scan speed.
Is there a way to measure the speed of execution of the code? I do understand that running the PicAxe at 32MHz and modifying the inputattach code to support 4800bps serial connection I might get some good results but I would like to be sure for the speed results during the code tuning procedure.
For anyone interested, using the information from this link and the Linux inputattach utility I was able to emulate a PS/2 keyboard over a 1200bps serial connection.
I have been playing with the idea of creating a simple arcade game (Mame) controller using a PicAxe chip. I have created a 'breadboard version' prototype with 4 buttons which worked OK while testing a couple of games. The code is mainly a loop which scans the input pins for changes. In the complete version, I'm thinking of using 8 pins for input and since some games require fast moves I'm trying to figure out a way to benchmark my code while trying to achieve a faster scan speed.
Is there a way to measure the speed of execution of the code? I do understand that running the PicAxe at 32MHz and modifying the inputattach code to support 4800bps serial connection I might get some good results but I would like to be sure for the speed results during the code tuning procedure.
For anyone interested, using the information from this link and the Linux inputattach utility I was able to emulate a PS/2 keyboard over a 1200bps serial connection.