Programmable Synaptic Chip for Electronic Neural Networks