View Single Post
Old Feb 21st, 2005, 8:12 PM   #2
Light
Newbie
 
Join Date: Feb 2005
Location: USA, Western States
Posts: 4
Rep Power: 0 Light is on a distinguished road
Port Interface

First you have to decide which printer port you are going to use. I have a similar project in which I want to control external equipment from the serial port.

My problem is that my C tutor book tells me that the "Std Aux" function will allow me to send data through the serial port Com1. However, it does not help me with a description of the function or how it is used. See my thread and project. Light

May be the following will help you. It has been a while since I read and studied this but here goes. From a engineering stand point your computer's connection to the outside world is via either serial com ports (com1 and com 1) and the parallel port.

Information inside your computer is transfered via serial and parallel chips that move data or program instructions through the system and is controlled by a program running in the micro processor. The processor and all the digital devices are run by a master clock that generates a serial stream of clock bits that times all the transfers of data throughout the processor and other mother board circuity. This is all digital. Instructions and data is grouped by words that are addresses and words that are data.

In the processor most data is transfered in parallel because it is so much faster and more efficent.

When your program code moves data from the memory to a port it can go out as either a serial stream or a parallel stream of bits which are words. If it is to be presented as a parallel output it is put in a chip that allows the data to be transfered outside via a multiple output pin chip. To accomplish this the data is moved to a specific port and then an external parallel cable (under 20 feet) is hooked to you external card or device that you are sending the data to. The data must then be latched in with a hand shake (signal) between your card and the parallel port of the computer.

Like wise the serial ports each have a device that shifts data out as single bits one at a time that make up a word. The receiving card or cards( or circuit) at the other end of the cable or along it (which can be several hundred feet long) picks up the data stream and each card can decode its address and latch the words that belongs to it onto the card. There does not have to be a hand shake if all you are doing is sending data to the card. However, it can be set up to operate as both an input and transmitting port so that data can go both way.

To send data out the parallel port you will need to understand the protocal for data transfer using it. If you need information on how that protocal works I can probably find a book that you could use to build the interface needed.

Mean while if you can give me any ideas on my problem please read my post under C forum. good luck - Light
Light is offline   Reply With Quote