Connect with us

Manage parallel port output

Discussion in 'Electronic Basics' started by sanforall, Apr 27, 2006.

Scroll to continue with content
  1. sanforall

    sanforall Guest

    Respected Members,
    I'm trying to control devices using parallel port. But how can i split
    the 8 bit digital output to 256 output signals. Is there is any method
    for spliting up the 8 bit digital output from the parallel port. Give
    me the IC or demultiplexer details please........
  2. Chris

    Chris Guest

    Hi, Sanforall. As a straightforward digital logic problem, you will
    need more than 8 bits to get 256 output signals, unless you just want
    to have only one on at a time.

    Usually, with decoders and data latches, you'd have the data output,
    then you'd also need control bits. You don't have quite enough to get
    to 256, because you need both data and control.

    If you need mass quantities of I/O bits from a printer port, and you
    don't need microsecond resolution, you might want to look at
    daisy-chaining 32 ea. 74HC595 ICs. These are 8-bit serial input -
    parallel output shift registers with data latches. You can do this
    with printer port pins to spare. If you have 32 of these ICs (not
    totally unrealistic with decent layout, and they're around $1 USD
    apiece), you can shift your 32 8-bit data words out the parallel port
    one bit at a time, using the clock signal to shift forward after each
    bit, then using the latch clock to assert the new data at the output
    once your shifting is complete.

    If you're building this, keep your wiring runs short to avoid having
    noise munging your data. You should have this assembly as close to the
    printer port as possible. No ten foot printer cables. Also, use good
    layout practices on the board, and use a decoupling capacitor for each
    IC. Power glitches will cause big headaches here.

    As a practical matter, programming is very easy and straightforward to
    do with DOS and in assembler. But if you're using Windows, the
    software end of it might get to be a bit of a problem. One good
    resource for utilizing the PC printer port is Jan Axelson's "Printer
    Port Complete", available from many hobbyist sources such as Jameco, or
    from the Lakeview Research webste

    Look at the webpage for more hints. The book also has a software CD
    which will help with programming in VB or other languages.

    Good luck
  3. Bob Masta

    Bob Masta Guest

    To control 256 output signals from an 8-bit data port, you need
    32 x 8-bit latches and a 1-of-32 selector. That selector takes
    5 data bits. The printer control port can supply those, but
    may take some finagling since some pins are inverted and
    some need pull-ups, etc. So instead, you can use one bit
    of the control port to select a "mode": In one state, the
    data port output will go to an address latch, whose output
    goes to the multiplexer address pins. In the other state, the data
    port output will go to the multiplexer input, and hence be
    directed to the proper output latch. You can use a second
    control bit to do the actual strobing of address or data, once
    the mode is selected. This way, you can (in principle) have
    up to 256 x8-bit latched outputs... 65536 in all! And you
    can update any 8-bit subset of these in only a few operations,
    copmpared to a complete serial approach.

    Best regards,

    Bob Masta

    D A Q A R T A
    Data AcQuisition And Real-Time Analysis
    Home of DaqGen, the FREEWARE signal generator
  4. flank

    flank Guest

    I have just started on a similar project, and I am having a hard
    time getting my c code to send anything to the port. Have you been
    successful with your code? If so, would you please post it so that I
    could use it.

  5. Ah, well I advise to learn something more about the parallel port. A well
    known source is
    Pay special attention to the Enhanced Parallel Port as IMHO this is the most
    easy way to implement what you need. On almost all modern PCs the parallel
    printer port can be setup for EPP in the BIOS. Keep in mind that you also
    may need a device driver. Information on the same site.

    As for the hardware you use the address strobe to clock the required address
    in a LS364 like buffer. Its outputs has to drive an address decoder wich can
    be build using LS138 like decoders. You need to decode 32 of the 256
    possible addresses. AND each decoded address line with the data strobe of
    parallel port to clock data in 32 LS364 type data buffers.

    petrus bitbyter
  6. Si Ballenger

    Si Ballenger Guest

    I've got some pages below that have some simple parallel port
    control setups. If your OS is win NT/2K/XP, you will need to have
    a driver that allows user level access to the hardware (I use
    userport). Getting 256 seperate outputs from 8 bits might be a
    bit tricky. If you can also use the parallel port control pins in
    addition to the data pins, you can control a lot more than 256
    outputs. I like to use the 74hct259 chips which are cheap. Bottom
    link shows a different chip setup that controls ~388 strings of
    christmas lights. You can write simple control applications using
    notepd and batch files.
  7. Jasen Betts

    Jasen Betts Guest

    what do you want from these 256 signals - do you want to be able to have
    more than one of them on at a time etc...

  8. Jasen Betts

    Jasen Betts Guest

    with the right glue logic the strobe and ack pins on the printer port could
    be used to clock the data into the chips. making writing to the device as
    simple as writing binary data to a real printer. no assembler needed.

  9. Chris

    Chris Guest

    Yes. I kind of read this to be a homework problem. Even with a SPP,
    this is very doable (although a little unwieldly). To get 32 CS you'd
    need an extra 4 ICs (e.g. HC138), plus some gates.

Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day