Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

starting with the code below: Write a C-program that reads in a 20Hz sine wave with an amplitude of 1V (rms) through ADCO channel and

image text in transcribed
starting with the code below:
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Write a C-program that reads in a 20Hz sine wave with an amplitude of 1V (rms) through ADCO channel and writes out its derivative at DACO channel. Use a sampling frequency of 750 Hz. Again, start with sine_io.c for creating this program. sine_io.c reads in voltages from an a/d and same voltage to a d/a. This is done at Program updated in Feb. 2019 outputs the approximately 1KHz #include #include #inc lude #include #include #include #include #include #include "Win626.h" "App626.h" #de fine SAMPLE RATE 1000.0 #define EOPL #define PERFORMANCE COUNTS 3323900 #de fine RANGE 5V typedef DWORD HBD; 0x80 0x10 //-**WARNING! -DO NOT CHANGE THE CODE BETWEEN WARNINGS //--_ * * * * *WARNNG ! CODE BETWEEN WARNINGS- DO NOT CHANGE THE /sleepfor takes a LARGE INTEGER (64 bits) and returns after the input number of performance clicks have passed from that time. This can serve as a timer for a real-time loop to ensure that a loop executes a certain number of performance clicks For these machines running Windows 7 there thus providing a high resolution timer performance is used are 3323900 performance clicks per second, capable of ensuring reasonable real-time properly. void sleepfor (LARGE INTEGER from, long performance clicks) LARGE INTEGER pco long pe diff; QueryPerformanceCounter (&pco) pc-diff = (long) pco.QuadPart -(long) from.QuadPart; if (pc diff> performance clicks) printf while(pe diff #include #include "Win626.h" "App626.h" #de fine SAMPLE RATE 1000.0 #define EOPL #define PERFORMANCE COUNTS 3323900 #de fine RANGE 5V typedef DWORD HBD; 0x80 0x10 //-**WARNING! -DO NOT CHANGE THE CODE BETWEEN WARNINGS //--_ * * * * *WARNNG ! CODE BETWEEN WARNINGS- DO NOT CHANGE THE /sleepfor takes a LARGE INTEGER (64 bits) and returns after the input number of performance clicks have passed from that time. This can serve as a timer for a real-time loop to ensure that a loop executes a certain number of performance clicks For these machines running Windows 7 there thus providing a high resolution timer performance is used are 3323900 performance clicks per second, capable of ensuring reasonable real-time properly. void sleepfor (LARGE INTEGER from, long performance clicks) LARGE INTEGER pco long pe diff; QueryPerformanceCounter (&pco) pc-diff = (long) pco.QuadPart -(long) from.QuadPart; if (pc diff> performance clicks) printf while(pe diff

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 Development For Dummies

Authors: Allen G. Taylor

1st Edition

978-0764507526

More Books

Students also viewed these Databases questions

Question

LO6Outline steps for creating a performance improvement plan.

Answered: 1 week ago