Peripheral and Interfacing Assignment
Peripheral and Interfacing Assignment
Assignment:
Submitted To:
Khan Md. Hasib
Lecturer & Coordinator
Bangladesh University
Submitted By:
ID: 201731049079
A mouse is something you push along your desktop to make a cursor (pointing device)
move on your screen. So what a mouse has to do is figure out how much you're moving
your hand and in which direction. There are two main kinds of mice and they do this job
in two different ways, either using a rolling rubber ball (in a ball-type mouse) or by
bouncing a light off your desk (in an optical mouse).
Traditional mice have a rubber ball inside them. Open one up and you can see the heavy ball
clearly and the spring that keeps it in position.
Here's the inside of a typical optical mouse and a few of the main components. The most
interesting bits are in the center (where the LED light shines down onto your desk) and at the
front (where button presses are detected by switches):
1. An LED at the back generates red light and shines it horizontally, from the back of the
mouse toward the front (from the left to the right of this photo).
2. A plastic light guide channels the light from the LED at an angle, down onto the desk.
3. A light-detector chip measures light reflected back up from the desk, converting the
analog movements of your hand into digital signals that can be sent to your computer.
4. The scroll wheel at the front of the mouse is mounted on a switch mechanism that detects
both how much it's rotated and whether you've pressed it (it functions like the central
button of a conventional mouse). Rotations of the scroll wheel can be detected in a
variety of different ways. Some mice use potentiometers (broadly, variable resistors ),
similar to the volume control on a radio but able to turn around multiple times. Others use
various kinds of rotary switches or optical rotary encoders to convert analog wheel
movements to digital signals.
5. A microswitch detects when you press the right mouse button. There's an identical switch
on the other side to detect the left mouse button.
6. The USB cable connection carries digital information from the mouse to your computer.
2. Describe the whole architecture of Keyboard.
Answers :
A computer keyboard is an input device used to enter characters and functions into the
computer system by pressing buttons, or keys. It is the primary device used to enter text.
A keyboard typically contains keys for individual letters, numbers and special characters,
as well as keys for specific functions. A keyboard is connected to a computer system
using a cable or a wireless connection.Most keyboards have a very similar layout. The
individual keys for letters, numbers and special characters are collectively called
the character keys. The layout of these keys is derived from the original layout of keys on
a typewriter. The most widely used layout in the English language is called QWERTY,
named after the sequence of the first six letters from the top left.
Other sets of keys common to almost all keyboards are entering and editing keys (e.g.,
Enter, Delete, Insert), modifier keys (e.g., Control, Shift), navigation keys (e.g., arrows
for up, down, left, right) and lock keys (e.g., Caps Lock). Additional keys are very
operating system specific (such as the Windows and Apple keys).
Most keyboards also include a set of function keys at the top (F1, F2, etc.). The function
keys typically perform a very specific task within a particular software application. So,
what they do may depend on what you are doing on your computer at the time.
Most keyboards for desktop computers also contain a separate numeric keypad to the
right. Even though there are numeric keys already in a row near the top, having them all
close together makes it faster to enter numeric data. On smaller keyboards, like those on
most laptops, these numeric keypads are typically no longer present due to space
constraints.
Here, you can see a typical keyboard layout. Keep in mind that there are many different
variations on this layout, although most manufacturers follow this general pattern:
contains a table that maps modifier key combinations to specific
key-mapping tables; thus, different KCHRs may choose to
distinguish different modifier states, or may use the same key-
mapping table for many sets of modifiers. Then the Event
Manager posts an 'event' to the system event queue, specifying
that a key has been pressed and what character code it
represents.3 When the foremost application checks for user
events, it will see the key-down event and insert the character
code into its document.
Input methods
The descriptions above have been concerned only with 'simple'
keyboard layouts as implemented by keyboard layout resources.
There is a second quite different type of keyboard also
available: input methods: (IMs). Input methods are used for
languages such as Chinese, Japanese, and Korean, where it is
impractical to type all the required characters directly. An IM
may allow the user to type phonetically, for example, and then
present various matching ideographic characters for the user to
choose among.
In the Mac OS, IMs are plug-in software components that are
managed by the Text Services Manager. They can interact with
the user as needed, and with the current application if it
supports inline input:, or otherwise with a floating ('bottom-line')
input window, in order to determine the characters to be entered.
IMs may generate text either in legacy Mac OS encodings or in
Unicode, and TEC is used if necessary to match the input
method's output to the application's expected input. IMs are a
specialized topic that will not be discussed further here; details
are available in Apple's developer documentation.
Windows
In all versions of Windows since version 3, the keyboard
processing has been, principally, the same. The primary
differences between operating systems is over whether the final
WM_CHAR message contains a Unicode character code or an 8-
bit character code.
Windows supports different keyboards, both physically and
virtually, through the use of a keyboard DLL which has one entry
point. This entry point is a function which returns a complex data
structure containing various tables that the keyboard driver or
other routines use for converting things like scan codes to virtual
key codes or virtual key codes to character codes. Notice that the
keyboard DLL is not passed the data to convert, it simply returns
the necessary tables in an appropriate format for the calling
utility to do the conversion itself.
When you press a key on your keyboard, the hardware initiates
an interrupt and this is handled by the keyboard driver. This reads
the scan code: of the key pressed from the keyboard port. The
driver then takes that scan code and converts it to a virtual key
code. It then sends a VK_ message to the window that currently
has the focus, containing that virtual key code. The application
can then handle the messages directly or, as is most common, it
passes the messages through to the TranslateMessage() function
which then converts the VK_ message to a WM_CHAR message.
It does this by getting a mapping table from the keyboard DLL
and supporting, primarily a 1:1 mapping between virtual key
code and character code. In addition, the mapping can also
support dead keys and some simple ligatures (implemented like
dead keys). The WM_CHAR message is then resent to the same
window and either handled by the application or ignored (in
which case the keystroke is considered to be ignored).
Keyman
There are a number of locations that a keyboarding utility such as
Keyman can insert itself into this process. For Keyman 3.2,
Keyman worked by intercepting the WM_CHAR messages and
outputting its own instead8. With Keyman 5 and the arrival of
Unicode WM_CHAR messages, it is more appropriate, and in the
long run easier, to intercept the VK_ messages and to output
WM_CHAR messages. Thus, Keyman intercepts the VK_
keyboard message from the keyboard driver to the application
and either passes it on (i.e. no conversion of that key is being
done and the application uses the conventional handling of this
key) or it intercepts the message and outputs zero or more
WM_CHAR messages directly to the application. Since these are
WM_CHAR messages, they do not need to be further converted.
Since Keyman actually interprets keystrokes in terms of VK_
keyboard messages rather than WM_CHAR messages, the
character used in the Keyman file for a keystroke is simply a
mnemonic for a virtual key code. Keyman makes the necessary
interpretation in the compiler.
3. However, this general layout has remained remarkably unchanging over the years. This has
made it easy for users to transition from one computer system to the next and to use their
typing skills on multiple devices.
4. For many tasks, you need to press more than one key at the same time. For example, to get a
capital letter 'A,' you need to press the Shift key and the A key at the same time. When
reading or writing instructions for how to accomplish a particular task, this would be
described as 'Shift + A.' As another example, in most software applications, Ctrl + S means
to save the current document. If you have been using computers for some time, you are
probably familiar with a number of such combinations.
5. Want to know the most famous combination of all? Ctrl + Alt + Del, also referred to as
Control-Alt-Delete. In older computer systems, this actually rebooted your computer. Sort of
like pulling the power cord and plugging it back in again. In more modern versions of the
Windows operating system, the combination brings up options to log off or shut down, as
well as options to force a particular software application to quit. This is useful if you are not
able to exit an application in a regular fashion.
6. Working With Different Languages
7. Keyboards are language specific. While most keyboards around the world will also contain
regular English characters, they may contain separate keys for commonly used characters in
their local language that are not used in English, such as the accented letters in French. In
addition, languages like Japanese that use a totally different set of characters need unique
keys for those characters. Users can then switch between their own language and English
characters.
3. Describe
the
whole architecture
of Monitor.
Answer:
The advent of display technology has paved the way for the continuous evolution of the
monitor, whether it's for computers, television, mobile devices or any device that has a display.
The current contenders for top-tier technology being used for display devices includes Super
LCD 3 (SLCD3) and Super AMOLED. It should be noted that LED displays are actually just a
kind of LCD display that use LED lights as backlight illumination.
The quality of a monitor's performance is assessed using a few key factors:
Aspect Ratio: This is the relation of the vertical length to the horizontal length of the
monitor (e.g. 16:9 or 4:5).
Dot Pitch: This is the distance between each pixel in every square inch that's displayed.
The shorter the distance, the sharper and clearer the images are.
Display Resolution: Also known as dots per inch (DPI), this determines the number of
pixels per linear inch. The maximum number of pixels is determined by the dot pitch.
This determines the number of pixels the display screen can accommodate.
Size: This aspect is determined by the display screen’s diagonal measurement.
Types of monitors:-
There are essentially two types of monitors, with the second having two variations based on
backlighting (CCFL vs LED). The first (and oldest) is the CRT (cathode-ray tube) monitor,
which was based on the same technology as early televisions. The second is the LCD (liquid-
crystal display) monitor.
You must be able to outline the architecture of the central processing unit (CPU) and the
functions of the arithmetic logic unit (ALU) and the control unit (CU) and the registers within
the CPU.
Please know and understand:
1. ALU - The arithmetic logic unit executes all calculations within the CPU
2. CU - control unit, coordinates how data moves around
Registers, a memory location within the actual processor that work at very fast speeds. It stores
instructions which await to be decoded or executed.
1. PC - program counter - stores address of the -> next <- instruction in RAM
2. MAR - memory address register - stores the address of the current instruction being
executed
3. MDR - memory data register - stores the data that is to be sent to or fetched from memory
4. CIR - current instruction register - stores actual instruction that is being decoded and
executed
5. ACC - accumulator - stores result of calculations
Buses
3. control bus - sends control signals such as: memory read, memory write
Together, these buses may be referred to as the “system bus” or the “front-side bus”
The Printing Architecture is one of the major components from Windows architecture. It
consists of a print spooler and a set of printer drivers. The applications can create print jobs and
send them to the printers by calling device-independent Win32 printing and GDI functions.
Printer drivers include a user interface component that allows users to control a printer's
selectable options (Paper Size, Number of copies, Coloration, Pages per sheet, etc.).
An application's calls to Win32 GDI functions are passed to the GDI graphics engine, which
either spools the drawing instructions as an enhanced metafile (EMF) file or, in conjunction
with a printer driver, renders a printable image that can be sent to the spooler. Spooler
components interpret EMF files, and they can insert page layout information and job control
instructions into the data stream. The spooler then sends the data stream to the serial, parallel, or
network port driver associated with the target printer's I/O port. Spooler and driver components
are designed to be replaceable. Support for a new printer usually requires only the creation of
new data files for use with one of the Microsoft-supplied printer drivers.
Most of the device drivers work at kernel mode. Some of the device drivers or part of the device
drivers work at user mode and kernel mode. Printer drivers work at both modes.
Printing Process
Client processes
Spooler processes
Printer processes
Each process performs some operations and passes the print job to another process. For
example, user fires a print document from an application, the client process starts the creation of
print job by calling the GDI, and after completing the creation of print job, it sends to the
spooler. The spooler will perform some operations on that print job and sends to the printer
process. The printer processes receive the print job from the spooler process and translate the
print language into a bitmap, and then it prints.
Client Processes
A user sends a print job from an application. The application calls the Graphics Device
Interface (GDI). If print output is produced in RAW format, the GDI is not used. The GDI calls
the printer driver for information, which the GDI uses to create a job in printer language. The
GDI delivers the job to the spooler.
Spooler Processes
The client side of the spooler (Winspool.drv) makes an RPC call to the server side spooler
(Spoolsv.exe).
Spoolsv.exe calls the print router (Spoolss.dll).
The router (Spoolsv.dll) sends the print job to the Local Print Provider (LPP) or remote
print server if the job is being sent to a network printer.
The LPP polls print processors to find one that can handle the data type of the job.
The LPP sends the job to the print processor, which modifies the job as required to make
it print properly.
The print processor sends the job to the page separator. A separator page is added, as
required.
The job is sent to the appropriate port print monitor. If print is bidirectional, the job is
first sent to the language monitor such as the Printer Job Language (PJL) monitor, and then sent
on to the port monitor. If the job is unidirectional, the job is sent directly to the port monitor.
By supporting predefined sets of API functions, Windows print providers can supply the
following capabilities:
Print Queue Management: Adding, deleting, opening, closing, enumerating, and setting
parameters for print queues. Also, providing notification of changes to a print queue's state.
Printer Driver Management: Adding, deleting, enumerating, and specifying a directory
for printer drivers.
Print Job Creation: Starting and ending a document, starting and ending a document
page, writing the job's data stream to a port, reading printer status information.
Print Job Scheduling: Scheduling, enumerating, and setting parameters for a print job.
Forms Management: Adding, deleting, enumerating, and setting parameters for print
forms.
Print Processor Management: Adding, deleting, enumerating, specifying a directory for
and the data types supported by print processors.
Print Monitor Management: Adding, deleting, and enumerating print monitors.
Port Management: Adding, deleting, configuring, enumerating, and setting parameters
for printer ports.
Registry Management: Creating, deleting, and enumerating registry keys and values
associated with a print provider.
Other Capabilities: Displaying a message box, shutting down the print provider, reading
a memory mapped spool file, providing a communication path between port monitor UI DLLs
and port monitor server DLLs.
These capabilities are implemented as a set of functions defined by print providers. There are
many functions supported to define a print provider. Functions are divided into the following
groups:
Initialization Functions
Print Queue Management Functions
Printer Driver Management Functions
Print Job Creation Functions
Print Job Scheduling Functions
Forms Management Functions
Print Processor Management Functions
Print Monitor Management Functions
Port Management Functions
Registry Management Functions
Other Functions
1. USB Connector: It acts as an interface between the NAND flash memory chip and the
computer to which the pendrive is plugged. USB connector is usually protected by a removable
cap. Most pendrive uses a standard type-A USB connection which allows connection with a
port on a PC. The pendrive utilize the power from computer via USB connector.
2. USB mass storage controller (or the controller chip): This chip helps to retrieve the
information from the pendrive and it also helps in recording/reading the information on the
NAND flash memory. It is basically a microcontroller with on-chip RAM and ROM.
3. Test points: They are electric pins used to stimulate and exercise the pendrive during
assembly process.
4. NAND flash memory chip: Helps in the storage of files and all datas. Also it allows the
erasing the information so that we can delete files and put new files into the pendrive.
8. Space to put a second NAND flash memory chip: Additional slot to put another memory
chip which can increase the storage capacity.
Uses
Data Transport
Pendrive is commonly used to store and transport files like pictures, videos, any private
documents etc.
Security for the storage of Data, Application and Other software Files
The issue of data security and information security is very essential since the pendrive are used
in many outside environments. For providing security, today many encryption systems are used.
USB flash drive is used to carry the Computer Online Forensic Evidence Extractor (COFEE)
application. COFEE is a set of applications designed to search and extract digital evidence on
computers confiscated from suspects.
Today most PC firmware helps in permitting booting from a USB drive which helps to provide
the launch of an OS from a bootable pendrive.
Many operating systems can be installed from the pendrive. Some of the operating systems are
Windows7, Windows 8, Linux, Mac OS etc.
Backup
Today pendrives are used as a backup. By using the pendrive backup data is updated to the
drive.
Advantages of Pendrive
Portable and Lightweight.
Robust.
The flash memory used is non-volatile. Non- volatile memory is a type which helps to get
back the information or data stored even when there is no power.
Plug and play device. Plug and play means that the PC can recognize a device and load
the new drivers for the hardware and begins to work with the device connected.
Easy to use.
Data transfer is easy.
Durable and Reliable since they do not have any moving parts.
Disadvantages of Pendrive
Due to its small size, they may be lost or misplaced.
Limited to less number of erase and write cycles.
Virus can easily affect the pendrive and the files stored in it can be damaged.
Conclusion
USB is considered to be one of the standards used for communicating with the computer. But
Pendrive or USB flash drive is a data storage device. It’s known to the customer world through
different names like thump drive, jump drive, memory stick, key drive, USB etc. As of the year
2013, pendrive with storage capacity of 1TB is available. Eventhough they have many
disadvantages, its advantages make them to be used at a rapid pace with the increasing
advancement in technology.