i want to control servo motor and ultrasonic sensorsor using 8051................... i have a timer to control(555 timer) solenoid valve that control the air to opposite sides of a doble side cylinder.my conditions are when hacksaw placed and switch on measure the distance and take as 0...give the timer output to controller as input.. which the pulse given (by timer .the time of pulses are controlled by rheostat) to solenoid valve is connect to actuate backward movement the servo motor rotate 180 degree upward and downword complete 180 degree before receive other pulse from timer to actuate forward movement.......................when the switch on the display will show a message to enter value in mm.when this value is entered by two up and down switches and other swith is help to on the hack saw.every forward movement of hacksaw the ulrasonic sensor (ASCII) will measure the distance and it will convert to mm .when the input value and measurment value is equal, the servo motor receive a pulse and rotate 180 degree above and stop solenoid valve.....NB : after every forward motion the servo motor wil rotate 180 degree upward..and downward 180 before starting another forward stroke............................
PLZ HELP ME .ITS URGENT
