13
Application Report SPMA071 – March 2014 Thermal Printer Reference Design Using TM4C1233H6PM Jabir VS ABSTRACT Thermal printers are very common due to their wide-spread use in so many devices in our day-to-day life. Some of them are handheld devices used for point-of-sales, ticketing machines, metering, and so forth. The benefits of thermal printers are compelling. There is no toner, ink or ribbons required for a thermal printer. A thermal receipt printer uses a printhead with few moving parts and it fits in a thin space about three inches across. By contrast, the standard receipt printer is composed of about 20 moving parts and electrical devices, and takes up at least twice the space. Nowadays, thermal printer mechanisms are even available with an integrated electro-mechanical paper cutter in it. All of these features make thermal printers a right choice in a wide variety of applications. This application report discusses the complete hardware and software required for a thermal printer solution based on Texas Instruments Tiva™ controllers. Tiva controllers are 32-bit ARM ® Cortex ® -M4 80- MHz processor core with IEEE754-compliant single-precision Floating-Point Unit (FPU), on-chip memory, featuring 256 KB single-cycle Flash, 32 KB single-cycle SRAM; internal ROM loaded with TivaWare™ for C Series software; 2KB EEPROM and several other features. With all the above hardware features and the graphics library support available for Tiva controllers makes it easy to do the text rendering and simultaneous printing required for thermal printing. Project collateral and source code discussed in this application report can be downloaded from the following URL: http://www.ti.com/lit/zip/spma071. Contents 1 Introduction ................................................................................................................... 2 2 System Block Diagram ...................................................................................................... 3 3 Circuit Diagram............................................................................................................... 3 4 Firmware ...................................................................................................................... 4 5 Theory of Operation ......................................................................................................... 6 6 Graphical User Interface .................................................................................................... 9 7 Thermal Printer Graphical Interface ..................................................................................... 10 Appendix A Schematic .......................................................................................................... 12 List of Figures 1 System Block Diagram ...................................................................................................... 3 2 Flowchart - Part 1 ............................................................................................................ 4 3 Flowchart - Part 2 ............................................................................................................ 5 4 Software Flowchart .......................................................................................................... 6 5 Timing Chart for Using Fixed Six Divisions Printing..................................................................... 8 6 Thermal Printer Demo Interface .......................................................................................... 10 7 Schematic ................................................................................................................... 12 Tiva, TivaWare are trademarks of Texas Instruments. Stellarisware is a registered trademark of Texas Instruments. ARM, Cortex are registered trademarks of ARM Limited. All other trademarks are the property of their respective owners. 1 SPMA071 – March 2014 Thermal Printer Reference Design Using TM4C1233H6PM Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated

Thermal Printer Reference Design Using TM4C1233H6PM Multiple

  • Upload
    vothuy

  • View
    263

  • Download
    3

Embed Size (px)

Citation preview

Page 1: Thermal Printer Reference Design Using TM4C1233H6PM Multiple

Application ReportSPMA071–March 2014

Thermal Printer Reference Design Using TM4C1233H6PM

JabirVS

ABSTRACTThermal printers are very common due to their wide-spread use in so many devices in our day-to-day life.Some of them are handheld devices used for point-of-sales, ticketing machines, metering, and so forth.The benefits of thermal printers are compelling. There is no toner, ink or ribbons required for a thermalprinter. A thermal receipt printer uses a printhead with few moving parts and it fits in a thin space aboutthree inches across. By contrast, the standard receipt printer is composed of about 20 moving parts andelectrical devices, and takes up at least twice the space. Nowadays, thermal printer mechanisms are evenavailable with an integrated electro-mechanical paper cutter in it. All of these features make thermalprinters a right choice in a wide variety of applications.

This application report discusses the complete hardware and software required for a thermal printersolution based on Texas Instruments Tiva™ controllers. Tiva controllers are 32-bit ARM® Cortex®-M4 80-MHz processor core with IEEE754-compliant single-precision Floating-Point Unit (FPU), on-chip memory,featuring 256 KB single-cycle Flash, 32 KB single-cycle SRAM; internal ROM loaded with TivaWare™ forC Series software; 2KB EEPROM and several other features.

With all the above hardware features and the graphics library support available for Tiva controllers makesit easy to do the text rendering and simultaneous printing required for thermal printing.

Project collateral and source code discussed in this application report can be downloaded from thefollowing URL: http://www.ti.com/lit/zip/spma071.

Contents1 Introduction ................................................................................................................... 22 System Block Diagram ...................................................................................................... 33 Circuit Diagram............................................................................................................... 34 Firmware ...................................................................................................................... 45 Theory of Operation ......................................................................................................... 66 Graphical User Interface .................................................................................................... 97 Thermal Printer Graphical Interface ..................................................................................... 10Appendix A Schematic .......................................................................................................... 12

List of Figures

