Shop OBEX P1 Docs P2 Docs Learn Events
Propeller To Printer Interfacing — Parallax Forums

Propeller To Printer Interfacing

idbruceidbruce Posts: 6,197
edited 2012-10-19 10:35 in Propeller 1
I was wondering if anyone has attempted to control a printer or print data from the Propeller chip. If so, where can I find the information. Links please.

Bruce

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-10-17 16:19
    What interface? RS232? Centronics? USB? Bluetooth? Except for its control protocol, a printer is just another device like any other, once the hardware connectivity has been established.

    -Phil
  • lanternfishlanternfish Posts: 366
    edited 2012-10-17 16:21
    Hi idbruce.

    A couple of questions:

    1) USB, serial or parallel printer interface?

    OK. That was only one question.

    I think someone has interfaced a thermal printer - here are links a thread and a link to a .pdf about a BS2 interface.

    And this thread on a parallel interface.

    These should get you started.
  • idbruceidbruce Posts: 6,197
    edited 2012-10-17 16:25
    Okay, while I was pondering this question, I came up with another idea. A while back, I started a project, which I am sorry to say it is still not finished, but it was meant to be a new serial terminal for the Propeller. This project can be found at this link: Anyhow, back to my idea. Using similar code and communicating with a PC, it would be highly possible to create a full blown, rich text editor, that could write, read, format, save, delete, and print documents, all of which could be controlled by the Propeller. Now put that in your pipe and smoke it :)

    Bruce

    EDIT: Or any other uC capable of serial communication for that matter.
    EDIT: In reality, the possibilties are practically endless, for instance, being able to write bitmaps, format drives, send email, serious computations, etc...
    EDIT: Oh here is one for you, how about an entire hard drive for Propeller memory storage, or access to values and parameters.

    There I go, just rambling again :)
  • lanternfishlanternfish Posts: 366
    edited 2012-10-17 17:02
    idbruce wrote: »
    .....

    There I go, just rambling again :)

    It's great when one idea leads to a whole heap of others.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-10-17 17:33
    idbruce wrote:
    how about an entire hard drive for Propeller memory storage, or access to values and parameters.
    That's what the various SD drivers already provide. (Or is 8 GB not enough? :) )

    -Phil
  • frank freedmanfrank freedman Posts: 1,983
    edited 2012-10-17 17:53
    idbruce wrote: »
    I was wondering if anyone has attempted to control a printer or print data from the Propeller chip. If so, where can I find the information. Links please.

    Bruce

    For parallel should be simple set data strobe, delay. Rinse, repeat. Yikes, shades of cp/m days.......
  • idbruceidbruce Posts: 6,197
    edited 2012-10-17 18:00
    @Phil
    That's what the various SD drivers already provide. (Or is 8 GB not enough? :smile: )

    Okay, okay, you got me there. Sure Eight Is Enough for me, and I think Dick Van Patten might also agree.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-10-17 20:03
    I've used my thermal printer from SparkFun since writing the post in the thread lanternfish linked to. It was pretty simple to interface the printer with the Prop. It turns out the logic level of the printer's serial port was even 3.3V and not 5V, so not even a series resistor is required on the tx (from printer to Prop) line.

    I know there's a thread about using this printer with a BS2 (I think I also posted some Prop code to the thread). I'm sure I could find the thread if anyone's interested.
  • prof_brainoprof_braino Posts: 4,313
    edited 2012-10-18 18:20
    The items you mention in post 4, this is what we do with propforth. But we don't have an interface to a printer, nobody has expressed a need.
  • kwinnkwinn Posts: 8,697
    edited 2012-10-18 19:48
    Sending data to a serial or parallel printer from the propeller would be very easy to do. I have used an eprom and logic gates to connect some very old equipment to teletypes and dot matrix printers. I'm not sure of the exact number of inputs and outputs a parallel printer needs but I think a '165 and 2 '595's would be all you need to interface to all the signal lines on the printer.
  • idbruceidbruce Posts: 6,197
    edited 2012-10-19 03:37
    @Duane

    Depending upon the application, I am sure one of those thermal printers would be quite nice. What is the maximum text length for that printer?

    @prof_braino

    Sounds very cool. What kind of programming language and application are you using on the PC side? Let me guess... PropForth? :)

    @kwinn

    When I initially started this thread, I was thinking of an old dot matrix line printer.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-10-19 03:58
    Sending data is only half the battle. If your printer doesn't support an ASCII mode with internal fonts, you are going to have to provide for a rather sophisticated printer driver.

    The thermal and dot matrix printers generally have an internal ASCII font with a few extra spaces or a special mode to allow for custom items such as company logos.

    I cannot seem to find a way to use ASCII with my Fuji-Xerox DocuPrint 203A. It will initialize to other set ups and has both USB and parallel ports. It seems I can also have the Baud rate at 9600.

    Seeing as the Propeller now supports GCC, it might be possible to overlay the Linux CUPS driver system to fully support a whole bunch of printers.

    If you wanted to print a PDF or HTM you would likely need a formal driver setup.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-10-19 04:09
    BTW, according to Wikipedia the traditional parallel port actually has 4 separate options of software configuration. So don't just presume your printer uses the original standard.

    http://en.wikipedia.org/wiki/IEEE_1284
  • kwinnkwinn Posts: 8,697
    edited 2012-10-19 08:08
    BTW, according to Wikipedia the traditional parallel port actually has 4 separate options of software configuration. So don't just presume your printer uses the original standard.

    http://en.wikipedia.org/wiki/IEEE_1284

    This is the parallel port on the PC you are referring to? It did go through several permutations, starting as a Centronics printer port and ending up as a general purpose parallel I/O port. Most printers (all that I have encountered) had a Centronics compatible input port, and every one of them would print standard ascii characters as the default. You needed to send escape sequences to access special fonts or dot graphics.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-10-19 09:30
    @Kwinn
    Well, at least in theory my Fuji-Xerox DocuPrint 203 will print ASCII if I hook up to the Centronix port on it. I just cannot find anything in the documents to tell me so.

    I guess you are saying that while the PC parallex port evolved, the ones on printers remained faithful to the original standard. I found some info that claims my printer uses the IEEE 1284 ports (maybe all of them).

    Nothing in the Fuji-Xerox info about ESC sequences and ASCII fonts.

    It would be interesting to enable the Propeller to print out Unicode and all 7000 Chinese characters, or Arabic, or Hindi.

    It seems to me that only some modern printers have an ASCII or EBDIC mode - you have to be sure to buy the right one. Otherwise, the computer actually converts ASCII to appropriate code within the printer driver software.
  • kwinnkwinn Posts: 8,697
    edited 2012-10-19 10:35
    @Kwinn
    Well, at least in theory my Fuji-Xerox DocuPrint 203 will print ASCII if I hook up to the Centronix port on it. I just cannot find anything in the documents to tell me so.

    I guess you are saying that while the PC parallex port evolved, the ones on printers remained faithful to the original standard. I found some info that claims my printer uses the IEEE 1284 ports (maybe all of them).

    This is certainly true for all of the dot matrix printers and most of the ink jet printers I have encountered. Once they switched over to USB though I think that changed. Low end printers used the processing power of the PC to simplify the printer electronics as much as possible.
    Nothing in the Fuji-Xerox info about ESC sequences and ASCII fonts.

    It would be interesting to enable the Propeller to print out Unicode and all 7000 Chinese characters, or Arabic, or Hindi.

    The manuals that come with printers now do not have much information on the internal workings of the printer. It is pretty much assumed that they will be used with a PC and the provided print driver. I suppose the propeller could be programmed to control a printer to produce all those character sets, but it would not be simple, and would require external storage for the characters.
    It seems to me that only some modern printers have an ASCII or EBDIC mode - you have to be sure to buy the right one. Otherwise, the computer actually converts ASCII to appropriate code within the printer driver software.

    I have always used Okidata printers for this sort of requirement, and they still make good quality relatively inexpensive impact printers with both IEEE and USB interfaces. Optional RS232 and network adapters are also available.
Sign In or Register to comment.