Non-PWM code:

The latest tested PWM code (not totally up to date)

The latest version of the PWM code (corresponding to the non-PWM code above), untested.

All of these require an external 18.432 MHz oscillator, are set up for 57600 baud rate, and have code for auto-detecting the power line frequency. However, the PWM code as an older version of the auto-detection algorithm, and some people have had problems with that.