Microcontroller was giving proper 5V and 0V levels at HIGH and LOW logic levels. But still the ULN2803 drivers were not getting turned ON. So what i did was i put 10K ohm resitor pull ups for the 89s52 ports and the motor started working. May be the microcontroller was unable to supply the necessary current required to drive the base of the ULN2803 transistor drivers