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