Patent ID: 7991982
Filing Date: 2011-08-02
Classification: G06F

Abstract:
1. A microcomputer that can process plural tasks time-divisionally and in parallel, at least one of these tasks being a specific task in which a program looped so that an increment of instruction addresses is fixed is described, wherein one of the plural programs is described as a looped specific task in which the increment of program addresses is fixed, a program counter is usable as a timer counter, a peripheral function instruction for executing a peripheral function by one instruction is described in the specific task, the peripheral function instruction is set so as to indicate one or more general-purpose registers as an operand, the CPU is designed so that the peripheral function instruction can be executed as one instruction, achieves information needed to execute the instruction concerned by a general-purpose register and stores information concerning an execution result of the instruction concerned into the general-purpose registers, wherein when executing an input capture instruction as the peripheral function instruction, the CPU achieves edge indicating information of the input terminal as a condition for achieving a timer value from the general-purpose register, stores the previously sampled level of the input terminal and the present level of the input terminal into the general-purpose register, achieves a timer counter value when it is judged on the basis of the previous and present states of the input terminal that the achieved condition is satisfied, and stores the timer counter value as a capture value into the general-purpose register.