============================================================================== This directory contains the device entries for the Dual DC Motor Controller. HARDWARE The Dual H-Bridge controller independently controls the speed and direction of two brushed DC motors designated as '0' and '1'. The peripheral ties directly to the four switches for each of the two H-bridges. The H-bridge switches are designated as 'top' and 'bottom', and 'left' and 'right'. The outputs controlling the bottom switches are inverted. The power on defaults at the FPGA pins are all high, which turns on all the high side switches and turns off all of the low side switches. That is, the power on default is high side braking. The pins are assigned as follows: Pin 2: Top left, motor 0 (1==switch closed) Pin 4: Top right, motor 0 Pin 6: Inverted bottom left, motor 0 Pin 8: Inverted bottom right, motor 0 Pin 10: Top left, motor 1 Pin 12: Top right, motor 1 Pin 14: Inverted bottom left, motor 1 Pin 16: Inverted bottom right, motor 1 The motor speed signals are pulse width modulated (PWM) signals with a programmable duty cycle between 0 and 100 percent and a programmable PWM frequency. The driver tries to minimize the the time that both motors are being driven. That is, if both motors have a PWM speed of 50 percent, then the motors are not driven at the same time. DEVICE NODES The device interfaces to the dual H-bridge controller offer independent speed, direction, brake or coast mode for each of the two motors. The PWM frequency is common to both motors. .../mode0, .../mode1 The mode of operation for the motor. The mode is encoded as a two character sequence with the code assigned as follows: bh -- high side brake (power on default) bl -- low side brake co -- coast fh -- forward with high side PWM fl -- forward with low side PWM fb -- forward with both side PWM rh -- reverse with high side PWM rl -- reverse with low side PWM rb -- reverse with both side PWM la -- locked antiphase speed switching .../speed0, .../speed1 The PWM 'ON' time as a percentage in the range 0.0 percent to 100.0 percent. The speed resolution is 10 bits for a PWM frequency of 20 KHz and 8 bits for a PWM frequency of 78 KHz. .../PWMfrequency The frequency of the speed PWM signal in Hertz. The driver tries to assign a frequency as close as possible to the one specified. For example, a requested frequency of 12510 Hertz might result in an actual PWM frequency of 12500 Hertz. The PWM frequency is the same for both motors. .../slow_start0, .../slow_start1 The acceleration curve as a list of ten comma separated integers representing the time (in milliseconds) between each 10 percent increase from 0 to 100 percent ON time. For example, the following specifies a slow start that takes half a second to get to 50 percent power and three-quarters of a second to get from zero to full power: 100,100,100,100,100,50,50,50,50,50 The default value for slow_start is off to full power in zero milliseconds. That is, the default is to turn off slow start. .../slow_stop0, .../slow_stop1 The deceleration curve as a list of ten comma separated integers representing the time (in milliseconds) between each 10 percent decrease from 100 to 0 percent ON time. For example, the following specifies a slow stop that takes half a second to get to 50% power and three-quarters of a second to get from full power to zero: 100,100,100,100,100,50,50,50,50,50 The default value for slow_stop is full on to full off in zero milliseconds. That is, the default is to turn off slow stop. .../shootthroughtime The anti shoot through timer specifies the time that all H-bridge switches are forced off when switching directions. The time is specified in units of nanoseconds in the range of 0 to 750 nanoseconds in steps of 50 nanoseconds. The power on default is 250 nanoseconds. .../watchdog As a safety feature, the driver and FPGA hardware can turn both motors off if there is no speed or direction update from the controlling software within the specified time. The time is specified in milliseconds and has a maximum value of 1500 milliseconds. The resolution of the watchdog timer is 100 milliseconds, and a value of zero turns off the watchdog timer. The default value is 300 milliseconds.