P0505- If you have a 95-96 model, there were issues with the diode located behind the right side of the center dash console, causing a reverse in polarity of the IACV power source. Fix was to replace the diode subharness assy. (P/N: 24168-4B000) and the IACV(P/N: 16188-1M210). For more info, refer Nissan TSB #NTB97-008. If you have a 97-98 model, most likely cause is a faulty IACV. Harness inspection should be made and if it checks out okay, replace the valve with P/N: 16188-3M205. Adjust base idle per FSM procedure. For more info, refer Nissan TSB# NTB98-039.
P0500- It could be a faulty vehicle speed sensor or worn speedo pinion plastic gear, located on the transaxle, but a common cause it the speedometer head unit in the instrument cluster. There are threaded inserts on the back of the head used to attach the head unit to the back of the cluster, as well as create the contact to the printed circuit. Small cracks can develope and cause an intermittant poor circuit, causing the P0500 DTC. This can be difficult to diagnose due to the intermittant nature and this is a problem that occurs on several mid-90's Nissan models. Fix is to replace the speedometer head unit.