Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Section C - Interrupts (25 marks) 1. (10 marks) Assuming that the chip has just been reset, explain how to program the registers of the

image text in transcribed

Section C - Interrupts (25 marks) 1. (10 marks) Assuming that the chip has just been reset, explain how to program the registers of the DACC so that an interrupt is generated after each digital to analog conversion has completed. The names, addresses and values for all relevant registers should be included and you should justify the values chosen for each field. Do not include any code in your answer. 2. (10 marks) In the programming language, write an initialization routine dacinit(), and interrupt handler daccirq() so that a continuous triangular wave (i.e. signal changes value every conversion and is either increasing to a maximum or decreasing to the minimum) appears on the DAC1 output. Your answer should not use any library calls or include files, must be clearly commented and use meaningful variable names. You can assume the other parts of the system, such as the NVIC, have been programmed appropriately. 3. (5 marks) Assuming a master clock frequency of 84 MHz, and a conversion period of 25 DACC Clock cycles, what is the expected frequency of the triangle wave output? Explain how you obtained your answer. Section C - Interrupts (25 marks) 1. (10 marks) Assuming that the chip has just been reset, explain how to program the registers of the DACC so that an interrupt is generated after each digital to analog conversion has completed. The names, addresses and values for all relevant registers should be included and you should justify the values chosen for each field. Do not include any code in your answer. 2. (10 marks) In the programming language, write an initialization routine dacinit(), and interrupt handler daccirq() so that a continuous triangular wave (i.e. signal changes value every conversion and is either increasing to a maximum or decreasing to the minimum) appears on the DAC1 output. Your answer should not use any library calls or include files, must be clearly commented and use meaningful variable names. You can assume the other parts of the system, such as the NVIC, have been programmed appropriately. 3. (5 marks) Assuming a master clock frequency of 84 MHz, and a conversion period of 25 DACC Clock cycles, what is the expected frequency of the triangle wave output? Explain how you obtained your

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Students also viewed these Accounting questions

Question

5. Describe how contexts affect listening

Answered: 1 week ago