CENTRONICS interface and Parallel Printer Port LPT



Similar documents
RS-232 Communications Using BobCAD-CAM. RS-232 Introduction

LDG Electronics External Meter Serial Communications Protocol Specification

XR-500 [Receipt Printer User s Manual ]

TCP/IP MODULE CA-ETHR-A INSTALLATION MANUAL

PCMCIA 1 Port RS EDITION OCTOBER 1999

Quick Installation. A Series of Intelligent Bar Code Reader with NeuroFuzzy Decoding. Quick Installation

Advanced Data Capture and Control Systems

LTM-1338B. Plus Communications Manual

PM1122 INT DIGITAL INTERFACE REMOTE

SUDT AccessPort TM Advanced Terminal / Monitor / Debugger Version 1.37 User Manual

CONCEPT1 RS232 COMMUNICATION

RS232C < - > RS485 CONVERTER S MANUAL. Model: LD15U. Phone: / 97 / 98 (M)

To perform Ethernet setup and communication verification, first perform RS232 setup and communication verification:

Aquadyne TechTip TITLE: TROUBLESHOOTING PC COM PORT AND MODEM PRODUCTS AFFECTED SYMPTOMS POSSIBLE CAUSES

Data Cables. Schmitt TTL LABORATORY ELECTRONICS II

Computer Performance. Topic 3. Contents. Prerequisite knowledge Before studying this topic you should be able to:

LINDY ELECTRONICS LIMITED & LINDY-ELEKTRONIK GMBH - SECOND EDITION

ALL-USB-RS422/485. User Manual. USB to Serial Converter RS422/485. ALLNET GmbH Computersysteme Alle Rechte vorbehalten

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

Application Note: Connecting to a 2500 Series Processor using PLC Workshop

Using HyperTerminal with Agilent General Purpose Instruments

Application Note, V2.2.1, July 2003 AP OCDS Level 1 JTAG Connector. 16-Bit & 32-Bit Microcontrollers. AI Microcontrollers. Never stop thinking.

WTP-150 Receipt Printer User s Manual

USB to RS-422/485 Serial Adapter

WHQL Certification Approval...2 User Interface K software FIFO 4 Universal PCI Interface...5 Ready for 64-bit System...5

1 Serial RS232 to Ethernet Adapter Installation Guide

Installing Your POS Hardware

EPSON Perfection 2450 PHOTO. Scanner Parts. Scanner Specifications. Basic Specifications. US letter or A4 size ( inches [ mm])

Connecting instruments serially to your computer

Synergy Controller Application Note 4 March 2012, Revision F Tidal Engineering Corporation Synergy Controller Bar Code Reader Applications

RS232 Programming and Troubleshooting Guide for Turbo Controls

Technical Manual. For use with Caller ID signaling types: Belcore 202, British Telecom, & ETSI

METROLOGIC INSTRUMENTS, INC. IS4225 ScanGlove USB Addendum for the MetroSelect Single-Line Configuration Guide

2 ASCII TABLE (DOS) 3 ASCII TABLE (Window)

Serial/ Parallel Combo PCi Card user manual

Programming and Using the Courier V.Everything Modem for Remote Operation of DDF6000

TASCAM SS-CDR200/SS-R200 CONTROL I/O Terminals RS-232C Protocol Specifications

Chapter 3: Computer Hardware Components: CPU, Memory, and I/O

Driver Pant 8 and antenna switcher Ant 8. User manual

TP- 051 GPS RECEIVER

PRT3 Printer Module: ASCII Protocol Programming Instructions

LS-101 LAN to Serial Device server. User s Manual

Connecting the Console Port to a PC

BIT COMMANDER. Serial RS232 / RS485 to Ethernet Converter

TERMINAL Debug Console Instrument

Allen-Bradley. Bar Code. 2-D Hand-Held. Programming Guide. Bar Code. Scanners. (Cat. No HTG-4)

Metrologic MS1690 2D Scanner Installation Guide

By4750. USB Serial Converter (RS232 RS485)

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide

Smarthome SELECT Bluetooth Wireless Stereo Audio Receiver and Amplifier INTRODUCTION

Software Manual RS232 Laser Merge Module. Document # SU Rev A

ISHIDA BC Scale to Scale Communications

Using a USB to Serial adapter and Terminal Emulator in Windows 7 to communicate with a DM101

IP SERIAL DEVICE SERVER

DSX Master Communications

A RF18 Remote control receiver MODULE

RedTitan Print2PC Parallel Port Converter. Quick Installation Guide - US English. Product contents. Introduction. PC System Requirements

DT105X / PB105 Series

PROLOGIX GPIB-USB CONTROLLER USER MANUAL VERSION May 14, 2013 PROLOGIX.BIZ

How To Connect A Port Replicator With An Ethernet To A Usb Port From A Usb Device

Signature Center Getting Started Guide

2-Pair. Managed SHDSL Ethernet Extender. User s Manual

Work with Arduino Hardware

4469 en / c. Ready. Run Start. Stop LCL RMT. Reset USB MODULE. Communications module. User Guide

EPSON Perfection 1650/1650 PHOTO. Scanner Parts. Scanner Specifications. Basic Specifications. device Effective pixels

Fanuc 0 M/T Model C Serial (RS232) Connection Guide

OWNERS MANUAL. WattsVIEW. Power Monitor Model: DC WattsVIEWTM. Models: DC Serial DC-1000 USB DC-25000

Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester

USB to Serial Quick Installation Guide

How to Install a Motherboard

IP Link Device Interface Communication Sheet

Serial Communications

Network Operation and Troubleshooting

Appendix A. This Appendix includes the following supplemental material:

RJ45 Shielded (standard) port pinout. CS9000, Jetstream , Lanstream 2000, RTA8/RJX, RRC16, MTA8/RJX & SXDC8/RJX

Application Note. Terminal Server G6

In-System Programmer USER MANUAL RN-ISP-UM RN-WIFLYCR-UM

Timeout The Crosspoint Status Request message has a timeout, which means that you need to wait 1 second in between request messages.

MCB3101 (Class I) WiRobot Serial Bluetooth Wireless Module User Manual

RS232 Board datasheet

POS UNITS. Installation and user guide. Count, video recording and POS control unit ENGLISH

Configuring Serial Terminal Emulation Programs

PFB366 Profibus-DP Gateway User Manual

BE635 User Manual. Rev. V Bolymin, Inc. All Rights Reserved.

RS-232 COMMUNICATIONS

Rack mounted telephone- and leased line modem for industrial applications

CITIZEN OPOS DRIVER 1.8 Setup Guide. 10/03/29 Rev 1.09

Ethernet 241 (USB/Serial) Quick Start Guide

Industrial Multi-port Serial Cards

Customer Pole Display SERIES 8035

CPB. Doc. N MO-0279-ING MODBUS/PROFIBUS DP CONVERTER TYPE CPB. Microener - Copyright 2010 Date Rev. 0

Laser Barcode Scanner User s Manual

Experiments: Labview and RS232

Different Ways of Connecting to. 3DLevelScanner II. A.P.M Automation Solutions LTD. Version 3.0

Modbus and ION Technology

WHQL Certification Approval...2 User Interface...3 SUNIX s COMLab..4

Remote control circuitry via mobile phones and SMS

isco Connecting Routers Back to Back Through the AUX P

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

OPERATOR INTERFACE PRODUCTS APPLICATION NOTE. Xycom 4800/2000 OIL (Operator Interface Language)- Series Terminals: Backup and Restore with ProComm

Transcription:

Course on BASCOM 8051 - (37) Theoretic/Practical course on BASCOM 8051 Programming. Author: DAMINO Salvatore. CENTRONICS interface and Parallel Printer Port LPT The Parallel Port, well known as LPT from Line Printer (that is a term derived from Line Printer Terminal) is an interface originally used to connect a computer to a printer or a plotter. After time, when the bidirectional version was developed, it is widely used also to connect other peripheral devices as Scanner, ZIP unit, Hard Disk, CD-ROM reader, Webcam, etc. The port came out as Unidirectional interface, and it sent data only from computer to connected peripheral, but then it has been improved with a Bidirectional standard (IEEE 1284). LPT Port. DB25 Female Connector. Today the parallel port in the PC environment is almost no more used, but this doesn t happen in the industrial fields. For the connections, especially for the printers, now are commonly used other communication standard as the USB, that is a multifunction serial communication. The LPT allows the connection of many different peripheral devices and it transfers 8 parallel bits with the TTL standard. On computer the port is a Female connector commonly named DB25 complete of 25 pins. On printer side it is available a different connector, named Centronics, according with the name of the first producer. The presence of 8 GND wires and of twisted couple cables, allows to obtain a sufficient shielding of the signals. 242

Pin Number (DB25) Pin Number Centronics Signal Name Direction Register - Bit 1 1 /STROBE Out Control-0 Yes 2 2 Data1 In/Out Data0 3 3 Data2 In/Out Data1 4 4 Data3 In/Out Data2 5 5 Data4 In/Out Data3 6 6 Data5 In/Out Data4 7 7 Data6 In/Out Data5 8 8 Data7 In/Out Data6 9 9 Data8 In/Out Data7 10 10 /ACK In Status-6 Yes 11 11 Busy In Status-7 12 12 Paper Empty In Status-5 13 13 Select In Status-4 14 14 /Auto Linefeed Out Control-1 Yes 15 32 /Error /Fault In Status-3 Yes 16 31 /Reset Out Control-2 Yes 17 36 Mode Out Control-3 Printer Select-In 18-25 19-3 0 Ground GND - - Signals on Female DB25 and Centronics Connectors. Signal Inverted by Hardware Below are described the main signal s waveforms, during the transmission of a Byte from a PC Controller to a Printer. Waveform Diagram of a Print operation: Byte Transmission. 243

Some of the signals described in the previous table are not necessary for a printer management and the really required ones are those listed on the waveform diagram. In other words, over the 8 Data bits, the process starts with a pulse on /STROBE signal, generated from PC, and continues with a printer response with an /ACK transition. A BUSY signal, generated from printer, can stop the communication on PC side. Through this technique the printer can stop the communication with PC until it is again ready to print new data. LPT Port. Pin-Out and Signals of the DB25 Female Connector. The typical signals, available on LPT interface, are described in previous figures. These describe also the directions of the involved signals. Obviously, according with used printer, not all the typical signals are available; the minimum signals number, that normally are placed on connector, are those described on the Waveform diagram of a Print operation figure. 244

INDUSTRIAL SMALL PRINTER. The industrial printers are widely diffused and frequently we don t recognize them when they are used in many different applications. Some Models of Printing Mechanisms. For example, when you are at the bar shop and you order a coffee, once you pay the bill, the dealer gives you a ticket with the consumption description and price. This ticket is produced by a small printer, usually thermal printer, that writes the information on a proper paper tape. Tipycal Panel Thermal Printer. 245

The thermal printing mechanism, with panel mounting feature, is a very small and really light Electronic-Mechanical component provided of its own CPU that executes a specific management program and it is capable to receive the characters to print on the paper tape. For example, by choosing the model Custom type PLUS II, the width of the paper is 58 mm. The diameter of the paper roll is 30 mm. Tipycal Impact Printing mechanism, model Epson M-150. These small printers are normally available with many different communication interfaces as the Parallel, RS 2 3 2, USB, etc. standards in order to cover all the possible requirements. Tipycal Thermal Printer for Labels. 246

In this chapter we ll examine the Hardware/Firmware interface of a generic small parallel printer and a Mini Module. For this purpose it is used the Centronics interface section, available on didactic board DEB 0 1, with the following electric diagram. Diagram of the Interface from Standard I/O and Centronics Connectors. DEB 01 (Didactics Experimental Board) Card. For the connections it is necessary to use the CN4 and CN3 connectors of GMM TST3. On the program sources you can find all the detailed information about required connections. 247

Example.072. Centronics Interface. Prints a Row Typed on Console. Added Definitions: Added Declarations: Added Instructions: Added Operators: Example program 072 of BASCOM 8051 course. It prints a string, typed from console, on a parallel printer provided of CENTRONICS interface. First of all the string is acquired and then it is sent with additional codes CR (Carriage Return) and LF (Line Feed) that ensure the correct printing. The CENTRONICS interface of the printer must be connected to I/O lines of Mini Module; this connection must be performed with the relationship described below in the definitions, and it can be easily performed with the card GMM TST3 and a card that wires the signals. In details the program requires the following connections: - GMM 5115 mounted on socket Z2 of GMM TST3; - CN5 of GMM TST3 connected to serial line of console; - CN4 of GMM TST3 connected to CN14 of DEB 01, through 20 pins flat cable; 248

