this code was written with mikro c for led chaser to light up leds one by one in forward direction and then backwards using pic16f877.it compiles well in the compiler but when i simulated it in proteus the leds are not lit as expected,random leds are lit instead.so what could be the reason for that?please someone explain me the mistakes in it.
1) There are code tags for a reason. Surround your code with code tags to keep the formatting. It's very difficult to read without the proper spacing:
2) You need to tell us what problems you're running into. If something isn't correct, the compiler will tell you where the error is, and generally tell you what it is. What does it say when you compile it?
3) You need to tell us what you've already tried to fix the problem.
4) You need to tell us exactly what you expect it to do. There are many types of LED chasers, so you need to be more specific.
If you expect help, you need to give us more information first. Help us help you.