Because of the standard LPT printer parallel port can only send data and can not receive data, so I decided to make this LPT port extender card to improve the capability of that matter. Standard LPT have 8-bit DP (Data Port), 5-bit PS (Status Port) and 4-bit PC (Control Port). This bits divided by 8+4 bits of output bits and 5 bits of input bits. To get the 8-bit input and output port, we used a nibble of this real input and output port to simulate of a byte of input and output port (bi-directional port) by the control bits of course we used 2 bits of the DP port.
Here are the implementation :
  • Nibble Output = 4-bit PC (PC-0 ~ PC-3, Note that PC-0, PC-1, PC3 are inverted output. First & second nibble are controlled by the software).
  • Nibble Input = 4-bit PS (PS-4 ~ PS-7, Note that PS-7 is inverted input. First & second nibble are also controlled by the software too).
  • Control bits = 2 bits of DP (DP-6 ~ controlled for lo-nibble & hi-nibble, DP-7 ~ controlled data direction). 

    click the image for zooming

    Fig.1. LPT port extender schematic diagram.

     Parts List :
      Hex Inverter (74LS04) ............................1 pcs
      Quad NAND gates (74LS00) ......................... 1 pcs
      Quad Latch (74LS173) ............................. 2 pcs
      Octal 3-State buffer (74LS244) ................... 1 pcs
      100 nF ........................................... 5 pcs
      DB-25 Socket male/female .........................1 pair
      Cable (0.25 sq x 19c) ............................3 m

    Figure 1. shows the schematic diagram for this LPT extender. The condition of the logic state are show in this tabel :



    Data (Q) 










    0/1  0/1  Q'  Hi-Z  Hi-Z  Lo-Nibble Data Out 
    0/1 Q'  0/1  Hi-Z  Hi-Z  Hi-Nibble Data Out 
    0/1  Hi-Z  Hi-Z  0/1  Hi-Z  Lo-Nibble Data In 
    0/1  Hi-Z  Hi-Z  Hi-Z  0/1  Hi-Nibble Data In 
    Tabel.1. Logic state of the LPT port extender.
    One of the PCB design layout shown in fig.2. This use single side PCB, so it has a lot of jumper wire. You can make another design if you want, but this one is work well (my prototype).
    Fig.2. LPT port extender PCB layout.
    Here is the software example written in Pascal language style :
        LPT_Port     = (LPT_1, LPT_2, LPT_3, No_LPT);
         DP          : ARRAY[LPT_Port] OF WORD = ($3BC, $278, $378, $3BC);    { Data Port }
         PS          : ARRAY[LPT_Port] OF WORD = ($3BD, $279, $379, $3BD);    { Status Port }
         PC          : ARRAY[LPT_Port] OF WORD = ($3BE, $27A, $37A, $3BE);    { Control Port }
       Port_DP            : WORD;
       Port_PC            : WORD;
       Port_PS            : WORD;
       LPT                : LPT_Port;
    PROCEDURE Out_Port(Data : BYTE);
       Temp : BYTE;
         Temp := PORT[Port_DP];
         PORT[Port_PC] := (Data AND $0F);
         PORT[Port_DP] := (Temp AND $3F);
         PORT[Port_PC] := ((Data SHR 4) AND $0F);
         PORT[Port_DP] := ((Temp AND $3F) OR $40);
    FUNCTION In_Port : BYTE;
       Temp : BYTE;
       Data : BYTE;
         Data := 0;
         Temp := PORT[Port_DP];
         Temp := Temp AND $3F;
         PORT[Port_DP] := (Temp OR $80);
         Data := ((PORT[Port_PS] AND $F0) SHR 4);
         PORT[Port_DP] := (Temp OR $C0);
         Data := (Data OR (PORT[Port_PS] AND $F0));
         In_Port := Data;
    To access the port just simple, use the statement Data_Read := In_Port; to read in the data and Out_Port(Data_Write); to write out the data, and so on ... and so on ....
    PCB Mounting. It is very simple to put the whole unit on a piece of board like showing in the figure.3. But all of this depends of your design idea. I prefer to place all of it on the board and not in the box, because it will be more easy to make some test to the circuit or to make some measuring voltages or logics. 
    Fig.3. LPT port extender PCB mounting.
    Fig.4. LPT port extender prototype card.

No comments:

Post a Comment


PROJECTS 8086 PIN CONFIGURATION 80X86 PROCESSORS TRANSDUCERS 8086 – ARCHITECTURE Hall-Effect Transducers INTEL 8085 OPTICAL MATERIALS BIPOLAR TRANSISTORS INTEL 8255 Optoelectronic Devices Thermistors thevenin's theorem MAXIMUM MODE CONFIGURATION OF 8086 SYSTEM ASSEMBLY LANGUAGE PROGRAMME OF 80X86 PROCESSORS POWER PLANT ENGINEERING PRIME MOVERS 8279 with 8085 MINIMUM MODE CONFIGURATION OF 8086 SYSTEM MISCELLANEOUS DEVICES MODERN ENGINEERING MATERIALS 8085 Processor- Q and A-1 BASIC CONCEPTS OF FLUID MECHANICS OSCILLATORS 8085 Processor- Q and A-2 Features of 8086 PUMPS AND TURBINES 8031/8051 MICROCONTROLLER Chemfet Transducers DIODES FIRST LAW OF THERMODYNAMICS METHOD OF STATEMENTS 8279 with 8086 HIGH VOLTAGE ENGINEERING OVERVOLATGES AND INSULATION COORDINATION Thermocouples 8251A to 8086 ARCHITECTURE OF 8031/8051 Angle-Beam Transducers DATA TRANSFER INSTRUCTIONS IN 8051/8031 INSTRUCTION SET FOR 8051/8031 INTEL 8279 KEYBOARD AND DISPLAY INTERFACES USING 8279 LOGICAL INSTRUCTIONS FOR 8051/8031 Photonic Transducers TECHNOLOGICAL TIPS THREE POINT STARTER 8257 with 8085 ARITHMETIC INSTRUCTIONS IN 8051/8031 LIGHTNING PHENOMENA Photoelectric Detectors Physical Strain Gage Transducers 8259 PROCESSOR APPLICATIONS OF HALL EFFECT BRANCHING INSTRUCTIONS FOR 8051/8031 CPU OF 8031/8051 Capacitive Transducers DECODER Electromagnetic Transducer Hall voltage INTEL 8051 MICROCONTROLLER INTEL 8251A Insulation Resistance Test PINS AND SIGNALS OF 8031/8051 Physical Transducers Resistive Transducer STARTERS Thermocouple Vacuum Gages USART-INTEL 8251A APPLICATIONs OF 8085 MICROPROCESSOR CAPACITANCE Data Transfer Instructions In 8086 Processors EARTH FAULT RELAY ELECTRIC MOTORS ELECTRICAL AND ELECTRONIC INSTRUMENTS ELECTRICAL BREAKDOWN IN GASES FIELD EFFECT TRANSISTOR (FET) INTEL 8257 IONIZATION AND DECAY PROCESSES Inductive Transducers Microprocessor and Microcontroller OVER CURRENT RELAY OVER CURRENT RELAY TESTING METHODS PhotoConductive Detectors PhotoVoltaic Detectors Registers Of 8051/8031 Microcontroller Testing Methods ADC INTERFACE AMPLIFIERS APPLICATIONS OF 8259 EARTH ELECTRODE RESISTANCE MEASUREMENT TESTING METHODS EARTH FAULT RELAY TESTING METHODS Electricity Ferrodynamic Wattmeter Fiber-Optic Transducers IC TESTER IC TESTER part-2 INTERRUPTS Intravascular imaging transducer LIGHTNING ARRESTERS MEASUREMENT SYSTEM Mechanical imaging transducers Mesh Current-2 Millman's Theorem NEGATIVE FEEDBACK Norton's Polarity Test Potentiometric transducers Ratio Test SERIAL DATA COMMUNICATION SFR OF 8051/8031 SOLIDS AND LIQUIDS Speed Control System 8085 Stepper Motor Control System Winding Resistance Test 20 MVA 6-digits 6-digits 7-segment LEDs 7-segment A-to-D A/D ADC ADVANTAGES OF CORONA ALTERNATOR BY POTIER & ASA METHOD ANALOG TO DIGITAL CONVERTER AUXILIARY TRANSFORMER AUXILIARY TRANSFORMER TESTING AUXILIARY TRANSFORMER TESTING METHODS Analog Devices A–D BERNOULLI’S PRINCIPLE BUS BAR BUS BAR TESTING Basic measuring circuits Bernoulli's Equation Bit Manipulation Instruction Buchholz relay test CORONA POWER LOSS CURRENT TRANSFORMER CURRENT TRANSFORMER TESTING Contact resistance test Current to voltage converter DAC INTERFACE DESCRIBE MULTIPLY-EXCITED Digital Storage Oscilloscope Display Driver Circuit E PROMER ELPLUS NT-111 EPROM AND STATIC RAM EXCITED MAGNETIC FIELD Electrical Machines II- Exp NO.1 Energy Meters FACTORS AFFECTING CORONA FLIP FLOPS Fluid Dynamics and Bernoulli's Equation Fluorescence Chemical Transducers Foil Strain Gages HALL EFFECT HIGH VOLTAGE ENGG HV test HYSTERESIS MOTOR Hall co-efficient Hall voltage and Hall Co-efficient High Voltage Insulator Coating Hot-wire anemometer How to Read a Capacitor? IC TESTER part-1 INSTRUMENT TRANSFORMERS Importance of Hall Effect Insulation resistance check Insulator Coating Knee point Test LEDs LEDs Display Driver LEDs Display Driver Circuit LM35 LOGIC CONTROLLER LPT LPT PORT LPT PORT EXPANDER LPT PORT LPT PORT EXTENDER Life Gone? MAGNETIC FIELD MAGNETIC FIELD SYSTEMS METHOD OF STATEMENT FOR TRANSFORMER STABILITY TEST METHODS OF REDUCING CORONA EFFECT MULTIPLY-EXCITED MULTIPLY-EXCITED MAGNETIC FIELD SYSTEMS Mesh Current Mesh Current-1 Moving Iron Instruments Multiplexing Network Theorems Node Voltage Method On-No Load And On Load Condition PLC PORT EXTENDER POTIER & ASA METHOD POWER TRANSFORMER POWER TRANSFORMER TESTING POWER TRANSFORMER TESTING METHODS PROGRAMMABLE LOGIC PROGRAMMABLE LOGIC CONTROLLER Parallel Port EXPANDER Paschen's law Piezoelectric Wave-Propagation Transducers Potential Transformer RADIO INTERFERENCE RECTIFIERS REGULATION OF ALTERNATOR REGULATION OF THREE PHASE ALTERNATOR Read a Capacitor SINGLY-EXCITED SOLIDS AND LIQUIDS Classical gas laws Secondary effects Semiconductor strain gages Speaker Driver Strain Gages Streamer theory Superposition Superposition theorem Swinburne’s Test TMOD TRANSFORMER TESTING METHODS Tape Recorder Three-Phase Wattmeter Transformer Tap Changer Transformer Testing Vector group test Virus Activity Voltage Insulator Coating Voltage To Frequency Converter Voltage to current converter What is analog-to-digital conversion Windows work for Nokia capacitor labels excitation current test magnetic balance voltage to frequency converter wiki electronic frequency converter testing voltage with a multimeter 50 hz voltages voltmeter

Search More Posts