1 System Block Diagram ...................................................................................................... 32 Flowchart - Part 1............................................................................................................ 43 Flowchart - Part 2............................................................................................................ 54 Software Flowchart .......................................................................................................... 65 Timing Chart for Using Fixed Six Divisions Printing..................................................................... 86 Thermal Printer Demo Interface .......................................................................................... 107 Schematic ................................................................................................................... 12

Tiva, TivaWare are trademarks of Texas Instruments.Stellarisware is a registered trademark of Texas Instruments.ARM, Cortex are registered trademarks of ARM Limited.All other trademarks are the property of their respective owners.

1SPMA071–March 2014 Thermal Printer Reference Design Using TM4C1233H6PMSubmit Documentation Feedback

Copyright © 2014, Texas Instruments Incorporated

Page 2: Thermal Printer Reference Design Using TM4C1233H6PM Multiple

Introduction www.ti.com

1 Introduction

1.1 Specifications• Main controller – TM4C1233H6PM 64 LQFP• Supporting chipsets

– DRV8834– TS5A1066– TPS76833

• External connectivity Interfaces– Universal Asynchronous Receiver/Transmitter (UART)– Universal Serial Bus (USB)

• Software features– Support 2 inch thermal heads– Can be extended easily for 3 inch printer head– Wide support for fonts

• Multi-sized fonts• Italics fonts• Bold fonts

– Also support Image– Architecture supports implementation of escape commands

This application report explains the working of the software and hardware required for building a thermalprinter solution.

The hardware for the system is designed around Texas Instruments TM4C1233H6PM Microcontroller. It isa 80 Mhz processor with 256Kbytes of Flash and 32Kbytes of internal RAM. There are two motor driversections implemented in the system: one motor driver section for the printer motor and the other for thepaper cutter integrated to the printing mechanism. The motor driver sections are implemented using theDRV8834 motor driver ICs from Texas Instruments. The hardware also provides the facility forcommunication using UART and USB interfaces through the inbuilt peripherals available inside thecontroller.

The thermal printer firmware is running in a foreground and background execution approach. It utilizesvarious peripheral interrupts available in the microcontroller to achieve the performance. For example, thedesign utilizes the UART interrupts for collecting the data from an external host, uses the timer interruptfor accurately controlling the heating strobes of the printer mechanisms, and so forth. The font tables(used for text rendering, and so forth) are stored in the built in Flash. The font tables are stored in acompressed format for saving the application Flash. The images are stored in the form of C arrays.

The various functions performed by the firmware are listed below:• Rendering of the text character received through the communication port to the printable image• Logo printing using the onboard switch provided• Font management by selecting the appropriate Font Table• Increasing or decreasing the height of the printed text• Increasing or decreasing the width of the printed text• Precisely controlling the printing strobes as per the timing specification of the mechanism• Auto cutter facility using the built-in paper cutter• Provides a basic set of escape commands for data and commands• Provision for adding more escape commands for data and commands• Monitor the battery voltage of the system

2 Thermal Printer Reference Design Using TM4C1233H6PM SPMA071–March 2014Submit Documentation Feedback

Copyright © 2014, Texas Instruments Incorporated

Page 3: Thermal Printer Reference Design Using TM4C1233H6PM Multiple

Mini USBConnector

R 232/TTL UART

S

Power SupplyTPS76833

TM4C1237

Thermal PrinterMechanism

4-Wire/2-WireSerial Interface

TS5A1066Printer Motor

Current Control

DRV8834 forPrinter Motor

TI Components

DRV8834 forCutter Motor

www.ti.com System Block Diagram

2 System Block Diagram

Figure 1. System Block Diagram

3 Circuit DiagramFor the schematic details, see Appendix A.

3SPMA071–March 2014 Thermal Printer Reference Design Using TM4C1233H6PMSubmit Documentation Feedback

Copyright © 2014, Texas Instruments Incorporated

Page 4: Thermal Printer Reference Design Using TM4C1233H6PM Multiple

NO

NO

YES

ERROR LED OFF

Set the <otor Driver

to Half Step Mode

Set the Motor Drivers

to Forward Direction

Mode

Power On Reset

A

YES

B

Initialize GPIOInitialize UARTInitialize TIMERInitialize ADC

Set the Font TableSet the Max CharacterLength and WidthSet the Max CharacterPer Line

Check forPaper Roll

ERROR LED ONCheck for Paper

Auto Feed the PaperFrom Paper Roll

Firmware www.ti.com

4 Firmware

4.1 Flowchart

Figure 2. Flowchart - Part 1

4 Thermal Printer Reference Design Using TM4C1233H6PM SPMA071–March 2014Submit Documentation Feedback

Copyright © 2014, Texas Instruments Incorporated

Page 5: Thermal Printer Reference Design Using TM4C1233H6PM Multiple

A

CALL graphicprint();

CALL text_print();

YES

