The effects of two drugs having opposite effects on the central nervous system were investigated using a newly developed visual vigilance task. Twenty-four male volunteers (median age = 20) performed the task on three separate occasions; after consuming placebo, caffeine (200 mg), or diphenhydramine (25 mg), in a double-blind, Latin Square design. At least 2 days intervened between drug administrations. Caffeine use was restricted for 10 h and smoking for 3 h before drug administration. When compared with placebo, caffeine significantly increased the number of correct responses and decreased response times, whereas diphenhydramine decreased the number of correct responses and increased response times. Low habitual consumers of caffeine (< 100 mg/day) and non-smokers had more correct responses than did high habitual caffeine consumers (> 100 mg/day) and smokers, but only in the placebo condition. Non-smokers had faster response times than smokers only in the placebo condition. Both caffeine and diphenhydramine altered certain aspects of mood.