Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Five different frequencies, which are multiples of each other by factors of 1 , 1 . 2 , 1 . 4 , 1 . 6

Five different frequencies, which are multiples of each other by factors of 1,1.2,1.4,1.6, and 1.8, will be generated using only one timer and will be output from different pins of a parallel port. These frequencies (time intervals) will be generated using a timer; they will not be generated using a table, and interrupts will be used for this task. Mod 1 or mod 2 can be used for timers.
Choose a base frequency (time interval) for this task, which can be up to 20(or 10) times the given frequency (if you want finer adjustment, choose a value greater than 20 times). Create an interrupt for the base frequency (time interval). Assign a separate counter and threshold value (two separate memory addresses for each frequency) for each of the 5 separate frequencies (time intervals) requested in the assignment. These counters will be incremented individually with the base frequency. When each of these counters reaches a threshold value, the polarity of the port pin will be changed (logical 0 or 1). Since there are 5 different frequencies, 5 different port pins and 2*5 different memory areas will be used. Thus, with the interrupt taken from the base frequency, each counter will be incremented, and when the counters reach certain threshold values, the polarity of the port will be changed to obtain the frequencies requested from you (In this case, the polarity of the port pin related to the frequency will be changed (if it's 1, then 0; if it's 0, then 1)). For each frequency, you need to find a separate threshold value considering the base frequency.
a) Draw the flowchart of the algorithm.
c) Write the algorithm in 8051 machine code.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Discuss briefly the advantages and disadvantages of a CFD contract.

Answered: 1 week ago

Question

what is Cyber - attacks and threats

Answered: 1 week ago