NO

YES

NO

NO

NO

YES

YES

CALL FullCut();YES

B

YES

YES

NO

NO

YES

YES

Set

CutFlag

and

return()

NOreturn()

NO

UART Interrupt Handler

If GraphicsCommandReceived

SetGraphics

Modeand

return()

If GraphicsMode Enabled

If PrintCommandReceived

If Paper CUTCommandReceived

If any EscapeCommandsReceived

Set TextPrintModeand

return()

Enable CorrespondingFlags or Settings and

return ()*

If Text PrintMode Enabled

If Switch 1Pressed

If Switch 2Pressed

If CutFlag Set

CALLLogo_Print();

CALLLinefeed();

www.ti.com Firmware

Figure 3. Flowchart - Part 2

5SPMA071–March 2014 Thermal Printer Reference Design Using TM4C1233H6PMSubmit Documentation Feedback

Copyright © 2014, Texas Instruments Incorporated

Page 6: Thermal Printer Reference Design Using TM4C1233H6PM Multiple

Return() Return()

Timer Interrupt Handler

Clear Timer Interrupt

Disable Timer

Clear Print Motor Flag

to Zero

Clear ADC Interrupt

Get the Values From

ADC Registers

Stor the Values to

Application Variables

ADC Interrupt Handler

Theory of Operation www.ti.com

Figure 4. Software Flowchart

5 Theory of Operation

5.1 General Information About Thermal PrintersThermal printing is a non-impact method of creating images on paper and synthetic film. The processapplies heat from a thermal printhead onto thermal material. The base material used in the thermalprinting process may be selected from a variety of paper grades or synthetic films (PP, PE, or PET) with aspecial chemical coating applied to one side to make it sensitive to heat.

Thermal printing has a number of important advantages over traditional printing processes; it is fast, clean,quiet, reliable and easy to maintain. There are a limited number of mechanical parts, no messy ribbons ortoners, and no inking devices are needed to create the image.

Since thermal printers only have one or two moving components, they are very reliable and economical tooperate and maintenance costs are extremely low. The entire system is compact, simple to operate andsuitable for use in virtually all applications. Thermal printheads are usually much smaller and lighter thanthe printing elements used by other imaging processes, so thermal printers are suitable when compactsize, portability and on-demand printing are needed. At the same time, a sharp and precise image ofexcellent quality is produced consistently and quickly by properly matching the thermal paper to theprinthead by varying the chemical coating formulation.

In recent years, microprocessors have been installed to control printhead operation with majorimprovements in image sharpness and clarity. A thermal printhead has a large number of tiny resistors,which individually react to convert an electrical impulse into heat. The heat from the printhead on thermalmaterial creates a reaction with the chemical coating to produce an image. The image is produced withinmilliseconds of contact and is normally black in color. The depth and range of colors may be produced byvarying the chemical formulation applied to the base material.

The quality and performance of thermal printing depends heavily on the careful matching of thermalmaterial to printhead equipment specification. As a result, a range of thermal materials is used across awide spectrum of thermal printers for different applications. To give the required physical characteristicsand properties, the type of base material - paper, board, or synthetic film - varies from application toapplication, as does the thickness and weight of various base materials.

6 Thermal Printer Reference Design Using TM4C1233H6PM SPMA071–March 2014Submit Documentation Feedback

Copyright © 2014, Texas Instruments Incorporated

Page 7: Thermal Printer Reference Design Using TM4C1233H6PM Multiple

0

58 mm1-

0

80 mm1-

www.ti.com Theory of Operation

5.2 Specification of the Thermal Printer Head Used With This DocumentThe thermal printer mechanism used for this application report is from Seiko. The model number isCAPD245D-E. It has a built-in auto-cutter mechanism integrated into it. Table 1 shows the electricalspecification for CAPD245D-E.

Table 1. Electrical Specification for CAPD245D-E

SpecificationsCAPD245 CAPD345

Items CAPD245D CAPD245E CAPD345D CAPD345EPrinting method Thermal dot lin printingTotal dots per line 384 dots 576 dotsPrintable dots per line 384 dots 576 dotsSimultaneously activated dots 96 dots 96 dotsResolution W 8 dots/mm x H 16 dots/mm *2

Paper feed pitch 0.03125 mmMaximum print speed 100 mm/s *3 80 mm/s *3

Print width 48 mm 72 mm

Paper width

