What is the voltage across the resistor

Assignment Help C/C++ Programming
Reference no: EM131299522

1) Very basic circuits 0.5 Amps pass through a 100-Ohm resistor. What is the voltage across the resistor? What is the law that you are using to solve this problem?

2) Given the circuit in the below figure. Ignore B1 and B2, they are included for completeness only. Current directions should be as they are here and you should not assume anything regarding the directions.

96_Circuit.jpg

a. Use Kirchoffs Current Law to find I3, if I1 = 4 Amps and I2 =1 Amps, at node 1.

b. At node 2, If I4 is 5 Amps, what is I5?

3) Short answer questions:

a. Mention three different methods to program an Arduino processing board? 1.

b. Provide the C (not Ardiuno) program statement to set ONLY PORTB pins 1 and 7 to logic one. Use bit-manipulation techniques.

c. Provide the C (not Ardiuno) program statement to reset ONLY PORTB pins 1 and 7 to logic zero. Use bit-manipulation techniques.

d. Given a sinusoid with 500 Hz frequency, what should be the minimum sampling frequency for an analog-to-digital converter, if we want to faithfully reconstruct the analog signal after the conversion? What is the name of the theorem that solves this problem? This was discussed in the Lecture several times.

e. If an analog signal is converted by an analog-to-digital converter to a binary representation and then back to an analog voltage using a DAC, will the original analog input voltage be the same as the resulting analog output voltage?

Circle your answer: YES NO. Explain your answer very briefly.

f. Describe the flow of events when an interrupt occurs.

g. There are two methods to doing GPIO that we discussed in Lecture. Name them. In the lecture, we had a funny unscientific name to one of them, mention it.

4) Given the code below:

a. Comment on each line of code as to what does that line of code do.

Use the comment symbols

b. Convert the Ardiuno Library functions except delay() to C code that manipulates the registers of the PORTs.

int led = 13;

voidsetup() {
pinMode(led, OUTPUT);
} void loop() {
digitalWrite(led, HIGH);
delay(1000);
digitalWrite(led, LOW);
delay(1000);

1635_Ardiuno.jpg

5) A Temperature sensor circuit is described in the code below.

a. Construct the circuit similar to the figure above i.e. draw the circuit schematic.
b. Modify the behavior of the circuit you have drawn in part a above and change the code below as necessary to light up a single LED for 100 milliseconds if the temperature goes above 75 degrees F.
c. Which of these two variables degreesC or degreesFis declared in the code below? Which one can you compare against?
d. Answer the questions in the comment next to each statement in the code.
e. Add the necessary modifications to the circuit that would cope with your changes to light up the LED when the temperature is between 75 degrees F and 85 degrees.

/*TEMPERATURE SENSOR

Use the "serial monitor" window to read a temperature sensor.

The TMP36 is an easy-to-use temperature sensor that outputs a voltage that's proportional to the ambient temperature.

Hardware connections:

The temperature sensor has a triangle logo and "TMP" in very tiny letters.

When looking at the flat side of the temperature sensor with the pins down, from left to right the pins are: 5V, SIGNAL, and GND.

Connect the 5V pin to 5 Volts (5V).
Connect the SIGNAL pin to ANALOG pin 0.
Connect the GND pin to ground (GND).

We'll use analog input 0 to measure the temperature sensor's signal pin. It analog input pin reads a value between 0 and 1024.
*/

constinttemperaturePin= 0;
void setup()
{
// What does this function do?
Serial.begin(9600);
}
// Why does this function return void?
void loop()
{
floatvoltage, degreesC, degreesF;
// What is the purpose of each of the statements below?
voltage= getVoltage(temperaturePin); //
// Now we'll convert the voltage to degrees Celsius.
degreesC= (voltage - 0.5) * 100.0; //
degreesF= degreesC* (9.0/5.0) + 32.0; //
Serial.print("voltage: ");
Serial.print(voltage);
Serial.print(" deg C: ");
Serial.print(degreesC);
Serial.print(" deg F: ");
Serial.println(degreesF);
delay(1000);
}
floatgetVoltage(intpin)
{
return(analogRead(pin) * 0.004882814);
}

