This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Bulk transfer of Data via USB (Host side)

Hi everyone,

I am using a LM3S5951 controllers for one of my projects in which I need to implement a host side driver for Dot Matrix printer .

I am done with enumeration of the printer, but now I would like to know how can I send data to printers using bulk transfers. I am using the Stellaries USB Library for the same where I found some host side codes for keyboard and pendrive. I would like to know, how to go about this.

Regards

Dhanush

Parents
  • HI,

    Here instead of calling the getportstatus every 100 ms i call the func before printing the data.

    Now when I first send data to be printed w/o paper inserted i get no error i.e. 00011000 .

    Second time if I do the same i get error i.e. 00110000

    My question is why it does not give an error for the first time.

    And my requirement is once i give data to be printed and no paper is inserted it the code should wait till the paper is not inserted and once the paper is inserted it should start printing.

    For parallel port I do this using the busy flag of the centronics port. I keep on checking the busy flag till it gets low, Once the paper is inserted the printer makes the busy flag zero and then I start sending data to be printed.

    How can I achieve this on USB . I Know the only way I have is polling the printer status continuously.

    Regards
    Dhanush

Reply
  • HI,

    Here instead of calling the getportstatus every 100 ms i call the func before printing the data.

    Now when I first send data to be printed w/o paper inserted i get no error i.e. 00011000 .

    Second time if I do the same i get error i.e. 00110000

    My question is why it does not give an error for the first time.

    And my requirement is once i give data to be printed and no paper is inserted it the code should wait till the paper is not inserted and once the paper is inserted it should start printing.

    For parallel port I do this using the busy flag of the centronics port. I keep on checking the busy flag till it gets low, Once the paper is inserted the printer makes the busy flag zero and then I start sending data to be printed.

    How can I achieve this on USB . I Know the only way I have is polling the printer status continuously.

    Regards
    Dhanush

Children