R. Theagarajan. ME., MSc., PhD Rtd. Professor in Engineering email: rtheagarajan@yahoo.com rtrajan59@gmail.com
Most of the Microprocessor / Micro-controller applications will have two things in common • Reading data from an external device for example Keyboard • Writing data into an external device for example PRINTER
Special ICs are available for this purpose. Such ICs are called Programmable Peripheral Interface. It can be programmed to do a specific function like Input / Output.
Printer Manufactures • • • • • • • •
CANON CITIZEN COMPAQ EPSON HEWLETT PACKARD LG NEC OKI
• • • • • • •
PANASONIC RICOH SAMSUNG SHARP TOSHIBA TVSE WANG
Printer Cable Ribbon type Multi-core round type 25 pin ‘D’ type Connector
1.5 m for parallel printer 150 m for serial printer
36 pin Connector ‘Amphenol’
Printer Interface
25 pin Connector
36 pin Connector
System Printer Printer Cable
Printers
• Parallel
Printers
-
8 bits at a time data is transferred Data is transferred through LPT1 or LPT2 from the computers Printer software must be installed Parallel port can be identified with 25 pin Female connector in the computers
Printers • Serial Printers ONE bit at a time data is transferred Printer software must be installed Format 8, 10 or 11 bit, Baud rate COM port can be identified with 9 pin Male connector in the computers In computers, Data is transferred through COM1 / COM2 / USB USB port can be identified with 4 pin Single Line connector
Printer Cable Ribbon type Multi-core round type 25 pin ‘D’ type Connector
150 m for serial printer
9 pin ‘D’ type Connector
Printer Cable Ribbon type Multi-core round type 9 pin ‘D’ type Connector
150 m for serial printer
9 pin ‘D’ type Connector
Printer Types • Daisy Wheel Printer
Draft mode Letter Quality mode
Printer Types • Daisy Wheel Printer
Draft mode Letter Quality mode
• Dot Matrix Printer 9 pins 24 pins
80 column printer 136 column printer
Printer Types • Daisy Wheel Printer
Draft mode Letter Quality mode
• Dot Matrix Printer 9 pins 24 pins
80 column printer 136 column printer
• Ink Jet Printer • Laser Printer
Dot Matrix Printers
R
L Light Source & Detector
Print Head Assembly
Light Source & Detector
Metal support
Dot Matrix Printers
Stepper Motor 1 Rubber belt
R
L Light Source & Detector
Print Head Assembly
Light Source & Detector
Metal support
Dot Matrix Printers
Stepper Motor 2
Stepper Motor 1 Paper Reamer
Rubber belt
R
L Light Source & Detector
Print Head Assembly
Light Source & Detector
Metal support
Dot Matrix Printers
Stepper Motor 2
Stepper Motor 1 Paper Reamer
Rubber belt
Tape
R
L Light Source & Detector
Print Head Assembly
Light Source & Detector
Metal support
Dot Matrix Printers
Stepper Motor 2
Stepper Motor 1 Paper Reamer
Paper
Rubber belt
Tape
R
L Light Source & Detector
Print Head Assembly
Light Source & Detector
Metal support
Print Head Assembly • Dot Matrix Printer 9 pins 24 pins Each character may be represented with 5 x 7 matrix format
Print Head Assembly Data bit is 1 to energies the coil Data bit is 0 to de-energies the coil
D0 D1 D2 D3 D4 D5 D6 C1 C3 C5 C2 C4
Data for C1 = x 1 1 1 1 1 0 0 Data for C2 = x 0 0 1 0 0 1 0 Data for C3 = x 0 0 1 0 0 0 1 Data for C4 = x 0 0 1 0 0 1 0 Data for C5 = x 1 1 1 1 1 0 0
Printer Interface System
Ground
Printer
Ground
Printer Interface System
Printer
Select - In
Ground
Ground
Printer Interface System
Printer
Select - In
Select - Out
Ground
Ground
Printer Interface System
Printer
Select - In
Select - Out Initialization
Ground
Ground
Printer Interface System
Printer
Select - In
Select - Out Initialization
Data Bus
Ground
Ground
Printer Interface System
Printer
Select - In
Select - Out Initialization
Data Bus Strobe
Ground
Ground
Printer Interface System
Printer
Select - In
Select - Out Initialization
Data Bus Strobe Acknowledge
Ground
Ground
Printer Interface System
Printer
Select - In
Select - Out Initialization
Data Bus Strobe Acknowledge Busy
Ground
Ground
Printer Interface System
Printer
Select - In
Select - Out Initialization
Data Bus Strobe Acknowledge Busy Paper End
Ground
Ground
Printer Interface System
Printer
Select - In
Select - Out Initialization
Data Bus Strobe Acknowledge Busy Paper End
General Error Ground
Ground
Printer Interface System
Printer
Select - In
Select - Out Initialization
Data Bus Strobe Acknowledge Busy Paper End
General Error Auto Feed Ground
Ground
PPI - 8255
CWR Data Bus
Port A
8
A0
Port B
8
A1 RD WR Chip Select
Port C
4 4
CS
Control Word
D7
D6
D5
D4
D3
Group - A D3 = Port C Upper D4 = Port A D6 D5 = Mode selection 00 – Mode 0 01 – Mode 1 10 – Mode 2 1 – I / O mode 0 – Bit set/reset mode
D2
D1
D0
Group - B D0 = Port C Lower D1 = Port B 1 – Input 0 - Output
D2 = Mode selection 0 – Mode 0 1 – Mode 1
Printer Interface 8255 Controller
CWR
P0
Port A
8 Printer
A0
Port B
5
Port C
4
A1 RD WR
A2 – A15
ALE
Address Decoder
CS
Printer Interface
P0
Data Bus
74244
5
CS
74273
Controller
A0 – A15
CS
8
74175
4
ALE CS
Address Decoder
Printer
Ink-Jet Printers Each character may be represented with 5 x 7 7 x 7 7 x 11 9 x 13 matrix format
Ink-Jet Printers Each character may be represented with 5 x 7 7 x 7 7 x 11 9 x 13 matrix format
Ink-Jet Printers
Laser-Jet Printers
Avoid Plastics Plant a Tree Let us take care of our earth for future generation