For the P1284 you need to get interactive with a few circuit tests.
1. Monitor the voltage on the Dark Blue/Light Green (DB/LG) wire at the Injection Control Pressure (ICP) sensor. The voltage should be roughly 0.2v Key On Engine Off and will increase to at least 0.8v normally with the engine iddling.
2. Monitor the voltage at the sensor and also on the scanner while wiggling the wire harness and the connections right at the sensor. If the voltage starts changing when wiggling the wires at the connector, replace the connector with an updated part #3C3Z-12224-AA.
3. If the voltage out of the sensor is steady when wiggling the connections, but the voltage on the scanner never changes, locate and repair the bad connection between the ICP sensor and pin #87 of the Powertrain Control Module (PCM) connector (start with checking for problems at C138, which is a 42-terminal connector near the left side valve cover).
4. If the voltage at the sensor intermittently just drops out and is not related to a bad connection, verify that the Brown/White (BR/WH) wire maintains 5v and the Gray/Red (GY/RD) wire is a good ground. If OK, suspect a faulty ICP sensor.
For the P0231, I need to know if this truck has a bad fuel pump fuse (30amp MAXI fuse) or have you found it blown and replaced it?