Thermal head temperature detection ThermistorPlaten position detection Mechanical switchOut-of-paper detection Reflection type photo interrupterCutter home position detection Transmission type photo interrupterOperating voltage range 4.75 V to 9.5 V *4 6.5 V to 9.5 VVP line 2.7 V to 3.6 V, 4.75 V to 5.25 V 2.7 V to 3.6 V, 4.75 V to 5.25 VVDD linePrinter current consumption 5.49 A max. (at 9.5 V) *5 5.40 A max. (at 9.5 V) *5VP line Thermal head drive 0.60 A max. 0.60 A max.Motor drive 0.10 A max. 0.10 A maxVPP line Thermal head logicAuto-cutter current consumption 0.70 A max.VP line Motor drivingPaper cutting method Slide cuttingType of paper cutting Full cut and partial cut (1.5 ±0.5 mm tab left at the center)Paper curling tendency Fixed blade side and movable blade sideMinimum paper core diameter ᶲ 8 mmMinimum paper cutting length 10 mmCutting processing time Approximately 1.0 s/cycleCutting frequency 1 cut/2 s maximumOperating temperature range -10°C to 50°C (non condensing)

5.3 Printer Drive Motor and Thermal Head Drive MethodThe printer drive motor and the thermal head must be driven at the same time for printing. The printer hashalf dot pitch thermal head, the pitch to the paper feed direction is one-half dot of the heat elements.Configure 1 dot by 2 half dots.

The motor feeds the thermal paper for 1 dot line by the 4 steps. It is necessary to feed the thermal paper 4steps and activate the thermal head once every 2 steps, to configure the 1 dot line.

7SPMA071–March 2014 Thermal Printer Reference Design Using TM4C1233H6PMSubmit Documentation Feedback

Copyright © 2014, Texas Instruments Incorporated

Page 8: Thermal Printer Reference Design Using TM4C1233H6PM Multiple

Theory of Operation www.ti.com

Figure 5 describes the drive method as an example of the CAPD245 and shows a timing chart for usingfixed six divisions printing.

Figure 5. Timing Chart for Using Fixed Six Divisions Printing

5.4 Motor Driver SectionsThe motor driver section is built around the DRV8834 dual-H-Bridge current-control motor driver ICs. Ithas a built-in Indexer logic with simple STEP/DIRECTION control and up to 1/32-step micro-stepping. Dueto the availability of the indexer, the microcontrollers burden of driving the stepper motor in the printermechanism is totally off-loaded. Rather than generating the appropriate pulses using four output lines, themicrocontroller can now drive the stepper motor very easily using a single output line connected to theSTEP pin of DRV8834. Through this single control line, the microcontroller sends square pulses to turnthe motor as per the step size selected through the configuration pins in DRV8834. In this application, theDRV8834 is configured to operate in half-step mode for each square pulse sent through the STEP input.

The cutter stepper motor is also operated in the same way explained above for the printer stepper motor.

5.5 RS232 Communication From External Host BoardThis board has a RS232 conversion section available for sending and receiving signals from an externalhost controller. This section is designed around the TI max3232 RS232 level converter.

There is also a provision for bypassing the rs232 converter IC section for connecting the TTL/CMOS leveldirectly. This can be done by mounting the R23,24,25,26 zero Ω resistor option on the board.

8 Thermal Printer Reference Design Using TM4C1233H6PM SPMA071–March 2014Submit Documentation Feedback

Copyright © 2014, Texas Instruments Incorporated

Page 9: Thermal Printer Reference Design Using TM4C1233H6PM Multiple

www.ti.com Theory of Operation

5.6 Text Rendering and Data Transfer to the Printer HeadThe main challenge in any thermal printer driver solution is the text rendering. Usually the text charactersto be printed on the paper will come through one of the communication interface like UART or USB. Thedata received through the communication interface will be in ASCII format represented in 8-bit length. Thisdata has to be written to the thermal paper in the actual form of the character it represents, which is calledtext rendering. A straight forward way to do this is to have a bitmap table stored inside the microcontrollerFlash and pick the corresponding bitmap from the character table. But the drawback of this approach isthe memory required to store the bit map tables.

Another innovative approach to address this issue is to use the bitmap tables in a compressed format.This can be done easily in TIVA controllers with the help of Stellarisware® or Tivaware software library.The compression and decompression of the bitmap is taken care of by the library. The application takesthe output of the library functions and remaps it in such a way that it can be sent to the printer for a properprinting. All the required functions for doing the remapping is taken care of by the application codeprovided with this application report.

The application uses the library functions for un-compressing the characters from the compressed bitmaptable. Then, the uncompressed character bitmaps are written to an internal memory location, which isconsidered as a two dimensional plane. From there, the characters are picked by the data transfer routineto send the bitmaps to the thermal printer head using an hardware SPI or an GPIO emulated SPI.

5.7 Temperature and Battery MonitoringThe battery voltage is fed to a resistor divider network and the voltage at the divider point is fed directly tothe microcontroller ADC pin. The microcontroller captures multiple samples of this voltage and stores theinformation in the corresponding register for further use of the application.

The temperature of the printer head is measured using the built-in temperature sensor inside the printermechanism. A voltage is applied to the internal thermistor through a 10K resistor on board. The junction ofthis external resistor and the internal thermistor is connected to the ADC pin of the microcontroller formeasuring the instantaneous temperature of the printing head to avoid damage and optimizing the speed.

5.8 Push Button OperationThere are two push buttons provided on the board named as SW1 and SW2.• Pressing SW1 automatically prints a logo of Texas Instruments.• Pressing SW2 does the paper feed function.

Indicator LEDsThere are two indicator LEDs provided for displaying various status signals:• Led 1 is the indication for 3.3 V power.• Led 2 is the indication for any error. For example, paper roll not present.

6 Graphical User InterfaceTo enable the quick evaluation of the thermal printer solution, a graphical user interface (GUI) is alsoavailable along with this application. The GUI has developed using C# language from Microsoft. Using thisGUI, its very easy to send and receive commands and data to and from the printer. The communicationinterface used here is the commonly available UART interface. All the built-in escape commands areavailable as a function in the GUI.

9SPMA071–March 2014 Thermal Printer Reference Design Using TM4C1233H6PMSubmit Documentation Feedback

Copyright © 2014, Texas Instruments Incorporated

Page 10: Thermal Printer Reference Design Using TM4C1233H6PM Multiple

Thermal Printer Graphical Interface www.ti.com

7 Thermal Printer Graphical Interface

Figure 6. Thermal Printer Demo Interface

Figure 6 shows the GUI for the Tiva thermal printer demo. Using this GUI, you can print sample text fromthe comfort of a Windows-based PC . You can try various commands supported by the firmware by usingthis interface. It supports multiple commands like cutting, double height printing, image printing, and soforth. It also displays the command byte information it sent through the UART.

Before sending any commands, you have to select the appropriate com port number and enter it into thebox given on the right hand top corner and press the OK button. If the port is free and usable, the softwareissues the message “PORT OPENED SUCCESSFULLY”. After this, you can start using the variouscommand buttons.

7.1 Button 1 – Print Sample TextThis button enters sample text in the text box provided above the button to directly print on the paper.Enter the sample text and click on the “Print Sample Text” button.

7.2 Button 2 – Send ImageThis button prints images through the uart channel. You can paste the graphics image data in the boxprovided above this button. The image box accepts the Stellarisware compatible C array of the image.You can directly copy and paste the Stellarisware compatible C array of the image and press the “SendImage” button. The software transfers the data in multiple blocks if the image size is more than 104 lines,which is equivalent to 5000 bytes of internal UART memory buffer.

7.3 Button 3 - GRAPHICS MODE ONThis button prints graphical data to the paper in a line-by-line basis. The number of lines of data to beprinted at a single instance is selected from the pull down menu adjacent to this button. The value canrange from 1 line to 255 lines. After the specified number of lines, the mode will automatically betransferred to text mode.

10 Thermal Printer Reference Design Using TM4C1233H6PM SPMA071–March 2014Submit Documentation Feedback

Copyright © 2014, Texas Instruments Incorporated

Page 11: Thermal Printer Reference Design Using TM4C1233H6PM Multiple

www.ti.com Thermal Printer Graphical Interface

7.4 Button 4 – Double Height OnThis button increases the height of the text printing. It will print the text in double size in height fromnormal.

7.5 Button 5 – Double Height OffThis button reduces the height of text printing to normal size. It will cancel the effect of “DOBLE HEIGHTON” button.

7.6 Button 6 – Double Width OnThis button increases the width of the text printing. It will print the text in double size in width from normal.

7.7 Button 7 – Double Width OffThis button reduces the width of text printing to normal size. It will cancel the effect of “DOBLE WIDTHON” button.

7.8 Button 8 – INTENSITY +This button increases the darkness (intensity) of the printing. Each press on this button increase theintensity by a small delta, which is equivalent to a delay of 1000 units of clock of the controller applied tothermal head energizing.

7.9 Button 8 – INTENSITY -This button decreases the darkness (intensity) of the printing. Each press on this button decrease theintensity by a small delta, which is equivalent to a delay of 1000 units of clock of the controller applied tothermal head energizing.

7.10 Button 9 – Full CutThis button operates the built-in cutter to perform a full cut operation.

7.11 Button 10 – LIne FeedThis button pushes the paper to approximately 10 cms for a demonstration purpose. This length can easilybe adjusted in the firmware code.

7.12 Button 11 – GET SYSTEM VOLTSThis button collects the ADC value of the battery monitoring channel pin for implementing the intensitycontrol loop from a host machine through commands. It returns the 12-bit value of the ADC in hex format.

11SPMA071–March 2014 Thermal Printer Reference Design Using TM4C1233H6PMSubmit Documentation Feedback

Copyright © 2014, Texas Instruments Incorporated

Page 12: Thermal Printer Reference Design Using TM4C1233H6PM Multiple

5 5

4 4

3 3

2 2

1 1

DD

CC

BB

AA

PO

WE

R

JT

AG

RS

23

2

CU

