http://www.hondata.com/techidle.html
How the idle speed is controlled
The idle speed is controlled by three methods:
The cold idle value, which is located under the throttle plate. Late model engines may not have the cold idle valve. The valve consists of a air channel bypassing the throttle plate which is blocked once coolant heats up a wax element. When the engine is cold the cold idle valve will allow a lot of air to bypass the throttle plate, and the idle will be around 2000 rpm. As the coolant warms up the cold idle valve will slowly close, bringing the idle speed down.
The idle air control valve (IAC or EACV), which is located on the back of the intake manifold. The IAC valve is a solenoid which is controlled by the ECU using pulse width modulation. Thus the ECU can control how far the solenoid is open and how much air bypasses the throttle plate. There are limits, both upper and lower, to the amount of air which passes through the valve because the solenoid will only work from 20% to 80% duty cycle.
The throttle air bypass screw, which is located in the top of the throttle body. Unscrewing this will allow more air to bypass the throttle plate, and so will increase the idle speed. The purpose of the bypass screw is to adjust the amount of air going pass the throttle plate so that the IAC valve duty cycle is within the limits of what the ECU can control. The manual tells you how to adjust this screw by unplugging the IAC valve.
TPS adjustment
The TPS tells the ECU what position the throttle is in. The TPS should read 0.45V when the throttle is released. It is critical that the TPS is adjusted correctly so that the ECU knows when the throttle is released, which tells the ECU that the engine is either idling, or the throttle is closed under load and the injectors should be switch off the save fuel (fuel over-run cutoff). Swapping ECUs that have different internal power supply characteristics can change the TPS voltage a small amount - in some cases enough to put it above 0,5V.
If the TPS is set negative (below 0.45V at idle) when you open the throttle slightly the ECU will think the throttle is not open, apply the fuel over-run routines and cut fuel at 1400 or 1800 rpm. This will often cause the revs to cycle between about 800 and 1800 rpm. Also the car will be jerky when driving around at low speed.
If the TPS is set positive (over 0.45V) then the fuel over-run routines won't work, and also the ECU will not run the correct idle routines to keep the idle steady. It's better to have the TPS adjusted slightly negative, but setting it to 0% if fairly easy with datalogging. Otherwise aim for 0.45V.
Effect of mixture and timing
Normally at idle the ECU will run in closed loop, so the mixture will vary around 14.7:1 Running in open loop and enriching the mixture to about 14:1 increases the idle speed.
The stock setting is slightly retarded at idle. Adding 3-4 degrees ignition advance to something like 20 degrees in the idle portion of the ignition tables increases the idle speed.
Idle problems and oscillation
Idle control valve characteristics vary between intake manifolds. When the ECU is swapped, it expects an idle control valve of similar characteristics. If it is different, more or less air can pass leading to a very low idle or oscillating idle.
The ECU has a 'target idle speed', which varies with coolant temperature and electrical load. When fully warm the target idle speed is 700 or 750 rpm. If the engine speed is different from the target idle the ECU will alter the duty cycle of the IAC valve to compensate. A combination of a duty cycle lookup table, the current duty cycle and the difference in idle speed is used to calculated the duty cycle for the IAC valve.
This is a closed feedback loop, and is dependent on the characteristics of the engine matching what the ECU has been programmed to expect. If any of the components in the feedback loop, or a combination of components are different from what the ECU expects, then the feedback loop falls apart and the idle will often oscillate. Don't confuse this with the oscillation which can happen if the TPS is out of adjustment and the over-run cutoff is operating. The idle oscillation is a good example of a lorenz attractor in non linear dynamics if anyone is interested is chaos.
For an example consider that the engine is idling at 750 rpm by using a duty cycle of 25% for the IAC valve. The engine speed drops to 725 rpm, the ECU calculates the difference of 25 rpm and calculates a new duty cycle. The tables in the ECU tell it that when the IAC is at 25% duty cycle and the idle is 25 rpm low, use 30% as the new duty cycle. This valve has been set by Honda as the correct duty cycle for the stock engine, and will return the idle speed to 750 rpm for a standard engine. If the engine has been modified it might be possible that the IAC duty cycle needs to be 50% in order to increase the idle speed again. Because the IAC duty cycle is too low, the idle speed drops, and eventually the ECU will give the engine a shot of fuel and open the IAC right up so that the engine does not stall. This will raise the engine speed to 1000 rpm or so, and the cycle continues.
The solution is to alter the behaviour of the idle speed components so the system is stable again. Usually adjusting the TPS, idle bypass valve, mixture and ignition will cure an unstable idle.