0% found this document useful (0 votes)
79 views

Experiment No. Ece414El - 02

This document summarizes an experiment testing various circuit boards including a power supply module, 8-bit LED display board, 8-bit input generator board, analog-to-digital converter (ADC) board, and parallel port interface board. The experiment procedures verify that each module is working properly by connecting the boards together in various configurations and using a voltmeter or LED display to monitor output. The results show that the power supply outputs the expected voltages, the LEDs light up in sequence, and the input generator and ADC board function as expected when inputs are applied.

Uploaded by

Kelvin Junio
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views

Experiment No. Ece414El - 02

This document summarizes an experiment testing various circuit boards including a power supply module, 8-bit LED display board, 8-bit input generator board, analog-to-digital converter (ADC) board, and parallel port interface board. The experiment procedures verify that each module is working properly by connecting the boards together in various configurations and using a voltmeter or LED display to monitor output. The results show that the power supply outputs the expected voltages, the LEDs light up in sequence, and the input generator and ADC board function as expected when inputs are applied.

Uploaded by

Kelvin Junio
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 21

EXPERIMENT NO.

ECE414EL - 02

Manual Testing Procedures of Parallel Port

Group Members: GABRIZ, Jerome H. JUGANAS, Leonand A. JUNIO, Kelvin G. GONZALES, Marie Grace M. GONZALO, Naylin Gail G.

Submitted to: Engr. Jefferson Walcien

Date: 13, 2011

I. EXPERIMENT OBJECTIVES 1. To check, verify and make sure that each module in the experiment board are all working. 2. To finalize all module area placement and fasten each to include wires and cables cleanup. II. EQUIPMENTS AND MATERIALS 8-bit LED display board 8-bit input generator board Power supply module Voltmeter III. EXPERIMENT PROCEDURES i. POWER SUPPLY 1. Double check the following before energizing your power supply module. a. The cathode of the rectifier diodes are with white band marking. The end taps (12V and 12V) of the transformer are connected to the anodes of the diodes. The center tap (0V) of the transformer is connected to GND in your power supply module. b. The negative terminal of the electrolytic capacitor used as filter is marked (-) on its body. The negative terminal is connected to GND. The voltage rating is likewise written on the body of the electrolytic capacitor. This voltage rating should be greater than the voltage across where the electrolytic capacitor is connected. c. The pin configuration of the voltage regulators LM7805 and LM7812 is IN-GND-OUT (labeling/marking in front). The TAB (exposed part at the back portion of the body) is connected to the GND pin of the IC. d. Check shorts, open and cold solder joints in your PCB. 2. To check: a. Connect a voltmeter at the output terminals of the module. b. Turn ON the power. Your voltmeter should display 5V at the output terminals of the LM7805 IC and 12V at the LM7812. The input to these ICs is approximately 15V. 3. Turn OFF the power ii. 8-BIT LED DISPLAY BOARDS

ADC board Parallel port interface board 10k Potentiometer Wire connectors

1. Connect the GND of your LED display board to the GND terminal of your power supply module. 2. Connect one end of your wire connector to the 5V terminal of your power supply. 3. Turn ON the power. 4. Connect the other end of your wire connector at the input terminals of your 8-bit LED display module one terminal at a time starting from the least significant bit (LSB) to the most significant bit (MSB). Your LEDs should turn ON one at a time from the LSB to the MSB. 5. Turn OFF the power.

iii. 8-BIT INPUT GENERATOR METHOD A: 1. Testing the PBNO (push button normally open) switches a. Connect the +5V and GND of your 8-bit input generator to the +5V and GND terminals of your power supply module. b. Connect a voltmeter at the LSB output terminal of your 8-bit input module. Make sure that the DIP switches are OFF (or better remove it in its socket). c. Turn ON the power. The voltmeter should display 5V. d. Press the PBNO switch. The reading on the voltmeter should drop to ZERO. e. Repeat test for the other bits of the 8-bit input generator. f. Turn OFF the power.

2. Testing the DIP (dual in-line package) switches a. Make sure that the DIP switches are OFF (or replace the DIP switches into its socket if it was removed in the previous procedure and set all switches to OFF). b. Connect a voltmeter at the LSB output terminal of your 8-bit input module. c. Turn ON the power. The voltmeter should display 5V.

d. Slide the LSB switch in the DIP ON. The reading on the voltmeter should drop to ZERO. Slide it back to OFF. The reading should go back to 5V. e. Repeat test for the other bits of the 8-bit input generator. f. Turn OFF the power. METHOD B: 1. Make sure that the DIP switches are OFF (or better remove it in its socket). 2. Connect the output terminal of your 8-bit input generator to the input terminal of your 8bit LED display module. 3. Turn ON the power. The LEDs should be ON. 4. Press the PBNO switches one at a time (from LSB to MSB). The LEDs on the LED display board should turn OFF one at a time. 5. Slide the LSB switch in the DIP ON. The LSB LED should turn OFF. Slide it back to OFF. Repeat procedure to check the other switches in the DIP. 6. Turn OFF the power. iv. ADC Board 1. Construct the circuit shown below.

This circuit will be used to provide the analog input signal of the ADC0804 during testing.

2. Connect the following pins of the ADC as described below: /CS( Chip Select)= GND

/RD( Read Data)= bit 1 of the 8-bit input generator /WR(Write Data)=bit 0 of the 8-bit input generator /INT(Interrupt)= any bit in your first 8-bit LED display module +IN= potentiometer output described in 1 DBO-DB7= connected to your second LED display board using your 8-bit wire connector AGND, DGND= GND of power supply Vcc= +5V of power supply

3. Turn ON the power. 4. Generate the control signals required in converting an analog signal to digital following the steps in conversion described on your photocopies (circuits). Monitor also the output signals in the conversion. Make sure that the DIP switches are OFF (or better remove it in its socket). The process of conversion for the ADC0804 is as follows: a. Set /WR and /RD. b. Reset /WR to start of conversion (SOC). c. Set /WR. d. Check /INT. /INT will be zero to indicate end of conversion (EOC). e. Reset /RD. f. Read data at the output pins (D0- D7) of the ADC. g. Set /RD.

h. Go back to (1) for the next conversion.

5. The outputs of the 8-bit input generator are high. /WR and /RD are therefore set to high already. 6. Reset /WR to start of the conversion. Press (then release) the LSB switch in your 8-bit input generator. Check the change of the state of the LED connected to /INT of the ADC. This indicates the end of the conversion of the analog input to digital signal. 7. Press the second switch used for /RD in your 8-bit input generator. Read the data displayed on your second LED display board (D0- D7). Release the switch. 8. Try the minimum, mid and maximum settings of the potentiometer while taking note of the digital output of the ADC. Repeat for several settings of the potentiometer. 9. Turn ON the power. v. PC PARALLEL PORT INTERFACE BOARD STANDARD PARALLEL PORT (SPP/NORMAL) OPERATION 1. Connect the following ports of the parallel port interface board as described below: Control port= connected to your first 8-bit LED display board Status port= connected to your 8-bit input generator board Data port= connected to your second 8-bit LED display board 2. Connect Data Port Control bit 2 to GND, bit 1 to +5V. Do not forget to connect the Vcc and GND pins of your parallel port interface board. 3. Testing the data port: a. Connect one end of a wire connector to +5V. b. Turn ON the power. c. Connect the other end of the wire connector to pin 2 (D0) of the DB25 (parallel port) male connector. The LSB LED on the 8-bit LED display module should turn ON.

d. Repeat (c). Connect the other end of the wire connector one at a time from pin 3 (D1) to pin 9 (D7) of the DB25 (parallel port) male connector as you monitor the LEDs in your 8-bit LED display module. e. Turn OFF the power.

4. Testing the control port: a. Connect one end of a wire connector to +5V. b. Turn ON the power. c. Connect the other end of the wire connector to pin 1 (strobe) of the DB25 (parallel port) male connector. The LSB LED on your second 8-bit LED display module should turn ON. d. Repeat (c). Connect the other end of the wire connector one at a time from pin 14 (auto line feed) to pin 16 (initialize printer) and pin 17 (select printer) of the DB25 (parallel port) male connector as you monitor the LEDs in your 8-bit LED display module. e. Turn OFF the power. Disconnect the wire connector to +5V.

