siehe Hier mit einem AVR

https://www.roboternetz.de/phpBB2/viewtopic.php?t=21985