To investigate the role of temporal coding in the neural processing of taste, trains of electrical pulses of varying frequency were delivered to the nucleus of the solitary tract (NTS) in awake rats. The temporal patterns of these trains mimicked the temporal patterns of electrophysiological responses of single neurons to natural tastes. In Experiment 1, water-deprived rats were first trained to lick water in an experimental chamber. On training days, licking water produced a sucroselike electrical pulse train in the NTS. At the end of these sessions, experimental animals were made ill by an injection of LiCl and subsequently learned to avoid licking when LiCl was paired with NTS stimulation. In Experiment 2, rats refused to lick water when licking produced a quininelike pattern of NTS stimulation but licked enthusiastically when licking produced a pattern of NTS stimulation similar to the natural response to sucrose.