Understanding how the brain controls behavior requires observing and manipulating neural activity in awake behaving animals. Neuronal firing is timed at millisecond precision. Therefore, to decipher temporal coding, it is necessary to monitor and control animal behavior at the same level of temporal accuracy. However, commonly available processors are not designed for this task and it is challenging to deliver sensory stimuli and reinforcers as well as to read the behavioral responses they elicit with millisecond precision. We present here a set of tools that offer affordable solutions to achieve these goals, including a physical environment to train head-fixed animals, means of providing calibrated sound stimuli and technical details of delivering sensory cues, fluid reward and air puff punishment with measured latencies. Combined with electrophysiology and optogenetic manipulations, the millisecond timing accuracy will help interpret temporally precise neural signals and behavioral changes. Additionally, since software and hardware provided here can be readily customized to achieve a large variety of paradigms, these solutions enable an unusually flexible design of rodent behavioral experiments.