TT

ER

INT

ER

FA

CE

PR

INT

ER

INT

ER

FA

CE

MO

TO

RC

ON

TR

OL

-C

UT

TE

R

MO

TO

RC

ON

TR

OL

-P

RIN

TE

R

MC

U-

LM

4F

12

0

TE

ST

SW

ITC

HE

S

MO

TO

RC

UR

RE

NT

CO

NT

RO

L

US

B

PG

OO

D

UA

RT1R

XD

UA

RT1TX

D

TM

S

TC

K

TD

ITD

O

TD

O

TD

ITM

S

TC

K

nS

LEEP_P

AD

EC

AY

_P

AO

UT_P

AIN

V_P

BIN

V_P

BO

UT_P

nEN

BL/A

EN

BL_P

STEP_P

DIR

_P

M0_P

M1_P

CO

NFIG

_P

nFA

ULT_P

REFV

_P

REFV

_P

VR

EFO

_P

nS

LEEP_P

RS

T

nEN

BL/A

EN

BL_P

DIR

_P

STEP_P

DI

CLK

DS

T5

DS

T4

TH

2TH

1

TH

1

DS

T3

DS

T2

DS

T1

LA

T

PS

AIN

V_P

BO

UT_P

AO

UT_P

BIN

V_P

DS

T6

HS

FG

TH

ER

MIS

TO

R

nS

LEEP_C

AO

UT_C

AD

EC

AY

_C

AIN

V_C

BO

UT_C

BIN

V_C

DIR

_C

STEP_C

nEN

BL/A

EN

BL_C

CO

NFIG

_C

M1_C

M0_C

nFA

ULT_C

REFV

_C

REFV

_C

VR

EFO

_C

nEN

BL/A

EN

BL_C

nS

LEEP_C

DS

T6

DI

CLK

DS

T5

DS

T4

DS

T3

DS

T2

DS

T1

LA

T

PS

CU

TS

CU

TS

BIN

V_C

BIN

V_C

AIN

V_C

AIN

V_C

BO

UT_C

BO

UT_C

AO

UT_C

AO

UT_C

DIR

_C

STEP_C

UA

RT1R

XD

UA

RT1TX

D

HS

UA

RT1R

TS

UA

RT1C

TS

TH

ER

MIS

TO

R

M1_P

M0_P

M1_C

M0_C

BA

TS

EN

SE

UA

RT1R

TS

UA

RT1C

TS

UA

RT1R

TS

_232

UA

RT1TX

D_232

UA

RT1R

XD

_232

UA

RT1C

TS

_232

UA

RT1R

TS

UA

RT1C

TS

UA

RT1R

XD

UA

RT1TX

D

UA

RT1C

TS

_232

UA

RT1TX

D_232

UA

RT1R

XD

_232

UA

RT1R

TS

_232

US

B+

US

B-

LF

SW

ITC

HTES

TPR

INT

SW

ITC

H

TES

TPR

INT

SW

ITC

H

LF

SW

ITC

H

ER

RLED

ER

RLED

90_M

A_EX

CIT

ATIO

N

REFV

_P

VR

EFO

_P

90_M

A_EX

CIT

ATIO

N

REFV

_C

VR

EFO

_C

UA

RT1C

TS

_232

UA

RT1R

XD

_232

UA

RT1TX

D_232

UA

RT1R

TS

_232

STEP_P

USB-

USB+

3.3

V

3.3

V

3.3

V

3.3

V

3.3

V

3.3

V

VM

VM

VM

3.3

V

VM

3.3

V3.3

V

3.3

V

3.3

V3.3

V

VM

3.3

V

3.3

V

3.3

V

VM

VU

SB

3.3

VV

CC

VU

SB

Titl

e

Siz

eD

ocum

entN

um

ber

Rev

Date

:S

heet

of

<D

oc>

<R

evC

ode>

TIT

HER

MA

LPR

INTER

REFER

EN

CE

DES

IGN

C

11

Monday,Ju

ly01,2013

Titl

e

Siz

eD

ocum

entN

um

ber

Rev

Date

:S

heet

of

<D

oc>

<R

evC

ode>

TIT

HER

MA

LPR

INTER

REFER

EN

CE

DES

IGN

C

11

Monday,Ju

ly01,2013

Titl

e

Siz

eD

ocum

entN

um

ber

Rev

Date

:S

heet

of

<D

oc>

<R

evC

ode>

TIT

HER

MA

LPR

INTER

REFER

EN

CE

DES

IGN

C

11

Monday,Ju

ly01,2013

R7

330E

D4

LED

_R

ED

C6

10PF

MA

X3232C

PW

U7

V-6

RIN

28

RIN

113

V+2

C2-

5C

2+

4

GND15

RO

UT2

9

RO

UT1

12

C1-

3

DO

UT2

7D

OU

T1

14

C1+

1

DIN

