try setup timer1 values for the time you need
you can calculate time from your 40Khz = 0.025ms
T = 1/F
btw if you DONT put your buttons into the DO - LOOP it wil never use them
↧