speedometer stops working while driving.Then sometimes it will start working aga on 1991 Honda Accord

when I put brakes on, check engine light comes on. Sometimes at red light it will go up and down.

Asked by for the 1991 Honda Accord
scan codes and post so we can adv.