Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Fill in the missing values to 1nake this program output the array at 100p|sec intervals //DtoASine.c /*This program outpus samples of an integer array at

image text in transcribed

Fill in the missing values to 1nake this program output the array at 100p|sec intervals //DtoASine.c /*This program outpus samples of an integer array at 100 micro-second intervals #include "stm32f446 . h" int main() int 1 int sine[] RCC. AHB1ENR RCC-APB 1 ENR RCC-APB1ENR 1 1= 1= //Bit e is GPIOA clock enable bit //Bit 29 is DAC clock enable bit //Enable peripheral timer for timer 3 (bit 1) GPIOA MODER GP10A PUPDR &= DAC-CR 1 //PA4-PAS are analog //Pins PA4 PAS are no pull up and no pull down //Bits 3, 4, 5 111 for software trigger ch1 //Bit 2 1 for ch 1 trigger enabled //Bit 1 for ch 1 output buffer enabled DAC-CR 1 TIM3. CRI ! TIM3 PSC TIM3_ CR1 while(1) //Bit for ch 1 enabled //Timer 3 bits //Auto reload is buffered //one pulse mode is on. ADD THIS LINE //Don't use prescaling //16 MHz/160 1@000 Hz //Enable Timer 3 (DAC-DHR12R1 = 1:(1 + 1) % 10; DAC-SWTRIGR 1 while( TIM3. CRI ! //start the D/A conversion ) //Wait here until timer runs out //Restart timer Fill in the missing values to 1nake this program output the array at 100p|sec intervals //DtoASine.c /*This program outpus samples of an integer array at 100 micro-second intervals #include "stm32f446 . h" int main() int 1 int sine[] RCC. AHB1ENR RCC-APB 1 ENR RCC-APB1ENR 1 1= 1= //Bit e is GPIOA clock enable bit //Bit 29 is DAC clock enable bit //Enable peripheral timer for timer 3 (bit 1) GPIOA MODER GP10A PUPDR &= DAC-CR 1 //PA4-PAS are analog //Pins PA4 PAS are no pull up and no pull down //Bits 3, 4, 5 111 for software trigger ch1 //Bit 2 1 for ch 1 trigger enabled //Bit 1 for ch 1 output buffer enabled DAC-CR 1 TIM3. CRI ! TIM3 PSC TIM3_ CR1 while(1) //Bit for ch 1 enabled //Timer 3 bits //Auto reload is buffered //one pulse mode is on. ADD THIS LINE //Don't use prescaling //16 MHz/160 1@000 Hz //Enable Timer 3 (DAC-DHR12R1 = 1:(1 + 1) % 10; DAC-SWTRIGR 1 while( TIM3. CRI ! //start the D/A conversion ) //Wait here until timer runs out //Restart timer

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

Database Processing Fundamentals Design And Implementation

Authors: David M. Kroenke

5th Edition

B000CSIH5A, 978-0023668814

More Books

Students also viewed these Databases questions