12f629 square wavw generator
If the only job of the MCU is to generate the square wave, a low-speed MCU could be used.
If the MCU has to do something else besides generatig the square wave, a low-speed MCU may not be suitable to do this job.
Consider this: 2MHz --> period = 500ns --> low/high interval = 250ns.
For a 12T 8051, SET/CLR the IO port needs 1 instruction cycle. That is, 250ns to execute an instruction. Then the system clock should be 48MHz and the 8051 does not have spare time to do anything else.
For a RISC like PIC16/PIC18, 4T for one instruction, the system clock my be lower. However, 16MHz is still needed.
If AVR is used, one clock for one instruction. However, 4MHz is still needed for operation.
Any comment is welcome.