home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / apple2 / 24021 < prev    next >
Encoding:
Text File  |  1992-11-16  |  1.8 KB  |  54 lines

  1. Newsgroups: comp.sys.apple2
  2. Path: sparky!uunet!ukma!wupost!spool.mu.edu!umn.edu!limerick.cbs.umn.edu!hiroki
  3. From: hiroki@limerick.cbs.umn.edu (Hiroki Morizono)
  4. Subject: How do I control soft switches?
  5. Message-ID: <1992Nov16.190037.2147@news2.cis.umn.edu>
  6. Sender: news@news2.cis.umn.edu (Usenet News Administration)
  7. Nntp-Posting-Host: limerick.cbs.umn.edu
  8. Reply-To: hiroki@limerick.cbs.umn.edu
  9. Organization: University of Minnesota
  10. X-Newsreader: Tin 1.1 PL5
  11. Date: Mon, 16 Nov 1992 19:00:37 GMT
  12. Lines: 40
  13.  
  14.  
  15. Hi, I'm trying to open/close a switch using  a solid state relay, from
  16. the game port of an apple2e, using game controller 0
  17. (there is this piece of lab equipment that needs to be turned on and off at 
  18. 20 second intervals)
  19.  
  20.  
  21. The program looks something like this:
  22.  
  23. 10 INPUT "on interval"; A
  24. 20 INPUT "off interval"; B
  25. 30 INPUT "repeats "; C
  26. 40 FOR L = 1 to C
  27. 50 POKE -16295,253   
  28. 60 FOR O = 1 TO A : NEXT O
  29. 70 POKE -16296, 0    
  30. 80 FOR F = 1 TO B : NEXT F
  31. 90 NEXT L
  32.  
  33. -16295, -16296 are supposed to turn the game control output  on and off,
  34.  
  35. So before doing anything, I decided to just put wires in pins 5 and 3,
  36. Game control 0, and ground , and hook em up to a multitester. Got no changes 
  37. when I ran the thing. (I used long intervals--100, 300 etc) 
  38. Pin 2 (+5V) and Pin 3 (Gnd) gives me back 5v, so it isn't a loose connection. 
  39.  
  40. How do I turn on and off the soft switches? 
  41.  
  42. Am I right in assuming that once TTL is set high, it stays high, or do I 
  43. need to enclose the "switch on" magic woid/line between my FOR-NEXT statements?
  44.  
  45. What am I doing wrong (besides poking at the brains of my computer)?
  46. (I don't need a nice program for now, just one that does the job)
  47.  
  48. Email would be very gratefully appreciated,
  49. Thanks in advance,
  50. Hiroki Morizono
  51. hiroki@limerick.cbs.umn.edu (Machine is supposed to be taken off line tonight)
  52. mori0009@student.tc.umn.edu (Might be a better place to try.)
  53.  
  54.