摘要 |
The present invention relates to a method for automatically setting ID in a UART ring communication in which a master and a plurality of slaves are formed in a ring shaped network. The method comprises the following steps: an initializing step in which the master is initialized and the master ID is outputted; a slave ID setting step in which the slaves set each of their ID by adding a standard value to the master ID and the set IDs are outputted; a converting step in which the slaves convert each of their IDs after deciding if the received ID and their own ID are the same or not and the current highest value of the slave ID stored in the master is converted according to the ID values of the slaves; and an end determination step of ending ID setting based on the current highest value of the slave IDs or resetting the IDs of the slaves. |