210

DIN

111

VCC16

U8 DR

V8834

nS

LEEP

1

BD

EC

AY

2

AD

EC

AY

3

AO

UT1

4

AIS

EN

5

AO

UT2

6

BO

UT2

7

BIS

EN

8

BO

UT1

9

nEN

BL/A

EN

BL

10

STEP/B

EN

BL

11

DIR

/BPH

AS

E12

VR

EFO

24

BV

REF

23

AV

REF

22

GN

D21

VIN

T20

VM

19

VM

18

VC

P17

nFA

ULT

16

CO

NFIG

15

M1

14

M0/A

PH

AS

E13

PPAD25

R26

0E

R2

10K

C25

.1uF

R32

3.5

7K

C40

.1uF

SW

6

TA

CT

SW

ITC

H

11

22

33

44

C10

470PF

R15

330E

C33

1uF

C43

2.2

uF

R6

.15E

C31

10uF

R18

36K

R31

1K

R19

47K

J3 0541045031

11

22

33

44

55

66

77

88

99

10

10

11

11

12

12

13

13

14

14

15

15

16

16

17

17

18

18

19

19

20

20

21

21

22

22

23

23

24

24

25

25

26

26

27

27

28

28

29

29

30

30

31

31

32

32

33

33

34

34

35

35

36

36

37

37

38

38

39

39

40

40

41

41

42

42

43

43

44

44

45

45

46

46

47

47

48

48

49

49

50

50

J4 0545501271

11

22

33

44

55

66

77

88

99

10

10

11

11

12

12

C37

.1uF

R22

10K

C41

2.2

uF

U11

TS

5A

1066

NO

1C

OM

2

IN4

V+

5

GN

D3

R27

0E

R9

330E

J5 CO

N5

1 2 3 4 5

R20

430E

R34

4.7

5K

R14

.15E

C9

470PF

R28

0E

R30

1E/1

W

J7

CO

N-U

SB

-MIN

IB

VB1

D-2

D+3

ID4

GD5

66

77

88

99

R17

330E

J6

CO

N6

1 2 3 4 5 6

C34

.1uF

TP1

TES

TPO

INT

1

C28

.1uF

U9

DR

V8834

nS

LEEP

1

BD

EC

AY

2

AD

EC

AY

3

AO

UT1

4

AIS

EN

5

AO

UT2

6

BO

UT2

7

BIS

EN

8

BO

UT1

9

nEN

BL/A

EN

BL

10

STEP/B

EN

BL

11

DIR

/BPH

AS

E12

VR

EFO

24

BV

REF

23

AV

REF

22

GN

D21

VIN

T20

VM

19

VM

18

VC

P17

nFA

ULT

16

CO

NFIG

15

M1

14

M0/A

PH

AS

E13

PPAD25

R10

300E

C39

2.2

uF

R4

10K

R8

10K

D3

LED

_R

ED

R12

10K

R23

0E

U1

LM

4F120B

2Q

R

PB

61

VDDA2

GNDA3

PB

74

PF4

5

PE3

6

PE2

7

PE1

8

PE0

9

PD

710

VDD11

GND12

PC

713

PC

614

PC

515

PC

416

PA

0/U

0R

X17

PA

1/U

0TX

18

PA

2/S

SI0

CLK

19

PA

3/S

SI0

FS

S20

PA

4/S

SI0

RX

21

PA

5/S

SI0

TX

22

PA

623

PA

724

VDDC25

VDD26

GND27

PF0

28

PF1

29

PF2

30

PF3

31

WA

KE

32

PD

364

PD

263

PD

162

PD

061

PE5

60

PE4

59

PB

458

PB

557

VDDC56

GND55VDD

54

PD

653

PC

0/T

CK

/SW

CLK

52

PC

1/T

MS

/SW

DIO

51

PC

2/T

DI

50

PC

3/T

DO

/SW

O49

PB

3/I2

C0S

DA

48

PB

2/I2

C0S

CL

47

PB

146

PB

045

PD

5/U

SB

DP

44

PD

4/U

SB

DM

43

VDD42

OS

C1

41

OS

C0

40

GND39

RS

T38

VB

AT

37

XO

SC

136

GN

DX

35

XO

SC

034

HIB

33

D2

LED

_R

ED

C26

.1uF

R16

10K

C45

2.2

uF

R3

.15E

C24

.1uF

R29

330E

R5

330E

D1

LED

_R

ED

C27

.1uF

R21

22K

SW

4

TA

CT

SW

ITC

H

11

22

33

44

SW

5

TA

CT

SW

ITC

H

11

22

33

44

C42

.1uF

C8

470PF

C36

.1uF

R24

0E

C30

100uF

R13

.15E

C44

100uF

J8 CO

N2

1 2

R35

27K

U3

TPS

76833

GND1

EN

2

IN3

IN4

OU

T5

OU

T6

