Objective. Modern multielectrode array (MEA) systems can record the neuronal activity from thousands of electrodes, but their ability to provide spatio-temporal patterns of electrical stimulation is very limited. Furthermore, the stimulus-related artifacts significantly limit the ability to record the neuronal responses to the stimulation. To address these issues, we designed a multichannel integrated circuit for a patterned MEA-based electrical stimulation and evaluated its performance in experiments with isolated mouse and rat retina. Approach. The Stimchip includes 64 independent stimulation channels. Each channel comprises an internal digital-to-analogue converter that can be configured as a current or voltage source. The shape of the stimulation waveform is defined independently for each channel by the real-time data stream. In addition, each channel is equipped with circuitry for reduction of the stimulus artifact. Main results. Using a high-density MEA stimulation/recording system, we effectively stimulated individual retinal ganglion cells (RGCs) and recorded the neuronal responses with minimal distortion, even on the stimulating electrodes. We independently stimulated a population of RGCs in rat retina, and using a complex spatio-temporal pattern of electrical stimulation pulses, we replicated visually evoked spiking activity of a subset of these cells with high fidelity. Significance. Compared with current state-of-the-art MEA systems, the Stimchip is able to stimulate neuronal cells with much more complex sequences of electrical pulses and with significantly reduced artifacts. This opens up new possibilities for studies of neuronal responses to electrical stimulation, both in the context of neuroscience research and in the development of neuroprosthetic devices.