1999 Nissan Frontier electrical problem?

I have a 1999 Nissan Frontier pickup and recently I was driving down the road and all the gauges and speedometer went dead and then returned to normal. It happened a couple of times and then quit. Any ideas?

There may be a problem with the ignition switch or in the power source to the dash.

Or the ground connection for the instrument panel.