What could cause a ticking that doesnt go away? on 2000 Mazda Protege

Just recently bought a Mazda Protege with 158000kms on it. I noticed that there was a ticking sound coming from the engine and my check engine light had come on. The speed of the ticking increases as I accelerate but remains even after the car is back in idle. I figured it may just need oil/oil change, but was wondering if there are any other possible causes.

Get Your Car Fixed at a RepairPal Certified Shop.
We certify shops based on expertise, quality work, and verified customer reviews
1 answer
sounds like cam issues or valve adj. this needs to be looked at to determine damage. scan codes and post them