Question: 1 . Write a C program for the Arduino Mega which will:Monitor incoming characters from the Megas UART, for A , B , C ,
Write a C program for the Arduino Mega which will:Monitor incoming characters from the Megas UART, for A B C D E F G and Q usingthe serial functions you wrote in the UART lab UInit kbhit getchar andputcharGenerate a square wave on Port B of the appropriate frequency depending on the keypressed, as indicated in the table below.Output logical when the program first starts, and after the UART receives a QcharacterFrequency TableNote Frequency HzA B C D E F G NOTE: Generating the square wave will not take place in the main loop of the program,but instead in the overflow Interrupt Service Routine of Timer #Hint: Start with the code you wrote in the Timer Lab, and make two changes:Implement your own serial IO routines UInit kbhit getchar and putcharinstead of the Arduino library serial functions to read the note to be played from theUART.Implement an ISR function for the Overflow Interrupt on Timer #TIMER OVFwhich will:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
