I changed the knock sensor about a week ago. I had to take off the manifold, the injectors and the throttle body in order to get at the sensor. After I put everything back together the engine revs very high at idle. It idles at 2000rpm when cold and 1500rpm when warm. My first suspicion was an air leak due to the manifold or throttle body not sealed correctly. Rather than strip everything down again I decided to do an ecu error check.
The ecu gave me an error code of 32, which is the vacuum sensor.
After CJ kindly offered to help I decided to double check the ecu code before bothering him unnessasarily. But this time I disconnected the battery for a minute or so to clear out any old error codes. After doing this the ecu reported no errors. I must have disturbed the sensor while working on the car and the ecu just stored the code.
So all that leads me back to my original suspicion, an air leak. I'm going to strip it all down again over the weekend and check all seals and gaskets.
On a lighter note, after I replaced the knock sensor the Mivec started working and for the first time since I got the car I got to experiance the wonder of Mivec.
