![]() |
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?
|
Re: Accessing paralel port
Quote:
|
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). |
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.
|
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. |
| All times are GMT -5. The time now is 04:37. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi