Closed-loop protocols are becoming increasingly widespread in modern day electrophysiology. We present a simple, versatile and inexpensive way to perform complex electrophysiological protocols in cortical pyramidal neurons in vitro, using a desktop computer and a digital acquisition board.