Give the ritual which initializes the interface you may use


The objective of this exercise is to interface a silicon-controlled rectifier (SCR) using input capture and/or output compare. A 120-Hz digital logic waveform (Sync) is available that is synchronized to the zero crossings of the 60-Hz alternating current wave. A 100-μs pulse on the digital logic Control signal will turn on the SCR. The SCR will automatically shut off on the next zero crossing of the 60-Hz wave. Sync will be an input to the microcomputer, and Control will an output (Figure 6.27).

Figure 6.27

420_eb9f1c3c-cbb6-4d9f-a06b-da4c1846cd7f.png

The software controls the amount of delivered power by adjusting the time T, which is the delay from the rising edge of the Sync input to the rising edge of Control output. To solve this problem on other microcomputers, you may modify the hardware in Figure 6.28 to conform to the available ports.

1310_aaaa06f6-5884-40bc-aa0b-2aed15199b1d.png

The delay T will vary from 300 to 8000 μs. When T is 300 μs, full power is being delivered. When T is 8000 μs, almost no power is delivered to the load. A 16-bit unsigned global variable

1455_7a2d71c0-5894-4781-b28f-b970f4a1bbea.png

will be set by the main program (which you will not write) and read by the interrupt software (which you will write).

a) Give the ritual which initializes the interface. You may use any available feature of your microcomputer.

b) Give the TC2handler() and TC0handler() interrupt handlers that implement this interface. Good interrupt software has no backward jumps.

c) This is indeed an example of a real-time system. Give the upper bound on the latency of the TC0handler(). Don't calculate what it actually is but rather determine theoretically how fast it must be to work properly

Lab Assignments

Request for Solution File

Ask an Expert for Answer!!
Mechanical Engineering: Give the ritual which initializes the interface you may use
Reference No:- TGS01468293

Expected delivery within 24 Hours