FB

/NC

7

PG

8

C7

10PF

R25

0E

J2

CO

N5

1 2 3 4 5

F1

FU

SE

C35

.1uF

C32

2.2

uF

R33

27K

C29

.1uF

Y3

16M

hz

R11

36K

C38

.1uF

www.ti.com

Appendix A Schematic

Figure 7. Schematic

12 Thermal Printer Reference Design Using TM4C1233H6PM SPMA071–March 2014Submit Documentation Feedback

Copyright © 2014, Texas Instruments Incorporated

Page 13: Thermal Printer Reference Design Using TM4C1233H6PM Multiple

IMPORTANT NOTICETexas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, enhancements, improvements and otherchanges to its semiconductor products and services per JESD46, latest issue, and to discontinue any product or service per JESD48, latestissue. Buyers should obtain the latest relevant information before placing orders and should verify that such information is current andcomplete. All semiconductor products (also referred to herein as “components”) are sold subject to TI’s terms and conditions of salesupplied at the time of order acknowledgment.TI warrants performance of its components to the specifications applicable at the time of sale, in accordance with the warranty in TI’s termsand conditions of sale of semiconductor products. Testing and other quality control techniques are used to the extent TI deems necessaryto support this warranty. Except where mandated by applicable law, testing of all parameters of each component is not necessarilyperformed.TI assumes no liability for applications assistance or the design of Buyers’ products. Buyers are responsible for their products andapplications using TI components. To minimize the risks associated with Buyers’ products and applications, Buyers should provideadequate design and operating safeguards.TI does not warrant or represent that any license, either express or implied, is granted under any patent right, copyright, mask work right, orother intellectual property right relating to any combination, machine, or process in which TI components or services are used. Informationpublished by TI regarding third-party products or services does not constitute a license to use such products or services or a warranty orendorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of thethird party, or a license from TI under the patents or other intellectual property of TI.Reproduction of significant portions of TI information in TI data books or data sheets is permissible only if reproduction is without alterationand is accompanied by all associated warranties, conditions, limitations, and notices. TI is not responsible or liable for such altereddocumentation. Information of third parties may be subject to additional restrictions.Resale of TI components or services with statements different from or beyond the parameters stated by TI for that component or servicevoids all express and any implied warranties for the associated TI component or service and is an unfair and deceptive business practice.TI is not responsible or liable for any such statements.Buyer acknowledges and agrees that it is solely responsible for compliance with all legal, regulatory and safety-related requirementsconcerning its products, and any use of TI components in its applications, notwithstanding any applications-related information or supportthat may be provided by TI. Buyer represents and agrees that it has all the necessary expertise to create and implement safeguards whichanticipate dangerous consequences of failures, monitor failures and their consequences, lessen the likelihood of failures that might causeharm and take appropriate remedial actions. Buyer will fully indemnify TI and its representatives against any damages arising out of the useof any TI components in safety-critical applications.In some cases, TI components may be promoted specifically to facilitate safety-related applications. With such components, TI’s goal is tohelp enable customers to design and create their own end-product solutions that meet applicable functional safety standards andrequirements. Nonetheless, such components are subject to these terms.No TI components are authorized for use in FDA Class III (or similar life-critical medical equipment) unless authorized officers of the partieshave executed a special agreement specifically governing such use.Only those TI components which TI has specifically designated as military grade or “enhanced plastic” are designed and intended for use inmilitary/aerospace applications or environments. Buyer acknowledges and agrees that any military or aerospace use of TI componentswhich have not been so designated is solely at the Buyer's risk, and that Buyer is solely responsible for compliance with all legal andregulatory requirements in connection with such use.TI has specifically designated certain components as meeting ISO/TS16949 requirements, mainly for automotive use. In any case of use ofnon-designated products, TI will not be responsible for any failure to meet ISO/TS16949.Products ApplicationsAudio www.ti.com/audio Automotive and Transportation www.ti.com/automotiveAmplifiers amplifier.ti.com Communications and Telecom www.ti.com/communicationsData Converters dataconverter.ti.com Computers and Peripherals www.ti.com/computersDLP® Products www.dlp.com Consumer Electronics www.ti.com/consumer-appsDSP dsp.ti.com Energy and Lighting www.ti.com/energyClocks and Timers www.ti.com/clocks Industrial www.ti.com/industrialInterface interface.ti.com Medical www.ti.com/medicalLogic logic.ti.com Security www.ti.com/securityPower Mgmt power.ti.com Space, Avionics and Defense www.ti.com/space-avionics-defenseMicrocontrollers microcontroller.ti.com Video and Imaging www.ti.com/videoRFID www.ti-rfid.comOMAP Applications Processors www.ti.com/omap TI E2E Community e2e.ti.comWireless Connectivity www.ti.com/wirelessconnectivity

Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265Copyright © 2014, Texas Instruments Incorporated