In a programmable controller including a special unit, a special-purpose integrated circuit element can be readily utilized for multiple purposes to extend the range of applications to reduce a manufacture cost. A special unit (130) connected to a microprocessor for performing I/O control through a bus includes an integrated circuit element (10) having a logic circuit unit (1000n (n=0 to 7)) whose operation specifications are determined by a parameter memory. The logic circuit unit (1000n) includes a reversible counter used for both high-speed input processing and high-speed output processing as a main component, and is connected to I/O interface circuits (139X) (139Y) through a first port (11) and a second port (12). In addition, because the function of the logic circuit unit (1000n) is determined by a content of a special instruction in a sequential program, the logic circuit unit (1000n) is commonly used for various types of I/O interface circuits to allow the integrated circuit element to be used for multiple purposes.