Address setting procedure - TheOnlyJoey/openjvs GitHub Wiki
When the JVS-I/O bus initializes, only the master node has an address (it implicitly has address 0). Of course, the other nodes need addresses too for successful communication. This page describes the procedure used to assign addresses to each node. It makes use of the special 'sense' line on the JVS I/O connector.
Wiring
JVS devices are daisy-chained: each device has a a port that goes in the direction of the master, and a port that can be used to connect another device to the bus. The sense lines aren't connected directly but pass through some special circuitry. [TODO: image] Each device also contains an active terminator connected to the data lines that can be turned on or off.
Procedure
When the bus is in the reset state, the final device in the daisy chain sees +5V on its sense input because of the pull-up connected to that line. Because of this, it turns on its bus terminator. Devices before it in the chain 'see' 2.5V on their sense input lines because of the diodes in series with their pull-ups (the transistor isn't turned on). The master sees this 2.5V in the same manner.
At this point, the master sends out a command packet with code 0xF1 (set address) to the special address 0xFF. This command informs the final node in the chain of its new address. It responds to this packet and activates the transistor bypassing its series diodes, producing 0V on the sense input of the previous device. This device now knows the device before it has acquired an address, and starts listening for the 0xF1 command. The master sends out a new address which the device accepts, and this cycle continues until the master itself detects 0V on the sense line, which indicates that all devices have acquired an address and the cycle is complete. If this does not occur before 31 addresses have been given out, an error condition is presumed on the bus.
[TODO: illustrate process graphically]