Miniaturized brain-machine interface processes neural signals in real time