First thing you need to do is draw up a schematic of what your attempting to do. Even better yet again would also include a block diagram and software flow chart. This way you make your intentions clear to yourself and anyone else trying to help you. 16f873A is quite possibly not the best to cut your teeth on. Go for a 16f628a to begin with.