Question: Write an assembly code for TM 4 C 1 2 9 XNCZAD card. We were using the on - board piezo buzzer in previous experiments
Write an assembly code for TMCXNCZAD card. We were using the onboard piezo buzzer in previous experiments with the square wave we generated by writing digital and to the buzzer pin repeatedly with some delay. In this lab, we are going to use the PWM to generate the square wave that we are going to drive the buzzer with. The initialization process for the PWM and ADC is given in the attached code file.
Before coming to lab:
Read page of the datasheet.
Read the module Signal Description on page and take a look at table
Read the module "Initialization and Configuration that starts from page
The objective of this week is to control buzzer volume using the ADC output data through PWM We are going to connect the PWM output to the buzzer pin physically during the experiment, so you only need to control PWM parameters with ADC output.
You need to find which PWM registers control which parameter of the square wave created and make necessary changes on them. After we connect the PWM output to the buzzer, we expect it to generate sound with different frequencies sequentially with some delay, all of the values you need for this operation are given in the base code file. Also, the potentiometer should control the buzzer volume, while the buzzer is switching frequencies between two constant values some delay to the volume change can be ignored
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
