I found this while looking for a fix for your problem. It may or may not help.
The popular Honda Civic and Accord vehicles share many powertrain components, including engines and transmissions. While these shared parts help reduce vehicle up-front costs, shared parts can also mean shared problems.
The P0505 error code is one of the problems that the Accord and Civic share – and it’s a relatively common problems too. P0505 indicates that the Idle Air Control Valve IACV is not operating correctly.
If your Accord or Civic has a P0505 code, there are three likely causes:
1.The IACV-AAC valve harness is open and allowing moisture inside
2.The IACV has a poor electrical connection, or
3.The idle air control valve itself is faulty
Other Honda models that can sometimes have this issue include the Odyssey minivan and the Honda Pilot, both of which have technical service bulletins (TBBs) listed for them that any repair shop can access for more details.
For the driver, a P0505 code will usually mean that the engine becomes hard to start, runs roughly, or idles erratically. The engine may also shut off (choke out or stall) at stop lights after being driven to temperature (e.g. only after the vehicle has “warmed up”).
The IACV controls the engine’s idle speed at a specific level. When the engine is cold, the car will idle at a higher speed so that the engine can warm up as quickly as possible. This way, emissions control systems can reach optimum operating temperatures as fast as possible. The IACV manipulates the idle speed by controlling the amount of auxiliary air that enters the engine from the bypass passage…more air means faster idle.
If the IACV isn’t working correctly, the engine can be starved of oxygen…this causes the symptoms (rough idle, stalling, etc.) described above. Often times a short-circuit is the cause of an IACV problem, so it’s a good idea to check the wiring harness first when diagnosing the problem.
Occasionally, the valve itself may be blocked or stuck and require replacement. Whatever the issue, a simple diagnostic of the wiring harness and circuit is usually all that’s required to locate the problem.