Hi, I'm not sure these are related. The first is your throttle position sensor. This tells the engine how hard you are pushing on the accelerator. The second code is random misfire., which I've never seen caused by the TPS. That said, I would fix the TPS first. Check the wiring and connector for any issues. If the wiring looks good, I would replace it and calibrate the new sensor. If this doesn't clear up the code 300, please read my post on misfires for additional troubleshooting steps:
http://www.fixya.com/cars/r6715318-causes_gasoline_engine_misfires . These are generic instructions.
Trouble Code: P0123
TP Sensor Circuit High Input
Possible Causes:
TP Sensor sweep
TP Sensor ground circuit is open
TP Sensor signal circuit is open or is shorted to VREF (5v)
TP Sensor is damaged or has failed (an internal open circuit)
Possible intermittent condition
PCM has failed
Trouble Code: P0300
Multiple Cylinder Misfire Detected
Possible Causes:
Air leak in the intake manifold, or in the EGR or EVAP system
Base engine mechanical fault that affects two or more cylinders
Erratic or interrupted CKP or CMP Sensor signals
Fuel delivery component fault that affects two or more cylinders (i.e., a contaminated, dirty or sticking fuel injector)
Ignition system problem (coil or plug) in two or more cylinders
Vehicle driven with low fuel pressure or while very low on fuel
×