Home > other > C51 great god give advice or comments
C51 great god give advice or comments
Time:10-11
I need to use single chip microcomputer through two different pins to output square wave, want to ask next if I use two timer control square wave, how to use the external interrupt 0 to change the two square wave frequency
CodePudding user response:
If two square wave frequency, the original poster can be in in external interrupt 0 keys, define a variable record button press the number of times, according to the number of keys two same frequency square wave output, if not the same, the original poster two variables (initial values are equal), when the button pressed, one to do addition, a do subtraction, and then according to the variable values of two different frequency square wave output,