Shop OBEX P1 Docs P2 Docs Learn Events
Centronics Parallel? — Parallax Forums

Centronics Parallel?

Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
edited 2008-08-01 02:49 in Propeller 1
Has anyone done a Centronics compatible parallel printer interface
with the Propeller yet?

Thanks
OBC

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?

Getting started with the Protoboard? - Propeller Cookbook 1.4
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card? - PropDOS
Need a part? Got spare electronics? - The Electronics Exchange

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-07-31 22:54
    You would need some kind of level translation to 5V logic. It would also take a lot of I/O pins unless you use some kind of I/O expander. You would need to specify what kind of Centronics interface as well since there are 4-bit bidirectional, 8-bit unidirections, 8-bit bidirectional, etc. What would you want to use it for?
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-07-31 23:04
    I'd like to attach a printer to the Prop. Something like an Epson compatible.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange
  • SapiehaSapieha Posts: 2,964
    edited 2008-07-31 23:39
    Hi Oldbitcollector

    Centronix Pararel is one half on Intel 8255 IO Port.
    It is on forum how interface it tu Propeller.
    It neds only Centronix protokol programing.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nothing is impossible, there are only different degrees of difficulty.

    Sapieha
  • Harrison.Harrison. Posts: 484
    edited 2008-08-01 00:54
    If you are interfacing to a text based printer (dot matrix / laser) then all you need to do is send out your ASCII character to D0-D7 and toggle the STROBE line. You'll also have to reset the printer with the INIT line, and tie a few other pins to gnd to get the printer to play nicely. Some printers will also require you to poll the BUSY signal to make sure the printer is ready.

    Attached is some code I wrote 5 years ago for PICs (it uses a basic variant simliar to the PBasic/SXB). The code worked great on an older epson dot matrix printer I had laying around.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-08-01 02:25
    @Harrison Awesome code! Thank you!

    The only thing I don't understand how to translate is how to convert an ASCII code to binary across
    P0-P7 If someone can show me an example I'd appreciate it. Looks like an EPSON driver for
    the prop is in order...

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange
  • Harrison.Harrison. Posts: 484
    edited 2008-08-01 02:35
    For the prop it would be as easy as: OUTA[noparse][[/noparse]7..0] := "A"
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-08-01 02:40
    Sheesh... I'm reading the Spin manual for the fourth time...

    Two years of playing with this thing and there is still much to learn...
    Figures it was a one word command... tongue.gif

    Thanks
    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange
  • TimmooreTimmoore Posts: 1,031
    edited 2008-08-01 02:43
    @harrison, any reason you write cr twice to the printer?
  • Harrison.Harrison. Posts: 484
    edited 2008-08-01 02:49
    Timmoore,
    I never noticed that! I guess it just worked so I never noticed that mistake. The printer probably just moved the head back to the beginning of the line twice. No harm done, just makes it slightly slower I guess.

    Oldbitcollector,
    Yea, I forget how simple things are sometimes too. SPIN just has so many little things that can be easily forgotten.

    Post Edited (Harrison.) : 8/1/2008 2:57:25 AM GMT
Sign In or Register to comment.