PURPOSE: To diagnose a ROM, a RAM, and busses easily and quickly, by adding a self-diagnostic function to a control device.
CONSTITUTION: A microprocessor discriminates the state of diagnostic selecting switches S1 and S2 and is branched to ROM and RAM diagnostic programs to diagnose a ROM and RAM. In the ROM diagnostic program, a prescribed accumulator is cleared, and data of the ROM are read out in order of address, and exclusive OR between these data and contents of the accumulator is operated, and the result is inputted to the accumulator. At the completion time of the operation for the check code of the last address, it is discriminated whether the ROM 6 is normal or not. In the RAM diagnostic program, numeric values increased successively by 1 are written to addresses of the RAM in order, and these data are read out successively to discriminate whether the RAM is normal or not.