5. Testing the status port: a. Make sure that the DIP switches are OFF (or better remove it in its socket). b. Turn ON the power. c. Measure the voltage at pin 15 (error) using a voltmeter. You should measure 5V. Press (then release) the PBNO #4 from LSB. The reading on the voltmeter should drop to ZERO the back to 5V. d. Repeat (c). Connect the voltmeter to pin 13 (select), to pin 12 (paper out), pin 10 (ack) and pin 11 (busy) of the DB25 (parallel port) male connector as you press (then release) the corresponding PBNO switches while monitoring the voltmeter readings. e. Turn OFF the power. Disconnect the voltmeter.

BI-DIRECTION MODE PARALLEL PORT OPERATION

1.

Connect the following ports of the parallel port interface board as described below: Control port= connected to your first 8-bit LED display board Status port= connected to your 8-bit input generator board Data port= connected to your 8-bit input generator board

2. Connect Data Port Control bit 2 and bit 1 to GND. Do not forget to connect the Vcc and GND pins of your parallel port interface board.

3. Testing the data port: a. Make sure that the DIP switches are OFF (or better remove it in its socket). b. Turn ON the power. c. Measure the voltage at pin 2 (D0) using a voltmeter. You should measure 5V. Press (then release) the PBNO #1 (LSB). The reading on the voltmeter should drop to ZERO the back to 5V. d. Repeat (c). Connect the voltmeter to pin 3 (D1), to pin 4 (D2), pin 5 (D3), pin 6 (D4), pin 7 (D5), pin 8 (D6), and pin 9 (D7) of the DB25 (parallel port) male connector as you press (then release) the corresponding PBNO switches while monitoring the voltmeter readings. e. Turn OFF the power. Disconnect the voltmeter. 4. Testing the control port: Similar to testing the control port in the SPP mode 5. Testing the status port: Similar to testing the status port in the SPP mode

IV. EXPERIMENT RESULTS 1. POWER SUPPLY MODULE After turning ON the power, we used a voltmeter to measure the voltage in each of the output terminals of the two transistors. As a result, we have measured 5 V at the output terminal of LM7805 and 12 V at the output terminal of LM7812. 2. 8-BIT LED DISPLAY All of the LEDs turned ON when we applied 5 V at the positive terminal of the LED display and grounded its negative terminal. 3. 8-BIT INPUT GENERATOR We connected the input generator to the LED display then after turning ON the power, all the LEDs turned ON. When we press the PBNO switches one by one, the LEDs turned OFF one by one. When we turned ON the DIP switch, all of the LEDs turned OFF. 4. ADC (ANALOG TO DIGITAL CONVERTER) We tested our ADC by connecting CS(pin 1) of the IC to GND, pin 2 to the bit 1 of the input generator, pin 3 to the bit 0 of the input generator, and pin 5 to a LED in our first LED display. We also connected the ADC to our second LED display. We used a 10k potentiometer to serve as an analog input to our ADC. After turning ON the power, one of the LED in our first LED display turned ON indicating that the ADC is working. The two PBNO switches in our input generator served as SET and RESET button. To further test it, we press SET button in the input generator and several LEDs in our second LED display turned ON. We varied the 10k potentiometer, we pressed the RESET button then pressed the SET button, the display in our second LED display changed. The display in our second LED display changes as we further vary the potentiometer. When the potentiometer is at its maximum value, all of the LEDs in our second LED display turned ON. But when the potentiometer is at its minimum value, all of the LEDs turned OFF. 5. PARALLEL PORT INTERFACE BOARD We tested our parallel port by connecting the status port to the 8-bit input generator, the control port to our first 8-bit LED display, data port to our second 8-bit LED display. We also connected one of the pins of the data port control to the ground and the other one to the 5V supply. After turning ON the power, all of the LEDs in our first LED display turned ON and four of the LEDs in our second LED display also turned ON. We used a connecting wire and put one of its end to GND and the other end to the pin 2 of the DB. As a result, one of the LEDs in of

first LED display turned OFF, the same thing happened when we connected the grounded connecting wire to pins 3, 4, 5, 6, 7, 8, and 9 of the DB. When we connected the grounded connecting wire to pin 1 of the DB, one of the LEDs in our second LED display turned OFF, and the same thing happened when we connected the grounded connecting wire to pins 14,16, and 17 of the DB. We tested the status port by using a voltmeter, we measured 5V at pin 15 of the DB and when we pressed the PBNO switch it became 0 V. We did the same to pins 10,11,12, and 13, and the same result is obtained. V. OBSERVATIONS We had observed that in the Power Supply Module, the voltages measured are not exactly but nearly 5V and 12V. In the 8-Bit LED Display Board, is a common anode circuit that needs a 5V input voltage so as to have the LEDs be activated. The 8-Bit Input Generator has a PBNO type of switch and a DIP switch that has a 5V and GND pin. This circuit is connected together with the 8-Bit LED Display board. The reactions of the LEDs depend on the switches. The ADC circuit is connected to the 8-Bit LED Display Board and to the 8-Bit input Generator Board. The ADC acts as a converter that when the outputs of the 8-bit input generator is high. The /WR and the /RD are set to high already. The state of the LED connected to /INT is changed whenever we reset /WR for conversion. In the Parallel Port circuit design, we tested it with the LEDs turned on. When the other end of the wire connector to pin 2 (D0) of the DB25 male connector, the LEDs connected at the other end turned off. VI. CONCLUSION It is therefore concluded that the boards we made compliment each other in a way that one circuit is used together with another circuit. The Power Supply is the main source of voltage of the boards. Each board, when used, is supplied with a 5V voltage. Each board was tested so as to know if the boards produce the required output. In our case, all of our boards have the correct output. VII. RECOMMENDATION The Group recommends, the future students who would be making the same project, that they should be careful when designing the PCB Layouts for when the layouts are not made properly, such as having thin wires and using a wrong kind of device, it would greatly affect the output of the project and it is a great loss in terms of effort, time and money. The Group also recommends other students to neatly and precisely position each device so as to prevent damage on the component and to not to destroy the PCB layout. All the boards

should be connected to a common ground and source to lessen the time connecting them one by one when ever experiments are conducted. The other wires used as jumpers should also be fixed in such a way that each wire dont intertwine with another. This would clear all paths when each board is used or connected to several other boards. VIII. APPENDICES Introduction to Parallel Ports The Parallel Port is the most commonly used port for interfacing home made projects. This port will allow the input of up to 9 bits or the output of 12 bits at any one given time, thus requiring minimal external circuitry to implement many simpler tasks. The port is composed of 4 control lines, 5 status lines and 8 data lines. It's found commonly on the back of your PC as a D-Type 25 Pin female connector. There may also be a D-Type 25 pin male connector. This will be a serial RS-232 port and thus, is a totally incompatible port. Newer Parallel Ports are standardized under the IEEE 1284 standard first released in 1994. This standard defines 5 modes of operation which are as follows, 1. Compatibility Mode. 2. Nibble Mode. (Protocol not Described in this Document) 3. Byte Mode. (Protocol not Described in this Document) 4. EPP Mode (Enhanced Parallel Port). 5. ECP Mode (Extended Capabilities Mode). The aim was to design new drivers and devices which were compatible with each other and also backwards compatible with the Standard Parallel Port (SPP). Compatibility, Nibble & Byte modes use just the standard hardware available on the original Parallel Port cards while EPP & ECP modes require additional hardware which can run at faster speeds, while still being downwards compatible with the Standard Parallel Port. Compatibility mode or "Centronics Mode" as it is commonly known, can only send data in the forward direction at a typical speed of 50 kbytes per second but can be as high as 150+ kbytes a second. In order to receive data, you must change the mode to either Nibble or Byte mode. Nibble mode can input a nibble (4 bits) in the reverse direction. E.g. from device to computer. Byte mode uses the Parallel's bi-directional feature (found only on some cards) to input a byte (8 bits) of data in the reverse direction. Extended and Enhanced Parallel Ports use additional hardware to generate and manage handshaking. To output a byte to a printer (or anything in that matter) using compatibility mode, the software must, 1. Write the byte to the Data Port. 2. Check to see is the printer is busy. If the printer is busy, it will not accept any

