Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A generic 8-bit data bus. 16-bit Address Bus microprocessor with a Read Signal,

ID: 3529240 • Letter: A

Question

A generic 8-bit data bus. 16-bit Address Bus microprocessor with a Read Signal, a Write Signal and an Address Valid control signal is used in the following motor control and instrumentation system. It operates as follows: An operator prepares an 8-bit binary value with a dip switch. A momentary contact switch (single-pole-single throw) connected to only one end of a cross-coupled Nand latch is activated. This sets the output of the latch to a logic one. All this time, the microprocessor has been polling the output of the latch. When microprocessor detects a logic one at the output of the latch, it resets the latch to a logic zero by sending a low going pulse to the other input leg of the latch. The microprocessor then reads the 8-bit data from the dip switch and puts the value in memory starting at location with a symbolic address 'BUFFER'. This same data is sent to a digital-to-analog converter (D/A) whose output drives a dc motor. The output of the dc motor is connected to a tachometer whose output is. in turn, connected to an 8-bit microprocessor-compatible analog-to-digital converter (A/D). The A/D is connected in a free running configuration. The microprocessor reads the A/D output, compares it with the original data from the dip switch, sends the hexadecimal number 42 Hex to an 8-bit LED pack if the compared values are different, and sends the hex. value 99 Hex to the same 8-bit LED pack if the compared values are equal. Finally, a Centronics parallel printer port is polled for a low-true printer ready logic signal, and the AD data is sent to the printer. Provide a hardware complete logic design for the system. Partial and simplified decoding is acceptable. Use only the following four addresses for your ports design: 8000 Hex; 4000Hex; 2000Hex; 1000Hex. Do NOT include interface to memory modules and reset circuits. Design the address decoders, ports (where needed), complete circuit details of dip switch and other switch interconnections, complete circuit details of LED interconnections, input output ports with appropriate handshaking signals. Clearly label AD. Printer. D/A signals showing how they connect to other circuits. Provide a well-commented Pseudo-code program to accomplish the tasks indicated in items 1 thru. 8. Clearly identify the specific polling routines and input output control software for each input output device. Problem TWO. Assuming that Full-Scale voltage output of an 8-bit Digital-to-Analog Converter is 10 volts, write the Pseudo-code program for synthesizing a 1KHz sine wave given by: Vout = 5 + 3sine(wt) volts. Use 4 samples per cycle. Calculate the decimal analog voltage values of the individual 4 sample values. Provide the Hexadecimal( binary) values of the 4 samples. Assume that each pseudo-code line takes 10 microseconds to execute.

Explanation / Answer

static OSStatus renderInput(void *inRefCon, AudioUnitRenderActionFlags *ioActionFlags, const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumberFrames, AudioBufferList *ioData){ AudioSynthesiser * audioController = (AudioSynthesiser *)inRefCon; // Get a pointer to the dataBuffer of the AudioBufferList AudioSampleType * outA = (AudioSampleType *) ioData->mBuffers[0].mData; if(!audioController->playing){ for (UInt32 i = 0; i tracks[inBusNumber]; SynthInstrument * instrument = (SynthInstrument *)track; float frequency_deviation; float FMFrequency; // Loop through the callback buffer, generating samples for (UInt32 i = 0; i notes_playing[x]; if(note){ //Envelope code removed //Calculate signal if (instrument->FMIndex) { //Apply FM FMFrequency = note->frequency*instrument->FMRatio; //FM frequency is factor of note frequency. note->FMPhase += FMFrequency / kGraphSampleRate; //Phase of modulator. frequency_deviation = sinf(note->FMPhase * M_PI)*instrument->FMIndex*FMFrequency; //Frequency deviation. Max deviation is a factor of the FM frequency. Modulation is done by a sine wave. note->phase += (note->frequency + frequency_deviation) / kGraphSampleRate; //Adjust phase with deviation // Reset the phase value to prevent the float from overflowing if (note->FMPhase >= 1){ note->FMPhase--; } }else{ note->phase += note->frequency/ kGraphSampleRate; //Adjust phase without deviation } // Calculate the next sample signal += instrument->wave_function(note->phase,instrument->wave_parameter)*track->note_amplitude[x]; // Reset the phase value to prevent the float from overflowing if (note->phase >= 1){ note->phase--; } } //Else nothing added } if(signal > 1.0){ signal = 1; }else if(signal < -1.0){ signal = -1.0; } audioController->wave[audioController->wave_last] = signal; if (audioController->wave_last == 499) { audioController->wave_last = 0; }else{ audioController->wave_last++; } outA[i] = (SInt16)(signal * 32767.0f); } return noErr; }
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote