A Miniaturized Neurostimulator And Recorder With Dynamic Stimulation Capabilities