In a controller for an electric power steering apparatus, a target value
calculation element, which calculates target values of the drive currents
of a motor on the basis of a detected value of the steering torque, is
constituted by a first integrated circuit provided in a chip. A drive
signal value calculation element, which calculates drive signal values
for driving the motor on the basis of the target values calculated by the
target value calculation element, detected values of the drive currents
of the motor, and a detected value of the rotary position of a rotor of
the motor, is constituted by a second integrated circuit provided in
another chip from the chip. A driving element drives the motor in
accordance with the drive signal values. The first integrated circuit is
connected communicably to the second integrated circuit. The calculation
cycle of the drive signal values is set to be shorter than the
calculation cycle of the target values.