Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a c++ Program for generating 2 waveforms signal A and signal B. The waveform consists of a repeated set of cycles. signal B should

Write a c++ Program for generating 2 waveforms signal A and signal B.

The waveform consists of a repeated set of cycles. signal B should be 50 microseconds.

image text in transcribed

There are 2 switch inputs to generate signals, Switch1 and switch 2. there are four parameters a,b,c and d.

If Switch1=0, it enables the stream of pulses, else if switch1=it disables the stream of pulses

similarly, If switch2=0, run in normal mode, else if switch 2=1, run with a new waveform cycle.

The new waveform cycle parameters are given below

parameter a =width of 1st pulse, 2nd pulse = a + 50microseconds, 3rd pulse = a + 100microseconds, 4th pulse = a + 150microseconds, etc

parameter b =width of space between pulses (ALL spaces are the same).

parameter c= Number of pulses in a block.

parameter d =space between pulse blocks.

New waveform parameters are as follows.

The possible system modes are as follows

If Mode =1, Switchinput 2 = 0 => normal waveform .Switchinput 2 = 1 => Remove 3 pulses from the pulse block (i.e. c-3 pulses in block) until switch 2 is set back to 0.

If mode=2 , Switch input 2 = 0 =>normal waveform. Switch input2='2' => Generate inverted form of complete Sig A waveform (from the largest pulse to the shortest) until switch 2 is set back to 0

if Mode=3, Switch input2=0 =>Normal waveform. switch input2=1=>insert an extra 3 pulses into the pulse block (i.e. c+3 pulses in block) until the switch is set back to 0

if Mode=4 , Switch input2=0=>Normal waveform. switchinput2=1=> Half d and b time until switch set back to 0.

Figure 1

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