Go to Post My team heard another team describe the Championships as "10,000 kids jamming the Georgia Dome for 3 days…more nerds per square foot than a Star Trek convention…and more purposefully employed " Is this true?, Because I don't think there could possibly be a more wonderful place on earth - Emily3204 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 24-07-2005, 21:01
[527]phil's Avatar
[527]phil [527]phil is offline
Alumni
AKA: Phil
FRC #0527 (red dragons)
Team Role: Alumni
 
Join Date: Oct 2004
Rookie Year: 2003
Location: N.Massapequa
Posts: 282
[527]phil is a glorious beacon of light[527]phil is a glorious beacon of light[527]phil is a glorious beacon of light[527]phil is a glorious beacon of light[527]phil is a glorious beacon of light
Send a message via AIM to [527]phil
Accessing paralel port

Ok so I started on a small robot that i'm going to control using an old toshiba satalite laptop. I know how to use the parallel port to hook it up. I'm trying to program it in BASIC but i don't know how to send information through the parallel port. What I DO know is that i have to send data bits, eight in total. If I send a 0 it will trigger something off, if I send a 1 it will trigger it on. But how do I send data through a particular port using BASIC language?
__________________
Whats the difference between mechanical engineers and civil engineers?

Mechanical engineers build weapons, civil engineers build targets
  #2   Spotlight this post!  
Unread 24-07-2005, 22:46
Timothy D. Ginn's Avatar
Timothy D. Ginn Timothy D. Ginn is offline
I check here maybe once a year.
no team
 
Join Date: Apr 2003
Rookie Year: 2002
Location: Port Perry, ON. Canada
Posts: 247
Timothy D. Ginn is a name known to allTimothy D. Ginn is a name known to allTimothy D. Ginn is a name known to allTimothy D. Ginn is a name known to allTimothy D. Ginn is a name known to allTimothy D. Ginn is a name known to all
Send a message via ICQ to Timothy D. Ginn Send a message via AIM to Timothy D. Ginn Send a message via MSN to Timothy D. Ginn Send a message via Yahoo to Timothy D. Ginn
Re: Accessing paralel port

Quote:
Originally Posted by [527]phil
Ok so I started on a small robot that i'm going to control using an old toshiba satalite laptop. I know how to use the parallel port to hook it up. I'm trying to program it in BASIC but i don't know how to send information through the parallel port. What I DO know is that i have to send data bits, eight in total. If I send a 0 it will trigger something off, if I send a 1 it will trigger it on. But how do I send data through a particular port using BASIC language?
See: http://ourworld.compuserve.com/homep...wden/page6.htm (it's got some QBASIC code for reading from the parallel port, and does have some mention of using the OUT command for sending data rather than the INP command for reading it.
__________________
Alumni of FRC Team 1006
Former mentor of Full Lego Alchemist (FLL 5621) - Sempar School / Computing Students' Association of Queen's University
  #3   Spotlight this post!  
Unread 25-07-2005, 00:38
Tristan Lall's Avatar
Tristan Lall Tristan Lall is offline
Registered User
FRC #0188 (Woburn Robotics)
 
Join Date: Aug 2001
Rookie Year: 1999
Location: Toronto, ON
Posts: 2,484
Tristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond repute
Re: Accessing paralel port

What's the operating system of the laptop? In DOS-based operating systems (e.g. MS-DOS 6.22, Windows 95, Windows Me) you can access the parallel port directly using the language's I/O port routines (I know, for example, that Pascal allows you to write to Port[$387] for LPT1, or to run inline assembly routines). With Windows NT-based operating systems (e.g. Windows NT 4.0, Windows 2000, Windows XP), you need to use some driver that provides the appropriate access routines—it's more difficult, but also more robust. If it's not Windows or DOS, I wouldn't know.

Try this for some information on parallel ports under a DOS-based system (in Pascal, but easy to understand).
  #4   Spotlight this post!  
Unread 25-07-2005, 07:56
[527]phil's Avatar
[527]phil [527]phil is offline
Alumni
AKA: Phil
FRC #0527 (red dragons)
Team Role: Alumni
 
Join Date: Oct 2004
Rookie Year: 2003
Location: N.Massapequa
Posts: 282
[527]phil is a glorious beacon of light[527]phil is a glorious beacon of light[527]phil is a glorious beacon of light[527]phil is a glorious beacon of light[527]phil is a glorious beacon of light
Send a message via AIM to [527]phil
Re: Accessing paralel port

The laptop is running windows 98 SE. But the first page helped and right now I have 6 LED's chasing each other when I let go of a micro switch.
__________________
Whats the difference between mechanical engineers and civil engineers?

Mechanical engineers build weapons, civil engineers build targets
  #5   Spotlight this post!  
Unread 25-07-2005, 08:01
Joe Johnson's Avatar Unsung FIRST Hero
Joe Johnson Joe Johnson is offline
Engineer at Medrobotics
AKA: Dr. Joe
FRC #0088 (TJ2)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1996
Location: Raynham, MA
Posts: 2,648
Joe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond repute
Re: Accessing paralel port

This Kit from kitsrus.com (available here) uses the parallel port on a PC as a cheap "Data Acquistion"

The interesting bit for the purposes of this thread is that this document has a discussion of IO via the printer port (addresses, which pins do what, how to read from the port, how to write to it, etc.) . It has BASIC code examples (though they are specific to the particular IO box, if you know a bit about the chips used on the board, you can pretty much follow what is going on).

Good luck.

Joe J.
__________________
Joseph M. Johnson, Ph.D., P.E.
Mentor
Team #88, TJ2

Last edited by Joe Johnson : 25-07-2005 at 08:04.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
TTL port to a serial port on a demo board ImmortalAres Programming 16 09-07-2005 23:44
Updated: Serial Port Driver Code Kevin Watson Programming 4 05-02-2005 18:39
New Serial Port Driver Kevin Watson Programming 16 09-01-2005 01:56
Questions about DNS, URL Forwarding, and Cloaking sanddrag Website Design/Showcase 7 22-10-2004 21:32
Change to Initializing Inputs and Outputs Jferrante Programming 4 07-01-2003 11:36


All times are GMT -5. The time now is 00:14.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi