Fixed pointer to periodic timer.  Added mega detection for SPI config.