A Neuromorphic Approach for Brain-Machine Interface Using Spiking Neural Networks