Designed to outperform conventional computers when performing machine-learning tasks, neuromorphic computation is the principle whereby certain aspects of the human brain are replicated in hardware. While great progress has been made in this field in recent years, almost all input signals provided to neuromorphic processors are still designed for traditional (von Neumann) computer architectures. Here, we show that a simple photosensitive capacitor will inherently reproduce certain aspects of biological retinas. We found that capacitors based on metal halide perovskites will output a brief voltage spike in response to changes in incident light intensity, but output zero voltage under constant illumination. Such a sensor is not only optimized for use with spiking neuromorphic processors but also anticipated to have broad appeal from fields such as light detection and ranging, autonomous vehicles, facile recognition, navigation, and robotics.