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

  1. '**************************************
  2. '
  3. ' C-Control/BASIC       TRMESS.BAS
  4. '
  5. ' Aufgabe:
  6. '
  7. ' - Transistorpruefung
  8. ' - Identifizierung NPN/PNP
  9. ' - Identifizierung E, B, C
  10. '
  11. '**************************************
  12. ' --- Definitionen --------------------
  13.  
  14. define P1 port[1]
  15. define P2 port[2]
  16. define P3 port[3]
  17. define E1 AD[1]
  18. define E2 AD[2]
  19. define E3 AD[3]
  20.  
  21. ' --- Programmoperationen -------------
  22.  
  23. #Loop
  24.   P1=0: P2=0: P3=1
  25.   pause 2
  26.   if abs(E1-E3)<5 then print "PNP C B E"
  27.   if abs(E2-E3)<5 then print "PNP B C E"
  28.    P1=0: P2=1: P3=0
  29.   pause 2
  30.   if abs(E1-E2)<5 then print "PNP C E B"
  31.   if abs(E3-E2)<5 then print "PNP B E C"
  32.   P1=0: P2=1: P3=1
  33.   pause 2
  34.   if abs(E3-E1)<5 then print "NPN E B C"
  35.   if abs(E2-E1)<5 then print "NPN E C B"
  36.   P1=1: P2=0: P3=0
  37.   pause 2
  38.   if abs(E2-E1)<5 then print "PNP E C B"
  39.   if abs(E3-E1)<5 then print "PNP E B C"
  40.    P1=1: P2=0: P3=1
  41.   pause 2
  42.   if abs(E1-E2)<5 then print "NPN C E B"
  43.   if abs(E3-E2)<5 then print "NPN B E C"
  44.   P1=1: P2=1: P3=0
  45.   pause 2
  46.   if abs(E1-E3)<5 then print "NPN C B E"
  47.   if abs(E2-E3)<5 then print "NPN B C E"
  48.   pause 20
  49. goto Loop              'Endlosschleife
  50. end
  51.  
  52.  
  53.  
  54.  
  55.  
  56.