Respond time resolution problems with Arduino Due

Hi,

I recently started to work with Arduino Due.
I use Arduino to train mice with self version of the Skinner Box.

The box contain 3 ports (left,middle,right) with photo-sensors which detect when the mouse insert its nose to one of the ports.

When the mouse inserts his nose to the middle port, a sound is played, and the mouse should break out from the middle port and go to one of the lateral ports.

The time interval between the sound onset and the mouse break from the port is very important for the experiment.

When I used Arduino mega, I got break times of around 200 milliseconds. However, when I apply the (exact) same code with the boxes controlled by Arduino due, It cant capture this time bins. it either gives 0 break time, or time intervals above 500 ms.

In other words, the break time measurements resolution is not good enough.

Does anyone have an idea why this is happening and how to fix it?

Thanks a lot

A light beam break should be detected within microseconds by either processor, but you forgot to post any useful information.

Please read and follow the directions in the "How to use this forum" post. (mod edit for link)

Post your code (between code tags).