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.

interface to printer

Other Parts Discussed in Thread: ENERGIA

I am using a MSP4305529 to collect data from an encoder and display it on an LCD.  I am also saving the data and am able to send it to Hyper Terminal for viewing.  All of that works fine but I would like to be able to eliminate the PC and send the data directly from the 5529 to a generic HP inkjet printer.  I could send it to a POS printer (Seiko) but would like to be able to connect the USB cable from the 5529 to the printer and send data for printing.  I am using Energia to generate the downloaded code.

The problem as I see it is that the HP printer is not setup to receive the serial data that is being transmitted.  I guess in effect, I need a driver so that the printer thinks it is being driven by a PC.

I am a retired Mechanical Engineer and have been using computers since the early 1960's when I first started using BASIC on a GE Timeshare terminal (ten characters a second).    I am not proficient in C but have learned enough to use Energia. 

Any help or thought would be greatly appreciated.

  • Fred Mueller said:
    send the data directly from the 5529 to a generic HP inkjet printer.

    msp430 does not support USB host mode. You simply can't control USB peripheral from it. Not to mention that generic GDI printers needs quite lot of computing and large framebuffer on the host.

    Fred Mueller said:
    I could send it to a POS printer

    Yes. Do it. Select one with rs232 interface and you at least have chance of success :)

  • Some printers have an USB host connector, so you can connect an USB stick and print pictures form the stick.
    The MSPs with USB controller can be used to ‘simulate’ a storage device, and report virtual files to the host, which then can be printed. However, the MSP has to simulate a directory structure. Some work, but doable.
    You can then plug the MSP into the printer and select the ‘file’ you want to print on the printer controls and print it.
    But as Ilmars said, the MSP USB controller is not able to play a host role and control the printer.

  • First off, let me thank both of you for your help.  I am in the middle of investigating the use of a POS printer and it looks promising.  The thought of being able to plug into a USB port on a printer and have the printer look for a file and then print it sounds very interesting.

    I know that the Launchpad comes with an installed program that makes the device emulate a USB stick but I have not found any examples of how this is implemented.  Do you know of any examples that outline how this is done.  As I stated earlier, I am not proficient in C and have been using the Energia interface.  If necessary, I will dig into learning C++ ( I guess if I have been able to learn Basic, Fortran, Z-80 code, and Visual Basic I ought to be able to master it or at least be able to stumble around in it.)

    The program to read, display and store the data only takes about 10K so I guess I would have room to add quite a bit of code to implement the "USB stick".  This would allow the customer to have a choice of how they wanted to print their data.

    I have to say that when I first learned Fortran and BASIC back in the early 60's, I never imagined that I would still be playing around with code when I was in my 80"s!  Think it keeps the old mind from freezing up.

    Anyway, would really appreciate any help that anyone might have to offer.

    Fred

  • Fred Mueller said:
    The thought of being able to plug into a USB port on a printer and have the printer look for a file and then print it

    You can't let printer look for a file. Please note that it's HUGE difference between USB device and USB host. To control USB device named "POS printer" you need USB host - PC or other kind of computer Android also will do. You can't control USB printer device from another USB device like LaunchPad.

    You shall look for POS printer having rs232 interface

  • Ilmars said:
    You can't let printer look for a file.

    Ilmars, many printers today provide an USB host interface as well as SD card slots. For printing images directly from storage media without need of a PC.
    This has nothing to do with the printer being an USB device to a PC. (and uses a different USB jack)

  • Jens-Michael Gross said:
    Ilmars, many printers today provide an USB host interface as well as SD card slots.

    Ouch, this function :) You are right! Even I had one BTW. Thank you for correcting

**Attention** This is a public forum