Hello I will help you with your question,
To reflash a GM computer you will need a J2534 reprogramming device or a Tech2 scantool and computer access to GM's website Tis2WEB which is a subscription service.
This setup allows you to put the latest calibration into the PCM
If you are looking to "Tune" the PCM with power curves and timing changes an aftermarket program and programming device will be required.
Either way this is expensive for a one time use.
Let me know what you want to do and I will do my best to help you with this
I need to know what you what to have done, why do you want to program the computer?
I doubt that the computer needs to be replaced or reprogrammed it sounds like it is doing its job. There can be many causes for a code to set so while you replaced the sensor the sensor may not have been the issue. I have seen a lot of catalytic converters on this truck that melted and clogged so the exhaust backed up causing the engine to run rough or die which will set a MAF code.
Unless you can see the data from the computer on your scanner you are stuck replacing parts as codes set until you hit on the right part or parts. Or you can have the problem diagnosed for about 1 hour labor to find which part has failed.
You may have a clogged cat, a wiring issue with the MAF a blown fuse that supplies voltage to the MAF or other issue that has not been found yet.
Sorry but you do not need to reprogram the computer
All that says is that the MAF is doing its job but is a good indication that the cats are not clogged. You may have a wiring issue.
What engine size?
Do you have any test equipment besides the scanner?
Does the scanner read data or does it just do codes?
Without at least a voltmeter it is impossible to find out if the MAF code is real or not.
Do you still have a transmission issue that Cam was helping you with??
OK that is a start, unplug the MAF and turn the key on and see what the voltage is between the pink and black/white wire is at the MAF connector, if you have no voltage check the ENG1 fuse in the underhood fuse block.
There should be battery voltage,
If you had transmission problems aling with the engine issues with this truck pull the PCM from under the airbox and remove the batery cable, ten remove the connectors from the PCM and inspect them for corrosion and water.
Ok then you need to plug it in and go to the computer then find the yellow wire in pin 31 of connector 2. Use a pin to slide along the wire to make contact in the connector with the connector plugged into the PCM and use your meter to see if you have about 1 - 2 volts with the key on/engine off
While you are there inspect the PCM connectors for water and corrosion
Connector 2 is the red connector, look for the yellow wire about 10 in from the end with the black/white wire on the end
OK then the MAF is working correctly but you still don't know if the computer is seeing the voltage, if I had this the next step would be to use a scantool to look at the data in the computer and see if the same 2.92 volts was displayed.
You say the code will not clear?
No corrosion or water in the connector?
Ok if the code resets after the engine stumbles or dies it may be a real code.
Try just letting it idle with the maf plugged in. If the code resets with no throttle input I am with you on replacing the computer but I sure would get a scantool on this that I could see data before I would do that if this were my truck.
This will idle long enough with the MAF plugged in to try this?
You may have a poor ground that is causing the power to the MAF to drop out and the gauge to jump around but most often the ground at the pump and the pump connector are the cause of this.
With the poor record of fuel pumps in these trucks you may have a fuel pump failing as well.
The MAF code did not reset?
Good there is nothing wrong with the MAF or the computer.
How long since you gave this a complete tune up?
Plugs, wires, cap rotor, clean the throttle body?
You will need to get a fuel pressure gauge with the symptoms of a fuel pump failing so that you can check the fuel pressure.
Sorry about the distributor, its a long day and I have a 4.3 on another line
I am not clear on the code setting, above you said it was P0300 (multiple missfire) after idleing?
You will always set a P0102 if you unplug the MAF, that indicates the computer is working properly.
You will get a P0102 when you unplug the MAF as you reduced the signal to zero volts.
The engine idles smooth because the computer no longer relies on the MAF input and reverts to preprogrammed values to operate the engine at idle. This is part of a fail safe program that allows operation even if a main sensor fails.
You will not be able to accelerate as the computer has no idea of how much air is going into the enginne, it only has the best guess of the engineers that wrote the program.
The engine runs rough when the MAF is connected because you have a vacuum leak that allows unmetered air into the engine or there is not enough fuel being injected to match the air that is being drawn into the engine and the P0300 sets because the engine is in a lean miss condition.
This is why I said you need a fuel pressure gauge to check the fuel pressure. Your comment that the fuel gauge is erratic leads to my suspicion that the fuel pump may be failing or the voltage to the pump is low.
The fuel pressure needs to be checked with the MAF plugged in and the voltage at the pump connector needs to be checked.
I don't know how else to say this but your next step is to check the fuel pressure and look for unwanted air in the engine.
Ok the pressure should be 60 psi with the key on/engine off and while running should maintain at least 55 psi. After the key is off the pressure should remain above 40 psi for 15 minutes after turning the pump off.
The fuel pressure test port is on the crossover pipe between the fuel rails.
I will watch for your post tomorrow when you get a chance to check this