Hier hat mal jemand einen Code und eine Schaltung reingestellt:
http://bascom-forum.de/index.php/topic,2012.0.html
Ich hoffe das hilft dir weiter.

Gruß

Neutro