Reference no: EM131299522

Questions Cloud

Focus on ease of use design considerations : Your technology requirement needs to focus on "ease of use" design considerations. Include in this section how this requirement will positively impact ease of use.
Identify and discuss the key steps in the closing process : Identify and discuss the key steps in the closing process that provide the most opportunity to make mistakes in processing account transactions. Why did you select these steps and what makes them confusing?
Design low-pass op amp circuit to pass only the fundamental : Design a low-pass OP AMP circuit to pass only the fundamental and the next nonzero harmonic of a 20π ms square wave. The gain of the OP AMP should be +5.
General journal for the adjusting entries : Prepare the Income Statement, Statement of Owner's Capital and Balance Sheet for Ace Lawn Care for May, 2014 - Prepare journal entries, in good form, to record the May adjusting entries. Explanations are optional. Start with Page 3 of the General ..
What is the voltage across the resistor : Very basic circuits 0.5 Amps pass through a 100-Ohm resistor. What is the voltage across the resistor? What is the law that you are using to solve this problem?
Find the fourier coefficients of the input : Compare the magnitudes of the fundamental and of the fifth harmonic with that of the third harmonic at the input and output of the tuned filter.
Find the rms value of a half-wave rectified sine wave : Use MATLAB to find the rms value of a half-wave rectified sine wave. Find the fraction of the total average power carried by the dc component plus the first three nonzero ac components in the Fourier series.
What fraction is carried by the ac components : What fraction of the total average power is carried by the dc component? What fraction is carried by the ac components?
Discuss the organisation entrepreneurial orientation : Using the case study you have constructed from the above task as a vehicle for discussion and analysis and using appropriate evaluative frameworks critically appraise and discuss the organisation's entrepreneurial orientation

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write the prototype and header for a function

Write the prototype and header for a function called calculate. The function should have three parameters: an int, a reference to a double, and a long (not necessarily in that order). Only the int parameter should have a default argument, which is..

  To deal with deadlocks we can either use prevention or

to deal with deadlocks we can either use prevention or avoidance or detection followed by recovery. but which is a

  Write a simple guessing game

In this lab, you will write a simple guessing game. The computer will generate a random integer within a valid specified range, inclusive (min, max) read in from a text file

  Write a program that creates a picture of a mountain

Write a program that creates a picture of a mountain panorama from a height profile entered by the user -  The height profile shall be stored in a one-dimensional array of integers. The array indices correspond to the columns of the picture. The va..

  The possible responses are a b c or d a file has been

the possible responses are a b c or d. a file has been created that contains the following1st line the answer key

  Write c program for linked list applications

Write a complete C program which illustrates the Linked list applications data structures and algorithms. The program will read in mid-semester test scores as Main Linked List and produce six outputs:

  Write a c program that will read the required values

Write a C program that will read the required values from the input file, compute the hole to depth ration, the ideal number of sticks, the ideal powder charge, the actual powder charge, and the actual number of sticks.

  Different movie soundtracks in stock

Jenny White is shopping for CDs. She decides to purchase 3 movie soundtracks. The music store has 10 different movie soundtracks in stock. How many different selections of movie soundtracks are possible?

  Write a program the recursive algorithm for towers of hanoi

Write a program the recursive algorithm for towers of Hanoi. Write a program the iterative algorithm of Towers of Hanoi.

  Choose descriptive variable names in all programs

Write a program named program71.py as follows. Follow instructions carefully to avoid point deductions - use another loop to display the numbers all on the same line, separated by a single space.

  Using a for loop, print the contents of the array.

Write the code to update every other element within the array with a lowercase x.

  Display your name in the title bar

Display your name in the title bar of the browser, declare the DOCTYPE for HTML5, and create a comment listing the lab number, the author, and the date.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd