Giter Club home page Giter Club logo

parallel-thermal-printer's Introduction

Arduino Parallel Thermal Printer library

An elegant and efficient Arduino library for controlling thermal printers (POS) that got a parallel or a Centronix port. The library is based on the Adafruit serial thermal printer library.

Serial printer mode

The Serial_printer example sketch lets you print text from the serial monitor. Note that you need a "real" serial terminal program that supports that supports sending ASCII control characters such as Ctrl + B, Ctrl + U and Ctrl + X in order to bold, underline and cut the paper. Recommended Serial terminals are Tera Term (Windows) and CoolTerm (Mac).

Supported hardware

Any Arduino compatible microcontroller with hardware serial and at least 11 IO pins.

Installation

Click on the "Download ZIP" button. Exctract the ZIP file, and move the extracted folder to the location "~/Documents/Arduino/libraries". Create the "libraries" folder if it doesn't exist. Open Arduino IDE, and a new library called "Parallel Thermal printer" will show up under the "examples" menu.

Constructors

AVR only

Use this constructor if you're using a single physical port for your parallel data bits (AVR microcontrollers only):

Printer Thermal(&PORTC, strobePin, busyPin, selectPin);

// Identical:
Printer Thermal(&PORTC, strobePin, busyPin, selectPin, MSBFIRST);

If the data bits are flipped:

Printer Thermal(&PORTC, strobePin, busyPin, selectPin, LSBFIRST);

All Arduino compatible microcontrollers

Use this constructor if you're using separate pins for your parallel data bits (All arduino compatible microcontrollers):

Printer Thermal(/*bit 7*/ dataPin7, /*bit 6*/ dataPin6, /*bit 5*/ dataPin5, /*bit 4*/ dataPin4, /*bit 3*/ dataPin3, /*bit 2*/ dataPin2, /*bit 1*/ dataPin1, /*bit 0*/ dataPin0, strobePin, busyPin, selectPin);
// Identical
Printer Thermal(/*bit 7*/ dataPin7, /*bit 6*/ dataPin6, /*bit 5*/ dataPin5, /*bit 4*/ dataPin4, /*bit 3*/ dataPin3, /*bit 2*/ dataPin2, /*bit 1*/ dataPin1, /*bit 0*/ dataPin0, strobePin, busyPin, selectPin, MSBFIRST);

If the data bits are flipped:

Printer Thermal(/*bit 0*/ dataPin0, /*bit 1*/ dataPin1, /*bit 2*/ dataPin2, /*bit 3*/ dataPin3, /*bit 4*/ dataPin4, /*bit 5*/ dataPin5, /*bit 6*/ dataPin6, /*bit 7*/ dataPin7, strobePin, busyPin, selectPin, LSBFIRST);

parallel-thermal-printer's People

Contributors

mcudude avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

parallel-thermal-printer's Issues

Printer isn't responding

I've got atmega8l with 1MHz internal clock, simple parallel printer, tested with inverted and non-inverted bits.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.