Question
Sample and convert analog sine wave consisting of 290 Hz frequency value into digital. A timer must be used for the ADC. Sampling frequency (1600
Sample and convert analog sine wave consisting of 290 Hz frequency value into digital.
A timer must be used for the ADC. Sampling frequency (1600 Hz) should be established with this timer. When the frequency is 290Hz, the led connected to one end of the parallel port will be illuminated. The frequency of the analog signal changes after a certain time. Therefore, the algorithm will check this continuously in an endless loop. If the frequency is outside the frequency chosen by the student, the LED will be dimmed.
The ADC unit should be defined with an address in the microprocessor system internal memory map (0E1H) and this unit should be accessed with "direct" addressing. The cycle will start with the reading of 0E1H. Suppose there is an 8-bit ADC in the system and the analog signal changes between -5V and + 5V
Note: Note that the ADC generates signed numbers as the complement of -2.
Suggestion: Data is read continuously at sampling times. Finding the two maxima of the sine allows the frequency of the analog signal to be found roughly. Consider that the maxima are not found once. There will be two maxima continuously.
a) Draw the flow chart. b) Write the 8051 assembly code
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started