data, thus any data which is written will be lost. 3. Take the Strobe (Pin 1) low. This tells the printer that there is the correct data on the data lines. (Pins 2-9) 4. Put the strobe high again after waiting approximately 5 microseconds after putting the strobe low. (Step 3) This limits the speed at which the port can run at. The EPP & ECP ports get around this by letting the hardware check to see if the printer is busy and generate a strobe and /or appropriate handshaking. This means only one I/O instruction need to be performed, thus increasing the speed. These ports can output at around 1-2 megabytes per second. The ECP port also has the advantage of using DMA channels and FIFO buffers, thus data can be shifted around without using I/O instructions. Hardware Properties Below is a table of the "Pin Outs" of the D-Type 25 Pin connector and the Centronics 34 Pin connector. The D-Type 25 pin connector is the most common connector found on the Parallel Port of the computer, while the Centronics Connector is commonly found on printers. The IEEE 1284 standard however specifies 3 different connectors for use with the Parallel Port. The first one, 1284 Type A is the D-Type 25 connector found on the back of most computers. The 2nd is the 1284 Type B which is the 36 pin Centronics Connector found on most printers. IEEE 1284 Type C however, is a 36 conductor connector like the Centronics, but smaller. This connector is claimed to have a better clip latch, better electrical properties and is easier to assemble. It also contains two more pins for signals which can be used to see whether the other device connected, has power. 1284 Type C connectors are recommended for new designs, so we can look forward on seeing these new connectors in the near future. Pin No (DPin No Type 25) (Centronics) 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 SPP Signal nStrobe Data 0 Data 1 Data 2 Data 3 Data 4 Data 5 Data 6 Data 7 Direction Hardware Register In/out Inverted In/Out Out Out Out Out Out Out Out Out Control Data Data Data Data Data Data Data Data Yes

10 11 12 13 14 15 16 17 18 - 25

10 11 12 13 14 32 31 36 19-30

nAck Busy Paper-Out / Paper-End Select nAutoLinefeed nError / nFault nInitialize nSelectPrinter / nSelect-In Ground

In In In In In/Out In In/Out In/Out Gnd

Status Status Status Status Control Status Control Control Yes Yes Yes

Table 1. Pin Assignments of the D-Type 25 pin Parallel Port Connector. The above table uses "n" in front of the signal name to denote that the signal is active low. e.g. nError. If the printer has occurred an error then this line is low. This line normally is high, should the printer be functioning correctly. The "Hardware Inverted" means the signal is inverted by the Parallel card's hardware. Such an example is the Busy line. If +5v (Logic 1) was applied to this pin and the status register read, it would return back a 0 in Bit 7 of the Status Register. The output of the Parallel Port is normally TTL logic levels. The voltage levels are the easy part. The current you can sink and source varies from port to port. Most Parallel Ports implemented in ASIC, can sink and source around 12mA. However these are just some of the figures taken from Data sheets, Sink/Source 6mA, Source 12mA/Sink 20mA, Sink 16mA/Source 4mA, Sink/Source 12mA. As you can see they vary quite a bit. The best bet is to use a buffer, so the least current is drawn from the Parallel Port. Port Addresses The Parallel Port has three commonly used base addresses. These are listed in table 2, below. The 3BCh base address was originally introduced used for Parallel Ports on early Video Cards. This address then disappeared for a while, when Parallel Ports were later removed from Video Cards. They has now reappeared as an option for Parallel Ports integrated onto motherboards, upon which their configuration can be changed using BIOS. LPT1 is normally assigned base address 378h, while LPT2 is assigned 278h. However this may not always be the case as explained later. 378h & 278h have always been

commonly used for Parallel Ports. The lower case h denotes that it is in hexadecimal. These addresses may change from machine to machine.

Address 3BCh - 3BFh 378h - 37Fh 278h - 27Fh

Notes: Used for Parallel Ports which were incorporated on to Video Cards - Doesn't support ECP addresses Usual Address For LPT 1 Usual Address For LPT 2 Table 2 Port Addresses

When the computer is first turned on, BIOS (Basic Input/Output System) will determine the number of ports you have and assign device labels LPT1, LPT2 & LPT3 to them. BIOS first looks at address 3BCh. If a Parallel Port is found here, it is assigned as LPT1, then it searches at location 378h. If a Parallel card is found there, it is assigned the next free device label. This would be LPT1 if a card wasn't found at 3BCh or LPT2 if a card was found at 3BCh. The last port of call, is 278h and follows the same procedure than the other two ports. Therefore it is possible to have a LPT2 which is at 378h and not at the expected address 278h. What can make this even confusing, is that some manufacturers of Parallel Port Cards, have jumpers which allow you to set your Port to LPT1, LPT2, LPT3. Now what address is LPT1? - On the majority of cards LPT1 is 378h, and LPT2, 278h, but some will use 3BCh as LPT1, 378h as LPT1 and 278h as LPT2. Life wasn't meant to be easy. The assigned devices LPT1, LPT2 & LPT3 should not be a worry to people wishing to interface devices to their PC's. Most of the time the base address is used to interface the port rather than LPT1 etc. However should you want to find the address of LPT1 or any of the Line PrinTer Devices, you can use a lookup table provided by BIOS. When BIOS assigns addresses to your printer devices, it stores the address at specific locations in memory, so we can find them. Start Address 0000:0408 0000:040A 0000:040C 0000:040E Function LPT1's Base Address LPT2's Base Address LPT3's Base Address LPT4's Base Address (Note 1)

