first of all thanks for replying. Actually i have experience in coding. The problem is i had written code in keil uvision to receive the text serially passed from pc using pointer. i can c text arriving through virtual terminal in proteus but my code doesnt respond to motor driving circuit . When i write simple c program to control motor it works properly in proteus but when i write code that receive the command and compares with either of commands to make motor in particular direction in proteus it doesntt work. can i call other functions except from main function or not in keil c? my intension was not to make u do my H.W.as i couldnt get this type of examplees anywhere else