摘要 |
PURPOSE:To prevent an endless loop from being generated by starting counting operation for a set time longer than the period of a synchronizing clock at the start of a subroutine and stopping the execution of the subroutine when the counting operation is completed during the execution of the subroutine. CONSTITUTION:A microcomputer can start inputting or outputting data only when the synchronizing clock is at high or low level. Then the subroutine for detecting the high or low level of the synchronizing clock is executed twice successively and when the specific high or low level is detected in each round of the subroutine, the data begins to be inputted or outputted. Further, the counting operation to be carried on for the set time longer than the period of the synchronizing clock is started at the start of the subroutine and if the counting operation ends during the execution of the subroutine, the execution of this subroutine is stopped. Consequently, the endless loop is prevented from being generated owing to the abnormal generation of the synchronizing clock. |