Table 3 - LPT Addresses in the BIOS Data Area; Note 1 : Address 0000:040E in the BIOS Data Area may be used as the Extended Bios Data Area in PS/2 and newer Bioses.

Software Registers - Standard Parallel Port (SPP) Offset Name Read/Write Write (Note-1) Bit No. Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Table 4 Data Port Note 1 : If the Port is Bi-Directional then Read and Write Operations can be performed on the Data Register. The base address, usually called the Data Port or Data Register is simply used for outputting data on the Parallel Port's data lines (Pins 2-9). This register is normally a write only port. If you read from the port, you should get the last byte sent. However if your port is bi-directional, you can receive data on this address. See Bi-directional Ports for more detail. Offset Base + 1 Name Status Port Read/Write Read Only Bit No. Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Table 5 Status Port The Status Port (base address + 1) is a read only port. Any data written to this port will be ignored. The Status Port is made up of 5 input lines (Pins 10,11,12,13 & 15), a IRQ status register and two reserved bits. Please note that Bit 7 (Busy) is a active low input. Properties Busy Ack Paper Out Select In Error IRQ (Not) Reserved Reserved Properties Data 7 Data 6 Data 5 Data 4 Data 3 Data 2 Data 1 Data 0

Base + 0 Data Port

E.g. If bit 7 happens to show a logic 0, this means that there is +5v at pin 11. Likewise with Bit 2. (nIRQ) If this bit shows a '1' then an interrupt has not occurred. Offset Base + 2 Name Control Port Read/Write Read/Write Bit No. Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Table 6 Control Port The Control Port (base address + 2) was intended as a write only port. When a printer is attached to the Parallel Port, four "controls" are used. These are Strobe, Auto Linefeed, Initialize and Select Printer, all of which are inverted except Initialize. The printer would not send a signal to initialize the computer, nor would it tell the computer to use auto linefeed. However these four outputs can also be used for inputs. If the computer has placed a pin high (e.g. +5v) and your device wanted to take it low, you would effectively short out the port, causing a conflict on that pin. Therefore these lines are "open collector" outputs (or open drain for CMOS devices). This means that it has two states. A low state (0v) and a high impedance state (open circuit). Normally the Printer Card will have internal pull-up resistors, but as you would expect, not all will. Some may just have open collector outputs, while others may even have normal totem pole outputs. In order to make your device work correctly on as many Printer Ports as possible, you can use an external resistor as well. Should you already have an internal resistor, then it will act in Parallel with it, or if you have Totem pole outputs, the resistor will act as a load. An external 4.7k resistor can be used to pull the pin high. I wouldn't use anything lower, just in case you do have an internal pull up resistor, as the external resistor would act in parallel giving effectively, a lower value pull up resistor. When in high impedance state the pin on the Parallel Port is high (+5v). When in this state, your external device can pull the pin low and have the control port change read a different value. This way the 4 pins of the Control Port can be used for bi-directional data transfer. However the Properties Unused Unused Enable Bi-Directional Port Enable IRQ Via Ack Line Select Printer Initialize Printer (Reset) Auto Linefeed Strobe

Control Port must be set to xxxx0100 to be able to read data, that is all pins to be +5v at the port so that you can pull it down to GND (logic 0). Bits 4 & 5 are internal controls. Bit four will enable the IRQ (See Using the Parallel Ports IRQ) and Bit 5 will enable the bi-directional port meaning that you can input 8 bits using (DATA0-7). This mode is only possible if your card supports it. Bits 6 & 7 are reserved. Any writes to these two bits will be ignored. Using The Parallel Port to Input 8 Bits If your Parallel Port doesn't support bi-directional mode, don't despair. You can input a maximum of 9 bits at any one given time. To do this you can use the 5 input lines of the Status Port and the 4 inputs (open collector) lines of the Control Port.

