TPS and IAT sensors too high?

I have a 97 Wrangler, intake 6 4.0 liter engine. While idling in park or neutral, the car stays at a normal 800-1000 RPMs, but while in gear (drive, reverse, 1, or 2), the RPMs drop to 400-500 RPMs and then goes up and down, sometimes causing it to stall. I ran a diagnostic check and got P0123 and... show more I have a 97 Wrangler, intake 6 4.0 liter engine. While idling in park or neutral, the car stays at a normal 800-1000 RPMs, but while in gear (drive, reverse, 1, or 2), the RPMs drop to 400-500 RPMs and then goes up and down, sometimes causing it to stall.

I ran a diagnostic check and got P0123 and P0113:

P0123: car's computer has detected that the TPS (throttle position sensor) is reporting too high a voltage.

P0113: intake air temperature sensor (IAT) circuit high voltage

I'm not sure what these mean and I was hoping I could get some ideas about how to fix it. Thank you.
Update: I do know what the TPS and IAT sensors are, as well as their location in my engine. The TPS in my engine was damaged while I was offroading, so I replaced it recently. The question that I was meaning to ask is how to adjust/fix the TPS and IAT sensors so that their readings are what they should be.
2 answers 2