To provide a coin processing device of an automatic vending machine which makes it possible to grasp details of an operation state up to trouble occurrence without any large increase in cost.
Each time the coin processing device operates, an operation code writing means 1 stores codes of the previously coded operation and state of equipment in a memory 2 whose storage contents are destroyed once powered off. When a trouble detecting means 3 detects a specific phenomenon such as trouble, a trouble contents code writing means 4 and an equipment state code writing means 5 write codes of the contents of the trouble and the equipment state to the memory 2, and then a code backup means 6 backs up those codes which are enumerated to a nonvolatile memory 7. The enumerated codes which are backed up can be outputted by a code output means 8. Consequently, the equipment operation up to the occurrence of the specified phenomenon can be grasped.