In this exercise you are required to write a computer program which will calculate the voltage across a resistor in the following circuit:
where E0 = 0.16 Volts, Ro=200kΩ. For this exercise, we will assume that the special semiconductor diode used in the circuit has a current-voltage characteristic given by
i= Io{exp[eV/kT]-1}
where i is the diode current and V the voltage across the diode. e/kT= 40 at room temperature and Io = 8×10-8 A. The normal threshold voltage drop of 0.7V before the diode starts to conduct any electric current does not apply in this exercise.
Using your programme you need to in your report present two sets of results: the voltage drop across the resistor for e/kT= 40 and e/kT= 20
Your program should be designed in such a way that E0, R0 and e/kT are read from keyboard with sufficient information displayed to the user before an input is taken. Appropriate output to the screen should also be generated to display the calculated results. For this exercise you are not required to use sub-programs (functions).
1. Introduction (nature of the problem and what you are asked to do).
2. Description of your programme design and structure. For example, what are the input data and what do you want the programme to output? Could the user input the required data conveniently? Does the programme give a user clear instruction when the programme starts? What type of logical structure is used and what are the conditions used in the logical structure?
3. C++ code and typical results. Remember to add sufficient comment to the code so others could understand easily what each section of the code does. If the code is difficult to read, marks will be deducted.
4. A brief description of how to run your software and how to interpret the out results. Discussion of the performance of your programme and coding problems that you have encountered.