|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
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?
|
|
#2
|
|||||
|
|||||
|
Re: Accessing paralel port
Quote:
|
|
#3
|
||||
|
||||
|
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
|
||||
|
||||
|
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.
|
|
#5
|
||||||
|
||||||
|
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. Last edited by Joe Johnson : 25-07-2005 at 08:04. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |