I have 2003 Mazda 6. ECM problems

I have a 2003 Mazda 6 with the 4 cylinder engine.... The check engine light is on and engine idles very rough..... A mechanic told me there is an issue with ECM... My question is what's involved with swapping out the computer? Could I get one from a salvage yard and swap it out and if so do you have to have it programmed to the car or can you just plug it in and go.... The car has 176000 miles and has run great up until now and hate to scrap it..... any info would be appreciated....
Tagged:
0
Answers
If not, then there is no firm basis for replacing the ECM. Even with codes indicating ECM issues, it could be a wiring harness or connector issue as well.
Post the codes if you have them.
Also you may want to consult THIS WEBSITE, which lists especially well-trained technicians who have the skills and experience to deal with complex electrical issues. Just click on "repair shops" to see if there is someone in your area.
http://www.iatn.net/