#include<reg52.h> // special function register
declarations
// for the intended 8051 derivative
sbit LED = P2^0; // Defining LED pin
void Delay(void); // Function prototype declaration
void main (void)
{
while(1) // infinite loop
{
LED = 0; // LED ON
Delay();
LED = 1; // LED OFF
Delay();
}
}
void Delay(void)
{
int j;
int i;
for(i=0;i<10;i++)
{
for(j=0;j<10000;j++)
{
}
}
}
Using uVision: Write a 2 Port B. U inCprogram that generates a 1 second square wave...
Using uVison: Write a C program that generates a 1 second square wave on Pin 2 Port B. Using generated signal from that Pin 2, as an input to Pin 3 Port B drive the red LED at the same rate and the Blue LED at half the rate of the Red LED.
Using uVison: Write a C program that generates a 1 second square wave on Pin 2 Port B. Using generated signal from that Pin 2, as an input to Pin 3 Port B drive the red LED at the same rate and the Blue LED at half the rate of the Red LED.
HW 11.5 Consider the periodic "square wave" signal defined by x(t)- u(t - 4k) - u(t - 2-4k) (a) Sketch x(t) (b) Sketch g(t) = x(t)-0.5 (c) Sketch |x(jw)|. Hint: First determine the Fourier series expansion of x() (d) Sketch IG(Go) HW 11.5 Consider the periodic "square wave" signal defined by x(t)- u(t - 4k) - u(t - 2-4k) (a) Sketch x(t) (b) Sketch g(t) = x(t)-0.5 (c) Sketch |x(jw)|. Hint: First determine the Fourier series expansion of x() (d)...
Questions 4-20. Questions 4-20. QUESTION 4 the output becomes The longer a signal is applied to the input of an integrator op amp, the a smaller b. larger QUESTION 5 the output becomes. The faster the voltage applied to the input of a differentiator changes, the a smaller . b. larger QUESTION 6 voltage than for a negative-going signal. A Schmitt trigger switching threshold for a positive-going input signal is at a a lesser . b.greater QUESTION 7 If a...
Using MATLAB, duplicate to the two graphs shown in the figure below Requirements 1. Show the MATLAB code used to plot both functions 5cos (nt-ng) (V) 5 e-"X cos (2nft-2nx/A) (V) a. y b- Use the frequency, wavelength and attenuation shown in the figure below when plotting graph (b) 2. 3. 4. Place labels for the x and y axis showing appropriate units Extend the x-axis to 10 cm and use a sampling rate of 0.1 mm Submit the final...
Having trouble with an automatic traffic light program. Red LED and Yellow LED won't show. We are using a Dragon12 Plus 2 board, Code is below #include C:\Users\schwarzenbar\Desktop\hcs12.inc RED: EQU $10 ;PP4 GREEN: EQU $40 ;PP6 org $2000 movb #$FF, DDRP bset PTP, #RED bset DDRT,%00110000 ;PT4=Output for for IR Transmiter (IRTX) bclr DDRT,%00001000 ;PT3=Input pin for IR receiver (IRRX) bclr PTT,%00001000 ;PT4=0 to turn on IR...
A 2 × n checkerboard is to be tiled using three types of tiles. The first tile is a white 1 × 1 square tile. The second tile is a red 2 × 2 tile and the third one is a black 2 × 2 tile. Let t(n) denote the number of tilings of the 2 × n checkerboard using white, red and black tiles. (a) Find a recursive formula for t(n) and use it to determine t(7). (b) Let...
1. Write an equation that describes voltage supplied by a wall outlet. (f = 60 Hz, Vrms = 120 V) 2. What is the instantaneous voltage of a sine wave at half of a period? Describe Alternating Current (AC). Explain how resistors, capacitors, and inductors behave in an AC circuit. WRITEUP REQUIREMENTS Informal: Questions - 6 pts, Data Tables - 3 pts, Survey Questions from Syllabus - 1 pt INTRODUCTION V Up to this point, we have been using supply...
Q3) A day has 86,400 secs (24*60*60). Given a number in the range 1 to 86,400, output the current time as hours, minutes, and seconds with a 24-hour clock. For example:70,000 sec is 19 hours, 26 minutes, and 40 seconds. Q4) Consider a triangle with sides of length 3, 7, and 9. The law of cosines states that given three sides of a triangle (a, b, and c) and the angle C between sides a and b: c square = a...
Question 1 What is the wavelength of an electromagnetic wave of frequency 98.4-MH7 Quiz navigation Not yet answered Marked out of 1.00 r Flag question Answer Finish attempt... Time left 0:19:47 Question 2 Suppose you have visible light whöse wavelength in vacuum is 450nm. If the light travels through glass, what happens to the wavelength of the light? Select one: O A Wavelength increases O B. Wavelength decreases Not yet answered Marked out of 1.00 P Flag C. Wavelength stays...