home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / c / 19126 < prev    next >
Encoding:
Internet Message Format  |  1993-01-01  |  2.9 KB

  1. Path: sparky!uunet!spool.mu.edu!uwm.edu!ogicse!flop.ENGR.ORST.EDU!leela.CS.ORST.EDU!atlantis.CS.ORST.EDU!omarab
  2. From: omarab@atlantis.CS.ORST.EDU (Scorpion)
  3. Newsgroups: comp.lang.c
  4. Subject: OUTPORT command... NEED HELP FAST!! EMAIL RESPONCE!
  5. Summary: I NEED SOME HELP!!!!!!
  6. Keywords: outport help C C++ I/O ports outp outportb
  7. Message-ID: <1i2n6dINNqlc@leela.CS.ORST.EDU>
  8. Date: 2 Jan 93 00:21:33 GMT
  9. Article-I.D.: leela.1i2n6dINNqlc
  10. Distribution: world
  11. Organization: OSU CS Outreach Services, Corvallis, Oregon
  12. Lines: 47
  13. NNTP-Posting-Host: atlantis.cs.orst.edu
  14.  
  15.  
  16. I AM IN NEED OF HELP WITH THE OUTPORT COMMAND AND IT'S REQUIRED PARAMETERS.
  17. IF YOU CAN HELP ME..... I WOULD GREATLY APPRECIATE IT!!!!  PLEASE READ ON:
  18.  
  19.  
  20. I saw that you had mentioned to a guy that he should use 'output' as a way
  21. to output to the serial port.  Well I am interested in outputing bytes to
  22. specific pins on the parallel.  I was told to use the 'output' command
  23. in such a fashion:
  24.  
  25. if I have 8 motors, and 1 is on, 0 off, and I want only motor 1 on I should
  26. send the outport command the hex representation of 0000 0001 (#1 on) and the
  27. hex value for that would be 1h.  Now no one was able to tell me exactly how
  28. to send the parellel the command. I assumed (until I found out it didn't work)
  29. that I should send it like:     outport(378h,1h);
  30.                                       ^    ^Hex value sent to port
  31.                          Hex value for LPT1:
  32. Now when I try to compile such a setup, it says ") missing in statement" or
  33. something similar to that.  So I looked at some other things, and I decided 
  34. that C handles Hex differently... like in that 0x00 format.  Is this correct?
  35. What is this??  Well anyways, I tryed that: outport(378,0x01) and out(0x378,01)
  36. and outport(378,01) and outport(0x378,0x01).  I didn't get the error any more,
  37. but it didn't work either.  Do you know exactly what outport requires as passed
  38. parameters?  I cant find anything that tells EXACTLY what it needs... so my 
  39. best way to find out is by talking to other people who have used the command.
  40.  
  41. BTW I am 14 years old and am designing a small robotics project, so that is
  42. why I need to know this.  The first steps are finding out how to output to
  43. the ports.  If you have any other ideas/suggestions it is greatly appreciated..
  44.  
  45. Thanks....
  46.  
  47. -----------------------------------------------------------------------------
  48.  Brendan O'Mara                    Owner, Stealth Technologies,
  49.  Email: omarab@jacobs.ucs.orst.edu        specializing in:
  50.  Alias: Scorpion                    
  51.  Phone: (503)745-7549                Programming
  52.                         Computer Lessons
  53.  Sysop of the Stealth BBS:            Computer Setup Assistance
  54.  (503)745-7549, 9pm-7am weekdays,            
  55.  24 hours most weekends.            Call for details!
  56. ------------------------------------------------------------------------------
  57. -- 
  58. -----------------------------------------------------------------------------
  59.  Brendan O'Mara                    Owner, Stealth Technologies,
  60.  Email: omarab@jacobs.ucs.orst.edu        specializing in:
  61.  Alias: Scorpion                    
  62.