cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting printer to stm32f4

AAgha
Associate II

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

3 REPLIES 3

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 II

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
Associate II

thanks for your reply

Do you have any tutorial!?