As with any electrical problem, first start by checking conductivity of the wiring from IAC motor connector to the PCM pinouts. From there, check the ohms accross the two internal IAC coils and make sure they are very similar (or one is burned out). Lastly, swap IAC's from another car to see if problem occurs or not, replace components as necessary.
One more note: I dont have my book in front of me, but if 505 (should be 4 digits, 5005 or 0505?) is a general fault, it could also mean you have a vacuum leak, not allowing the IAC to control minimum airflow and making it unable to lower engine speed down to idle speed. Just a thought if electrical checks out, and your idle appears to be too high.