'ROUTINES TO CONTROL THE TWO H-BRIDGES ON THE TFS-2 BOARD 'JIM FORKIN JUNE 2003 TFS-2 DUAL MOTOR CONTROLLER BOARD '**************************************************************** 'The following routines may be called to control the two h-bridges on 'the TFS-2 controller to produce the conditions indicated in each header 'motors will continue to run until motor1stop or motor2stop are called 'in other words, to turn off motors, reverse outputs on those transistors 'that are set to an on condition '**************************************************************** clockwise1: 'makes motor1 rotate clockwise cw: LOW 14 'set t2 off HIGH 13 'set t3 off [inverse logic] HIGH 12 'set t4 on LOW 15 'set t1 on [inverse logic] RETURN '**************************************************************** mtrcw1stop: 'stops motor1 from turning when in clockwise movement LOW 12 HIGH 15 RETURN '**************************************************************** countercw1: 'makes motor1 rotate countercw HIGH 15 'set t1 off [inverse logic] LOW 12 'set t4 off LOW 13 'set t3 on [inverse logic] HIGH 14 'set t2 on RETURN '**************************************************************** mtrccw1stop: 'stops motor1 from turning when in counter clockwise movement LOW 14 HIGH 13 RETURN '**************************************************************** clockwise2: 'makes motor2 rotate clockwise cw: LOW 10 'set t6 off HIGH 9 'set t7 off [inverse logic] HIGH 8 'set t8 on LOW 11 'set t5 on [inverse logic] RETURN '**************************************************************** mtrcw2stop: 'stops motor2 from turning when in clockwise movement LOW 8 HIGH 11 RETURN '**************************************************************** countercw2: 'makes motor2 rotate countercw HIGH 11 'set t5 off [inverse logic] LOW 8 'set t8 off LOW 9 'set t7 on [inverse logic] HIGH 10 'set t6 on RETURN '**************************************************************** mtrccw2stop: 'stops motor2 from turning when in counter clockwise movement LOW 10 HIGH 9 RETURN '****************************************************************