home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 April / CHIP4_98.ISO / software / ccconrad / basic.exe / CHIP / Programme.Bas / Beispiele_2 / TRMESS2.BAS < prev    next >
Encoding:
BASIC Source File  |  1997-05-07  |  950 b   |  62 lines

  1. '**************************************
  2. '
  3. ' C-Control/BASIC       TRMESS2.BAS
  4. '
  5. ' Aufgabe:
  6. '
  7. ' - Transistorpruefung, NPN und PNP
  8. ' - Messung der Stromverstaerkung
  9. ' - Arbeitspunkt: Ic=1mA, Uce=2,8V
  10. '
  11. '**************************************
  12. ' --- Definitionen --------------------
  13.  
  14. define A DA[1]
  15. define E1 AD[1]
  16. define E2 AD[2]
  17. define E3 AD[3]
  18. define U1 Byte
  19. define V word
  20.  
  21. ' --- Programmoperationen -------------
  22.  
  23.  
  24.  
  25. #Loop
  26. A= 127       '2,5V
  27. pause 10
  28. if E2 < 50 then goto NPN else goto PNP
  29. pause 50
  30. goto Loop
  31.  
  32. #NPN
  33.   U1=0: A=U1
  34.   pause 10
  35. #Loop2  
  36.   U1=U1+1
  37.   A = U1
  38.   if E3 > 140 then goto loop2
  39.   V= ((255-E3)*100) / (E1-E2)
  40.   print "NPN", V, "-fach"
  41. goto Loop              'Endlosschleife
  42.  
  43. #PNP
  44.   U1=255: A=U1
  45.   pause 10
  46. #Loop3  
  47.   U1=U1-1
  48.   A = U1
  49.   if E3 > 140 then goto loop3
  50.   V= ((255-E3)*100) / (E2-E1)
  51.   print "PNP", V, "-fach"
  52. goto Loop              'Endlosschleife
  53.  
  54.  
  55.  
  56. end
  57.  
  58.  
  59.  
  60.  
  61.  
  62.