Introduction - If you have any usage issues, please Google them yourself
This routine for simple frequency divider. Before experiment, please use platoon line (dupont line) will TX- 1 c ^ 0 learning plate P1 of the pin and P3 ^ 2 (INT0) pin connected. Because P1 ^ 0 used to simulate the outside world wave input, it provides cycle for 100 ms square wave, and T1 pin connected, T1 can carry on the cycle count. The procedure in the variable pp determines the scale coefficient, the value multiplied by 2 is the crossover factor. To change its value can get corresponding crossover output waveform (square). P1 ^ 1 as output pin, its connection oscillograph can see points after the frequency of the wave.