i have no idea why it won't work apart from that the .hex compiled file is corrupted and that you will need to debug it.
- Isolate the area of defect
- Search for any error
- Fix the error
YOU HAVE JUST DEBUGGED!
another way to do it is:
You should also consider bug prevention:
less code = less to debug
Keep your code short, simple, clean, and avoid "feature creep" like the plague.
Also, use functions so you can isolate different parts of your code. That way you can verify chunks of code as 'bug-less'.
Hope that helped, if not, tell me. Dan