The H bridges can have a sense resistor to measure the current passing through the bridge. The sense lines of all four bridges are tied together and are used to detect block occupancy and short circuit conditions. Two of the PIC inputs are used for this purpose. This leaves two I/O pins free which are used for debugging.
The block speed controller has 15 forward and 15 reverse speeds. It responds to the following commands.
Command Function --------- --------------------------------- 0100 0000 Poll(respond with 2 status bytes) 0010 00pp Increase speed of port pp by one step 0010 01pp Decrease speed of port pp by one step 0010 10pp Bring speed to zero on port pp 0010 11pp Emergency stop on port pp 0011 00pp Select port(followed by set speed command) 001d ssss Set speed to ssss in direction d 0010 0101 Emergency stop on all ports
On a poll command it returns the following two status bytes.
Response Function --------- ------------------------------------ 0010 pppp Bit pattern indicating short circuit 0011 pppp Bit pattern indicating occupancy.The controller puts out a variable duty cycle, constant frequency output rather than distributing the ons and offs. This eliminates the need for a speed shift register lookup table and may reduce the 'Do-Re-Mi' effect. The momentum profile will, for now, be handled by the host.
In future, the momentum profile may be stored in the controller itself reducing the burden on the host. The command set may even allow downloading a momentum profile. This may be done whenever a train enters a block. There is enough data EEPROM to handle this although programming time could be a problem.