0% found this document useful (0 votes)
28 views1 page

Online Assignment 1

This document is an assignment for a Computer Programming course at Brac University, focusing on NMOS transistor characteristics. Students are required to write a C program to calculate and store the drain-source current (Ids) for varying gate-source voltages (Vgs) and drain-source voltages (Vds). The assignment includes tasks for calculating Ids values, printing them, and plotting the results using Desmos.

Uploaded by

Manus Human
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views1 page

Online Assignment 1

This document is an assignment for a Computer Programming course at Brac University, focusing on NMOS transistor characteristics. Students are required to write a C program to calculate and store the drain-source current (Ids) for varying gate-source voltages (Vgs) and drain-source voltages (Vds). The assignment includes tasks for calculating Ids values, printing them, and plotting the results using Desmos.

Uploaded by

Manus Human
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Brac University

Department of Electrical & Electronic Engineering


CSE161/EEE103/ECE103: Computer Programming
Assignment1, Section-3, Summer 2022
Total Marks: 20 Due Date: 31st July
Question 1: [20]
For the following NMOS transistor, 𝑉𝑡 = 1𝑉.

Figure 1: NMOS Transistor

Current 𝐼𝑑𝑠 as a function of 𝑉𝑑𝑠 can be calculated as,

𝟏
(𝑽𝒈𝒔 − 𝑽𝒕 )𝑽𝒅𝒔 − (𝑽𝒅𝒔 )𝟐 , 𝑽𝒅𝒔 < (𝑽𝒈𝒔 − 𝑽𝒕 )
𝟐
𝑰𝒅𝒔 (𝑽𝒅𝒔 ) = 𝟐
𝟏
{ 𝟐 (𝑽𝒈𝒔 − 𝑽𝒕 ) , 𝑽𝒅𝒔 ≥ (𝑽𝒈𝒔 − 𝑽𝒕 )

Write a C program to perform all the following task:

a) Calculate the value of 𝐼𝑑𝑠 and store in an array, for 𝑉𝑑𝑠 = 0,1,2, … 6 considering 𝑉𝑔𝑠 = 3.5
b) Calculate the value of 𝐼𝑑𝑠 and store in an array, for 𝑉𝑑𝑠 = 0,1,2, … 6 considering 𝑉𝑔𝑠 = 4
c) Print the values stored in array of (a) & (b) as specified below,
Sample output for (a) [**Values shown here do not represent the actual values]:

Considering Vgs=3.5
Vds=0 Ids=1 [14]
Vds=1 Ids=1.5
.
.
.
Vds=6 Ids=5.5

d) Plot the values obtained in (a) & (b) in the same figure using Desmos [6]

You might also like