Skip to main content
AAgha
Associate II
March 17, 2019
Question

Connecting printer to stm32f4

  • March 17, 2019
  • 3 replies
  • 2036 views

Hi

I want to connect printer to stm32f4 discovery board but i dont know form where i should start!

I connect keyboard to board successfully with stmcube hid library

for printer which usb host class should i select!?

regards

This topic has been closed for replies.

3 replies

waclawek.jan
Super User
March 17, 2019

Printer Class

https://www.usb.org/defined-class-codes#anchor_BaseClass07h

I don't use Cube/CubeMX but as far as I know it's not something you can simply "select" there so you might need to write it yourself, or get a 3rd party library.

https://community.st.com/s/question/0D50X00009XkaNSSAZ/usb-printer-class

JW

doss
Associate
March 17, 2019

Maybe old parallel printers are suitable to your application.

There are old endless-paper needle printers, ink printers, laser printers and cash-register-printers with this interface available.

Some special printers like those cash register printers and similar are produced up today with a parallel port interface.

For simple text printing the protocol is *very* easy. 8 datapins and 1 strobe pin. You apply the ASCII code for the character on the 8 datapins and issue a rising or falling edge (don't remember exactly) at strobe and this character will be immediately printed.

AAgha
AAghaAuthor
Associate II
April 8, 2019

thanks for your reply

Do you have any tutorial!?