The inputs to the Parallel Port has be chosen as such, to make life easier for us. Busy just happens to be the MSB (Bit 7) of the Status Port, then in ascending order comes Ack, Paper Out and Select, making up the most significant nibble of the Control Port. The Bars are used to represent which inputs are Hardware inverted, i.e. +5v will read 0 from the register, while GND will read 1. The Status Port only has one inverted input. The Control port is used to read the least significant nibble. As described before, the control port has open collector outputs, i.e. two possible states, high impedance and GND. If we connect our inputs directly to the port (For example an ADC0804 with totem pole outputs), a conflict will result if the input is high and the port is trying to pull it down. Therefore we use open collector inverters. However this is not always entirely necessary. If we were connecting single pole switches to the port with a pull up resistor, then there is no need to bother with this protection. Also if your software initializes the control port with xxxx0100 so that all the pins on the control port are high, then it may be unnecessary. If however you don't bother and your device is connected to the Parallel Port before your software has a chance to initialize then you may encounter problems.

Another problem to be aware of is the pull up resistors on the control port. The average pull-up resistor is 4.7k. In order to pull the line low, your device will need to sink 1mA, which some low powered devices may struggle to do. Now what happens if I suggest that some ports have 1K pull up resistors? Yes, there are such cards. Your device now has to sink 5mA. More reason to use the open collector inverters. Open collector inverters were chosen over open collector buffers as they are more popular, and thus easier to obtain. There is no reason, however why you can't use them. Another possibility is to use transistors. ANALOG-TO-DIGITAL CONVERTER An analog-to-digital converter (abbreviated ADC, A/D or A to D) is a device that converts a continuous quantity to a discrete time digital representation. An ADC may also provide an isolated measurement. The reverse operation is performed by a digital-to-analog converter (DAC). Typically, an ADC is an electronic device that converts an input analog voltage or current to a digital number proportional to the magnitude of the voltage or current. However, some non-electronic or only partially electronic devices, such as rotary encoders, can also be considered ADCs. The digital output may use different coding schemes. Typically the digital output will be a two's complement binary number that is proportional to the input, but there are other possibilities. An encoder, for example, might output a Gray code. Most ADCs are linear types. The term linear implies that the range of input values has a linear relationship with the output value. Some early converters had a logarithmic response to directly implement A-law or -law coding. These encodings are now achieved by using a higherresolution linear ADC (e.g. 12 or 16 bits) and mapping its output to the 8-bit coded values. An ADC has several sources of errors. Quantization error and (assuming the ADC is intended to be linear) non-linearity are intrinsic to any analog-to-digital conversion. There is also a so-called aperture error which is due to a clock jitter and is revealed when digitizing a time-variant signal (not a constant value). These errors are measured in a unit called the least significant bit (LSB). In the above example of an eight-bit ADC, an error of one LSB is 1/256 of the full signal range, or about 0.4%. Applications Music recording ADCs are integral to current music reproduction technology. Since much music production is done on computers, when an analog recording is used, an ADC is needed to create the PCM data stream that goes onto a compact disc or digital music file. The current crop of AD converters utilized in music can sample at rates up to 192 kilohertz. High bandwidth headroom allows the use of cheaper or faster anti-aliasing filters of less severe filtering slopes. The proponents of oversampling assert that such shallower anti-aliasing filters produce less

deleterious effects on sound quality, exactly because of their gentler slopes. Others prefer entirely filterless AD conversion, arguing that aliasing is less detrimental to sound perception than pre-conversion brickwall filtering. Considerable literature exists on these matters, but commercial considerations often play a significant role. Most [citation needed] high-profile recording studios record in 24-bit/192-176.4 kHz PCM or in DSD formats, and then downsample or decimate the signal for Red-Book CD production (44.1 kHz) or to 48 kHz for commonly used for radio/TV broadcast applications. Digital Signal Processing AD converters are used virtually everywhere where an analog signal has to be processed, stored, or transported in digital form. Fast video ADCs are used, for example, in TV tuner cards. Slow on-chip 8, 10, 12, or 16 bit ADCs are common in microcontrollers. Very fast ADCs are needed in digital oscilloscopes, and are crucial for new applications like software defined radio. Electrical Symbol

IX. BIBLIOGRAPHY http://www.beyondlogic.org/spp/parallel.htm http://en.wikipedia.org/wiki/Analog-to-digital_converter

You might also like