- CN13 of DEB 0 1 connected to CENTRONICS interface of the printer, by using a proper cable (i.e. those used to connect parallel printer to PC). The CENTRONICS interface has many signals and this program initializes all them but then it uses only a small subset reduced to /STROBE and BUSY. The program describes its functionalities and ask for the string to print on a serial console provided of monitor and keyboard with a fixed physical protocol at 19200 Baud, 8 Bit x chr, 1 Stop bit, No parity. This console can be another system capable to support a serial RS 2 3 2 communication. In order to simplify the use it can be used a PC provided of one COMx line, that execute a terminal emulation program as HYPERTERMINAL or the homonym modality provided by BASCOM 8051 (see IDE Configuration). The program uses some names in order to identify the used signals, that are those already used in electric diagrams and technical manuals of GMM TST3 and DEB 01 cards!! The program works only when the GMM 5115 is mounted on Z2 socket of GMM TST3!! 249

Example.073. Centronics Interface. Acquire data from RS 2 3 2 Serial Line and Drives a Printer. Added Definitions: Added Declarations: Added Instructions: ON SERIAL ; ENABLE SERIAL Added Operators: Example program 073 of BASCOM 8051 course. It prints the characters received from RS 2 3 2 serial line, with Interrupt save buffer, on a parallel printer provided of CENTRONICS interface. The CENTRONICS interface of the printer must be connected to I/O lines of Mini Module; this connection must be performed with the relationship described below in the definitions, and it can be easily performed with the card GMM TST3 and a card that wires the signals. In details the program requires the following connections: - GMM 5115 mounted on socket Z2 of GMM TST3; - CN5 of GMM TST3 connected to serial line of console; - CN4 of GMM TST3 connected to CN14 of DEB 01, through 20 pins flat cable; - CN13 of DEB 0 1 connected to CENTRONICS interface of the printer, by using a proper cable (i.e. those used to connect parallel printer to PC). 250

The CENTRONICS interface has many signals and this program initializes all them but then it uses only a small subset reduced to /STROBE and BUSY. The program describes its functionalities and wait the reception of characters from console serial line that are saved into a circular buffer in FIFO modality (first in, first out). When the buffer contains characters, these are acquired and sent to printer. In other words the program acts as a converter of a parallel printer into a serial printer. The serial line uses a fixed physical protocol at 19200 Baud, 8 Bit x chr, 1 Stop bit, No parity and it can be any system capable to support a serial RS 232 communication. In order to simplify the use it can be used a PC provided of one COMx line, that execute a terminal emulation program as HYPERTERMINAL or the homonym modality provided by BASCOM 8051 (see IDE Configuration). The program uses some names in order to identify the used signals, that are those already used in electric diagrams and technical manuals of GMM TST3 and DEB 01 cards!! The program works only when the GMM 5115 is mounted on Z2 socket of GMM TST3!! 251

Example.074. Centronics Interface. It Emulates a Printer and it Sends the Data on a RS 232 Line. Added Definitions: Added Declarations: Added Instructions: ON INT0 ; ENABLE INT0 Added Operators: Example program 074 of BASCOM 8051 course. It emulates a parallel printer provided of CENTRONICS interface, by using GMM 5115 Mini Module. The data sent to emulated printer are saved into a circular buffer and displayed on serial console, in ASCII format. The CENTRONICS interface of the system that should drive the printer (ie. PC) must be connected to I/O lines of Mini Module; this connection must be performed with the relationship described below in the definitions, and it can be easily performed with the the cards GMM TST3 and DEB 0 1. In details the program requires the following connections: - GMM 5115 mounted on socket Z2 of GMM TST3; - CN5 of GMM TST3 connected to serial line of console; - CN4 of GMM TST3 connected to CN14 of DEB 01, through 20 pins flat cable; 252

- CN13 of DEB 0 1 connected to CENTRONICS interface, by using a proper DB25M+DB25M direct cable (1:1). In order to ensure program execution it is necessary to supply power to Mini Module, or reset it, when the CENTRONICS interface is not connected and link it later; in fact whenever the last printed data has the less significant bit at low level (D1=0) the correspondent line (P1.0 DSW1.1 T2 DL1) is low too and so it selects the Debug modality of GMM 5115!! The program describes its functionalities and shows the data sent to printer on a serial console provided of monitor, with a fixed physical protocol at 19200 Baud, 8 Bit x chr, 1 Stop bit, No parity. This console can be another system capable to support a serial RS 2 3 2 communication. In order to simplify the use it can be used a PC provided of one COMx line, that execute a terminal emulation program as HYPERTERMINAL or the homonym modality provided by BASCOM 8051 (see IDE Configuration). The program uses some names in order to identify the used signals, that are those already used in electric diagrams and technical manuals of GMM TST3 and DEB 01 cards!! The program works only when the GMM 5115 is mounted on Z2 socket of GMM TST3!! 253