A novel embedded system for direct, programmable stimulation of the peripheral neural system