how do you change the arduino frequency ? like you're saying you changed the frequency
By using a 20MHz crystal or resonator I expect...
I think you should mention the rest of it, since obviously , there is more to it than that.
You need to change the frequency in the board file.
What does the "16000000L" means in the above boards.txt file ?
And what does the "f" represent in this line ?
What's going to happen if you swap the crystal and don't change that value ?