Hallo Fennias,

40 kHz kann man doch erreichen:

16 Bit Timer
Prescale 1
Counter 347

Oder?

Gruß Dirk