If you're charged with a firearm offense in Pennsylvania, what you should do is to make sure that your rights and interests are protected and that you prepare the best possible defense. An experienced Pennsylvania criminal defense attorney will be able to best help you do so. You shouldn't speak to the police or other law enforcement at any point in the process, whether before you're charged or certainly after.
You should have an attorney in your corner from as early as possible in the process. They'll help make certain that any court proceedings go as smoothly and as favorably as possible. They'll be able to help strategize and prepare the best possible defense, whatever that may entail. Cross-examining the police officer, filing a motion to suppress evidence, the gun, for example. They'll be able to take various steps on your behalf to both protect your rights and interests and to defend as strongly as possible against the firearm charges. They should be involved as early as possible in the criminal process.