Check engine light on 1990 Chevrolet Celebrity

Whenever my check engine light comes on the speedometer quits working and vice versa checked all the codes fixed all. Now light stays on all the time but the only code that flashes is 12.

Sounds like a possible vehicle speed sensor issue. This would affect speedometer operation and set a check engine light.

Have the sensor performance checked and then check the wiring at the sensor as well as the sensor itself.