They are now, at first the software guy mad a mistake, and we had to correct his TRIS's
Are you by any chance copying someone else's code and trying to get us to help you make it work on your own product?
You have started several awful threads about this problem, picking at straws and red herrings and it seems like your "software guy" has gone on sabbatical or has died.
We want RA1 and RA2 as analog inputs (ADC ). All the other pins we want as Digital I/O.
If you pay some guy to only configure your microcontroller, so you can program the rest, please give me a job. I'm available and can take 10 minutes to look at a datasheet.
If you really have a software guy, he needs to know the problem you are having. The actual data with the actual numbers and sample sizes and everything. The schematic, if you altered it. And like he needs to know what you want the product to do... not that you want interrupts or digital I/O. That's for him to figure out. Do you have the initial batch of prototypes, design files, and code that you guys OK'd when you ordered 1000 of them? Can you revert to whatever version worked? Surely this worked at some point before you ordered 1000 boards.
Why open different threads for the same problem? There were a lot of basic troubleshooting steps posted in the other thread, which you have apparently ignored. Debugging something like this is time-consuming. Skipping steps and making assumptions will just send you down never-ending rabbit holes. Progress is going to be slow, but if you do it systematically, at least you are moving in the right direction.
Is your software engineer incompetent? Well, unless you want to pay someone for a second opinion to review the source code, you might want to first make sure it's software and not hardware. If you're the guy "fixing" the software, please stop. Based on what you have posted, you are 1000x more likely to create a new bug than to fix the problem. This is not a knock on your coding skills. For you to be able to fix someone else's code, you will need to be more than just a competent coder. You will have to be better than good enough to have written this code, yourself. And you will need time, perhaps a lot of it, in order to systematically debug and proof the final code. Unless you're hoping to luck out and randomly hit on the right straw, which seems to describe your debugging process. If you think you can just look and guess without full understanding, you're probably going to be wrong. Even IF you are the guy that wrote the code, you are going to have to go thru each step if you value your time. (Short of an "oops, I forgot to do this" type of obvious mistake.) Trying to take shortcuts will usually get you nowhere. If you're not debugging systematically and documenting it as you go, you are not doing anything, at all.
Changing TRIS? Make a note of this. But until you resolve the primary issue, don't use this version for your debugging. There may be interdependencies you do not realize, yet. The one working board works with unaltered code, correct? Stick with this version for the debugging and add and test your other improvements, later.
Have you even sent this guy a sample of the production boards, yet? Or is he just an anonymous email address and paypal account?