infrared serial communication


i would like to let two arduinos communicate via infrared. they should check if they see each other and transmit some information.

is it possible to create a simple infrarred serial (digital port 1/2) communication?

another way is to create a connection via ir emitters and receivers ( therefore i have to create a 36khz pwm pulse for the emitter led. how do i get exactly that frequency via analogWrite()?