Patent attributes
Provided is a program writing device that reliably performs an updating process of data by means of a control program or the like in a safe manner and without inconveniencing the owner of a vehicle or a driver using the vehicle. The program writing device is provided with a plurality of vehicle-mounted control devices, which control the operation of apparatuses mounted in the vehicle by means of control programs, and a relay device that receives updated program data including an updated program, updated data, or the like for the vehicle-mounted devices and transmitted from an external center, and stores the result in memory, the vehicle-mounted control devices and relay device being connected via a vehicle-mounted network, wherein the relay device is provided with a battery voltage checking circuit, an unloaded and a load-connected battery voltage check are performed by the battery voltage check circuit before writing the updated program or updated data to the vehicle-mounted control devices, and writing is executed when the battery voltage when unloaded is at least a first reference voltage or when connected to a load is at least a second reference voltage, and in other cases writing is not executed.