Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

sine_io.c sine_io.c reads in voltages from an a/d and outputs the same voltage to a d/a. This is done at approximately 1KHz. Program updated in

image text in transcribed

sine_io.c sine_io.c reads in voltages from an a/d and outputs the same voltage to a d/a. This is done at approximately 1KHz. Program updated in Feb. 2018 ******************************************************************************/ #include  #include  #include  #include  #include  #include  #include  #include "Win626.h" #include "App626.h" #define SAMPLE_RATE 1000.0 #define EOPL 0x80 #define PERFORMANCE_COUNTS 3323900 #define RANGE_5V 0x10 typedef DWORD HBD; //---*****WARNING!*****---DO NOT CHANGE THE CODE BETWEEN WARNINGS----------------- /* 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 are 3323900 performance_clicks per second, thus providing a high resolution timer capable of ensuring reasonable real-time performance is used properly. */ void sleepfor(LARGE_INTEGER from, long performance_clicks) { LARGE_INTEGER pc0; long pc_diff; QueryPerformanceCounter(&pc0); pc_diff = (long) pc0.QuadPart - (long) from.QuadPart; if(pc_diff > performance_clicks) printf("."); while(pc_diff   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 jo.c for creating this program.  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 jo.c for creating this program

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions