This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to drive parallel port printer through microcontroller

hii all,

     I am using tm4c129 controller i want to drive parallel port printer through my controller. Which hardware interfacing or IC should i use in between micro controller and printer.

     

  • sagar salunkhe said:
    I want to drive parallel port printer through my controller.

    Are ALL parallel printer ports (exactly) the same?   Some specific details regarding your device would prove useful - would they not?

    In general - your dedication of one full (8 bit) parallel MCU port and one half (4 bit) parallel MCU port should prove sufficient.  

    Unknown is the voltage level which the printer requires - note that your MCU can output (only) up to 3V3.  (which I expect to be insufficient)   A safe way to manage this is via your use of voltage buffer/translator ICs - which receive the MCU's 3V3 and then "translate up" to a higher voltage.   (ideally one which matches the requirement of your printer)   This voltage translation is likely required at (both) the printer's data bus AND the control and strobe signals.

    Be sure to tie the MCU and printer's "signal" ground together so that such "common frame of reference exists."

  • Sagar,

    Other information that might prove useful in deciding on an interface chip would be the type of interface required by the printer. I would guess that different types of printers require different types of interfaces. Also, do you plan to have parallel data output from the TM4C or do you want to employ a chip to convert the serial data to parallel and vice versa?

    Have you considered contacting a distributor to see what they might recommend? Often they are far more familiar with the offerings of these types of devices than we might be. Or, perhaps, reaching out to the printer manufacturer to see what they might recommend?
  • Re: "Type of Interface:" Poster DID specify parallel port printer. Normal/customary in such cases would be (additional) strobe & (maybe) control bits - which also must undergo voltage translation to appropriate levels...

    Employing MCU's UART (to achieve your proposed serial data) is likely to (still) require voltage translation - this time up-level converting the (now added) "Serial In - Parallel Out" device's levels to those compatible w/the printer.   I stand by the use of MCU's parallel port (+ half additional port) - both followed by V translators - as BEST MEANS to achieve poster's objective...  (i.e. simpler & more compact)  

    Where the UART (serial) suggestion (really) breaks down is the (almost certain) requirement for the parallel data port's requiring, "Strobing & Control Signals" - both difficult to "tease out" from a single, 8 bit UART!   Q.E.D.

  • Chuck ,
    I have added 4094 for converting my serial data to parallel data in 8 bit form. But 4094 is unable to drive printer its current rating is low.
    pdf1.alldatasheet.com/.../TC4094BP.html
    data sheet link for my IC.
    I want to drive EPSON LX310 parallel port printer through 4094, but 4094 is unable to drive it. Which IC should I use.
  • How about a real bus line driver IC, like this one ?

    You would need two of them, and perhaps level shifting logic ...

  • Hi,

    Sagar, I do not understand why are you struggling with the parallel interface while your printer has a full speed USB 2.0 interface available and that suppose no special hardware to be added.

    Also, what about some software - do you have all details to implement a suitable driver  ?

    Note also the parallel interface inside the printer is a bi-directional one, meanning you have more problems to solve...

  • Note also the parallel interface inside the printer is a bi-directional one, meanning you have more problems to solve...

    He might be aiming for the simpler "centronics" port, which has just unidirectional data flow, not the EPP and ECP modes of IEEE1284.

    And, judging by the size of the USB standard documents, I would avoid USB if not necessary (KISS), or I have a known, stable implementation at hand.

  • Thank you all, i have already implemented printer with USB interfacing. But i also wanted to implement it with parallel port. Now in my circuit i added a buffer after my 4094 I C and it is working fine now.
  • Hello Sagar,

    I am pleased that you were able to get to a solution. Hopefully, the inputs of the community members were beneficial. This case is one which helps reinforce the benefit of this community in that those of us at TI are not necessarily experts in all potential use cases of the uC; but, within this community, there most certainly will be someone or even multiple someones that have said experience and can offer some guidance and suggestions.

    Cheers to all that pitch in on a daily, weekly, or even occasional help on this forum. It is greatly appreciated!!

  • One suggestion Sagar, you may want to consider an isolated driver. Printers tend to be noisy and may well have grounds elevated from your board even if they share a power supply.

    Robert
  • And - while glad that "everything is working" - most always such printers require a "strobe and/or control signal" in addition to 8 bit, parallel data.

    We are curious as to "how" you managed the strobe signal (pulse) and control signals - assuming your serial data was limited to 8 bits. (which may not prove true if SPI was employed)