The centronics port Interfacing to a PC.

Slides:



Advertisements
Similar presentations
PROGRAMMABLE PERIPHERAL INTERFACE -8255
Advertisements

Dr A Sahu Dept of Computer Science & Engineering IIT Guwahati.
CEN 226: Computer Organization & Assembly Language :CSC 225 (Lec#3) By Dr. Syed Noman.
 | bit OR & bit AND ~ bit NOT ^ bit EXLUSIVE OR (XOR) > bit RIGHT SHIFT.
EE1A Revision What should you be expected to do in a typical exam question ? Understanding of basic principles. Ability to perform simple circuit analysis.
True BASIC Ch. 6 Practice Questions. What is the output? PRINT X LET X = -1 PRINT X FOR X = 4 TO 5 STEP 2 PRINT X NEXT X PRINT X END.
CSCE 211: Digital Logic Design Chin-Tser Huang University of South Carolina.
OTHER COMBINATIONAL LOGIC CIRCUITS
1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter Chapter Interfaces: Parallel Port Systems Manufacturing Training.
EE 316 Computer Engineering Junior Lab Lecture on PC Parallel port.
PC 232 Serial Ports Ports –Connectors at back of PC –Plus related internal electronics to send/receive PC 232 Serial Port –Follows EIA/TIA 232 standards.
Number Systems and Codes In PLC
06/25/091 Computer Interfacing Via the Parallel Port Carlos M. Oppus ECCE Program, AdMU.
Parallel Ports of PC Methods of interfacing Examples.
University of Tehran 1 Interface Design Keyboard and Printer Omid Fatemi.
CHAPTER 10 Keyboard and Printer Interfacing. Matrix Keyboard.
Computers in Surveying SVY2301 / E4006 Automated Surveying.
Number Systems.
Computer Sensing and Control How is binary related to what we are trying to accomplish in electronics? The PC GadgetMaster II uses binary to communicate.
Basic I/O Interface A Course in Microprocessor
Lecture 13 Basic I/O Interface
Requirements for an Internet Connection The Internet is the largest data network on earth. Connection to the Internet can be broken down into the physical.
Multiplying and Dividing Decimals by 10, 100, and 1,000
FIGURE 9-1 General Parallel I/O Example Peter Spasov Microcontroller Technology: The 68HC11, Fourth Edition Copyright ©2002 by Pearson Education, Inc.
Input/Output 2 What is I/O? How we get the CPU to communicate with devices From the computer’s point of view, it’s just 1’s and 0’s Gets interpreted.
Number System. Number Systems Important Number systems – Decimal – Binary – Hexadecimal.
CPU Speaker Monitor Printer Touch pad Scanner Key Board Mouse Microphone.
Digital Systems Design VHDL simulation of a 3 – Bit Binary Decoder with Enable by Marc A. Mackey.
Printer Port * 0= * 1= * 6= 60 1 * 4 = 4 = 164 Decimal Binary We use Ten Symbols
CSCE 211: Digital Logic Design Chin-Tser Huang University of South Carolina.
Computers and Math Binary, Hex, and Decimal Oh My Copyright © Texas Education Agency, All rights reserved.1.
PPI-8255.
Basic LED Interface.
Programming PIC 16F84A in Assembly. PIC16F84 pin-out and required external components.
Binary Lesson 4a Hexadecimal and Binary Practice2.
Computer Architecture and Number Systems
Parallel Input/Output
Signal Name Direction w.r.t. Printer Function Summary Pin# (25-DB) CPU
Number Systems and Codes
INTRO Module 1 Boolean Math
Microprocessor and Microcontroller Fundamentals
Homework Reading Continue mp1 Labs Tokheim, Section 13-6 Questions?
Unit 18: Computational Thinking
IPCOWALA INSTITUTE OF ENGINEERING & TECHNOLOGY-DHARMAJ
RS232 Converter SB-DN-RS232N.
EPSII 59:006 Spring 2004.
C_ITCO011/C_ITCO111 LECTURER: E.DONDO
Number System conversions
Physics 413 Chapter 10.
Binary Quiz UIN: ____________________
USB Project (22nd July) Ian Coulter.
Instruction cycle Instruction: A command given to the microprocessor to perform an operation Program : A set of instructions given in a sequential.
Engineering 4862 Microprocessors Lecture 25
Number Systems and Codes
Binary / Hex Binary and Hex The number systems of Computer Science.
Binary Lesson 3 Hexadecimal
There are 10 types of people of people in this world…
COMPUTER PERIPHERALS AND INTERFACES
Binary Lesson 3 Hexadecimal
Binary Lesson 3 Hexadecimal
Lecture 9: Radix-64 Tutorial
Binary Lesson 3 Hexadecimal
Binary Lesson 4 Hexadecimal and Binary Practice
Binary Lesson 4 Hexadecimal and Binary Practice
Remember the 10 types of people of people in this world…
IP ADDRESSING.
Lec 7 Network Layer: Logical Addressing
Network Addressing.
Interface ckt for demo Outputs Inputs V PIN 0 10K PIN 4 GND GND
Function Notation.
Presentation transcript:

The centronics port Interfacing to a PC

Connection Devices are connected to the parallel port (LPT) using a 25-way D-connector.

Pinout of centronics port

Outputs We use D0 to D7 for most outputs D7 is the most significant bit We output all eight bits at once To get this output send 10011100 (binary), 156 (decimal) or 9C (hex) to the output port D7 D6 D5 D4 D3 D2 D1 D0 1

Address The output port is at address 378H Outputs use the command: OUT address, data Hexadecimal numbers can be written using &h at the start You can send 9CH to the output port using: OUT &h378, &h9C

Inputs The inputs are at address 379H The inputs can be read using INP(address) INP(&h379) behaves like a variable and has a value that depends on the inputs so is used in statements like this: S=INP(&h379)

Addresses of pins

Inputting S is now equal to 9FH To look at the input from the ERROR pin we need to input from the input port S=INP(&h379) D7 D6 D5 D4 D3 D2 D1 D0 BUSY ACK PE SLCT ERROR Not used 1 S is now equal to 9FH

Masking All the bit other than D3 need to be ignored – this is called masking D7 D6 D5 D4 D3 D2 D1 D0 BUSY ACK PE SLCT ERROR Not used 1

Making the mask The function AND is used for masking Put 0s where you want the bits to be ignored If D3 is 0 the answer is zero If D3 is 1 the answer is not zero D7 D6 D5 D4 D3 D2 D1 D0 Hex BUSY ACK PE SLCT ERROR Not used AND 1 9F 08 Answer

Code for inputting and masking S=INP(&h379) S=S AND &h08 IF S=0 THEN … IF S>0 THEN …