PROBLEM TO BE SOLVED: To prevent the occurrence of both overflow and underflow errors while keeping the least overhead that is needed for the interrupt processing by producing an interrupt to a CPU when the number of data stored in an input or output buffer exceeds a threshold value and adjusting automatically the threshold value according to the number of data. SOLUTION: A threshold detection circuit 2 detects that the number of data stored in an input FIFO (fast in fail out) buffer 3 or an output FIFO buffer 4 exceeded the threshold value. An interrupt circuit 5 produces an interrupt signal by the output of the circuit 2. A latency monitoring circuit 1 monitors the changed variable of the number of data which are stored in a period when an interrupt is produced by the circuit 5 and then the data of both buffers 3 and 4 are processed by the interrupt processing. Then.the threshold value detected by the circuit 2 is varied by the output of the circuit 1.