Hi all. serial communication is widely used nowadays. For ex: Controlling a DC motor , stepper motor, or anything from your PC. First thing you get in your mind is serial communication. While encountering serial communication. First thing you get after searching is RS232 and then MAX232. So i recommend you to study thoroughly about this. And one more thing i would like to suggest. First simulate before trying it in real time. If you ask any embedded programmer. He ll suggest you to use Proteus simulation software. So use that . i have done proteus simulation of this project.See here and you can do changes in code provided below https://hobbyprojec.blogspot.in/
code is attached
code is attached