Schau dir mal in der Bascom Hilfe den Teil über Timer/Counter an