Build a task using a microcontroller that:
- Generates two precise square waves at the same time:
- 307 kHz on one pin
- 570 kHz on another pin
- The frequencies must be accurate within ±1% tolerance.
Also, consider the following condition
Main Loop Constraint:
The controller is constantly busy executing critical tasks inside the while() loop in the main function, as shown in the code below:
main () {
while (true) {
//In this loop Microcontroller is busy in monitoring and performing critical tasks constantly.
}
}