Rangkaian Bias Transistor (Pascal Procedure)

Aplikasi ini bertujuan untuk menghitung nilai arus basis (ib), arus emiter (ie), arus collector (ic), dan tegangan collector-emiter (vce) pada rangkaian bias transistor common emiter. Terdapat 2 menu pilihan yaitu rangkaian bias tetap & rangkaian bias umpan balik tegangan. Input pada program ini yaitu nilai beta (b), tahanan emiter (Re), tahanan basis (Rb), tahanan collector (Rc) dan Vcc. Input akan diolah dengan procedure, terdapat empat procedure yaitu ib, ic, ie & vce yang menghasilkan output masing-masing. Output akan ditampilkan dilayar.

flowchart :

listing program :

 

program rangkaian_bias_transistor_common_emiter;
uses crt;

var
b, rb, rc, re, vcc, vce, ib, ic, ie, pilihan, r_ib, r_ic, r_ie, r_vce: real;

procedure f_ib(f_vcc, f_b, f_rb, f_rc, f_re, pil: real; var result: real);
begin
if (pil = 1) then
begin
result := (f_vcc – 0.7) / (f_rb + ((f_b + 1) * f_re));
end
else
begin
result := (f_vcc – 0.7) / ((f_b * (f_rc + f_re)) + f_rb);
end;
end;

procedure f_ic(f_b, f_ib, pil: real; var result: real);
begin
result := f_b * f_ib;

end;

procedure f_ie(f_b, f_ib, pil: real; var result: real);
begin
result := (f_b + 1) * f_ib;

end;

procedure f_vce(f_vcc, f_ic, f_rc, f_re, pil: real; var result: real);
begin
result := f_vcc – (f_ic * (f_rc + f_re));

end;

begin
clrscr;
writeln(‘ PROGRAM RANGKAIAN BIAS TRANSISTOR COMMON EMITER ‘);
writeln(‘ ‘);
writeln(‘ ‘);
write(‘masukkan nilai b (beta) : ‘);
readln(b);
write(‘masukkan nilai vcc : ‘);
readln(vcc);
write(‘masukkan nilai Rc : ‘);
readln(rc);
write(‘masukkan nilai Re : ‘);
readln(re);
writeln;
writeln(‘————————————————–‘);
writeln(‘———————–MENU———————–‘);
writeln(‘[1] Menghitung rangkaian bias tetap’);
writeln(‘[2] Menghitung rangkaian bias umpan balik tegangan’);
write(‘masukkan pilihan : ‘);
readln(pilihan);
writeln(‘————————————————–‘);

if (pilihan = 1) then
begin
write(‘masukkan nilai Rb : ‘);
readln(rb);

f_ib(vcc, b, rb, rc, re, pilihan, r_ib);
f_ie(b, r_ib, pilihan, r_ie);
f_ic(b, r_ib, pilihan, r_ic);
f_vce(vcc, r_ic, rc, re, pilihan, r_vce);

writeln(‘nilai ib = ‘, r_ib:2:3, ‘ a’);
writeln(‘nilai ie = ‘, r_ie:2:3, ‘ a’);
writeln(‘nilai ic = ‘, r_ic:2:3, ‘ a’);
writeln(‘nilai vce = ‘, r_vce:2:3, ‘ v’);
end
else if (pilihan = 2) then
begin
write(‘masukkan nilai Rb : ‘);
readln(rb);

f_ib(vcc, b, rb, rc, re, pilihan, r_ib);
f_ie(b, r_ib, pilihan, r_ie);
f_ic(b, r_ib, pilihan, r_ic);
f_vce(vcc, r_ic, rc, re, pilihan, r_vce);

writeln(‘nilai ib = ‘, r_ib:2:3, ‘ a’);
writeln(‘nilai ie = ‘, r_ie:2:3, ‘ a’);
writeln(‘nilai ic = ‘, r_ic:2:3, ‘ a’);
writeln(‘nilai vce = ‘, r_vce:2:3, ‘ v’);
end
else
begin
writeln(‘salah input’);
end;

readln;
end.

Tampilan Antar Muka Program  :

 

 

About Herdiaman Saragih

I Am a Global Product

Posted on 22 Juni 2016, in Uncategorized. Bookmark the permalink. Tinggalkan komentar.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: