PPTX Slides

advertisement
Dr A Sahu
Dept of Computer Science &
Engineering
IIT Guwahati
• Peripheral communications
• Display
• LED Display
– Decoder
– Generic model
– Interfacing
• Character Display Monitor
– Decoder
– Generic Model
• Graphics monitor
– Why graphics? Vector Vs Raster
• Keyboard type and Interfaces
Processor
R
A
M
• Peripherals : HD monitor, 5.1 speaker
• Interfaces : Intermediate Hardware
– Nvidia GPU card, Creative Sound Blaster card
• Interfaces : Intermediate Software/Program
– Nvidia GPU driver , Sound Blaster Driver software
• Transmission Controller:
– MPU control, Device Control (DMA)
• Type of IO mapping
– Peripheral (IN/Out), Memory mapped IO (LD/ST,MV)
• Format of communication
– Synchronous (T & R sync with clock), Asynchronous
• Mode of Data Transfer
– Parallel, Serial (UART)
• Condition for data transfer
– Uncond., Polling, Interrupt, Ready signal, Handshake
7 Seg
9 Seg
16 Seg
3x5 DotMatix
5x7
9x11
Dot Matrix Display Panel
25x80 character monitor
Data
ASCII/BCD
Decoder
Or
Memory
Time to Decode
Display
Monitor/LEDs
Time to Display
• Data to 7 Segment Decoder
5
5v
a
1
D
0
C
0
B
0
A
g
LT
c 1
0
e 1
5V
RBI
BI
Decoder
a
1
0
b 1
f 1
b
f
1
Common
Cathode
g
e
d 1
RBO
d
c
• Data to 7 Segment Decoder
Blank
Blank
a b c d e f g
RBI
RBO
D C B A
0000
a b c d e f g
0
RBI
RBO
D C B A
0000
a b c d e f g
0
RBI
RBO
D C B A
0011
a b c d e f g
1
RBI
RBO
D C B A
0000
5V
1
a b c d e f g
RBI
RBO
D C B A
0111
1
40 Bit data line
2
0 1 3 4
Mod 5
Counter
Data 0
Data 1
Data 2
Data 3
Data 4
8 Bit data line
7 Segment Decoder
RAM
590
1:N Decoder
Counter
• Write a program to display contents of B,C,D
and E register to LED display
• Write to buffer memory to display to 7 Seg.
LEDs
• Use address FC H,FD H,FE H and FF H to
display
A7
A6
A5
A4
A3
A2
MPU
IO/M
RD
WR
Ctr
CS
A1
A0
Address
line
D7
D6
D5
D4
D3
D2
D1
D0
LE
74LS373
Latches
WR
RD
LEDs
Buffer
Memory
Data
lines
7 Seg.
Decoder
• Interface program to Display content of B,C,D
and E after 1 Sec Delay
DIS:
MVI
A,B
OUT
FCH
MVI
A,C
OUT
FDH
MVI
A,D
OUT
FEH
MVI
A,E
OUT
FFH
CALL DELAY
JMP DIS;
;1sec delay
Row
Ctr
0
1
2
Col
Ctr
CLK > 50Hzx25x80
0 1 2 3 4 ….. 78 79
C A T
F I R E
23
24
25x80 character monitor
A
Decoder
Or
ROM
Memory
Decoded
Bits
When
C=0
Ready
Counter
CS WR
Stream Buffer
Address
line
Char Frame
Buffer
Memory
Address (r,c)
Data
lines
• Delay of Monitor is 1/50 Sec, After Every 50
Second it makes ready
• From stream buffer it writes to Frame buffer after
getting command. (Flush stream command)
• LED is very high speed
– You can write to LEDs at very high speed
– Display meant for to see some thing (Is it good?)
• 30 Frames/Sec is more then enough for
human eye (>30 blink make human eye Fixed)
• No of blink > 30Hz
– Human can not differentiate ON/OFF state, it will
be seen AS ON state
• Video display make default 30-60 Frame/Sec
• Monitor run at speed 30-60 Frame/Sec
• Speed is fixed (60Frame/Sec)
for(i=0;i<10000;i++){
printf(“HelloWorld”);
}
• $ a.out
• $ a.out > outputfile
• $ a.out > /dev/null
•
•
•
•
•
Char display (80x25 char, 5x7pixel=400x175)
CRT Monitor (400x600, 640x480,600x800)
LCD Monitor (1024x768,1280x1024,…)
Graphics visually more appealing
Display Line, Circle, Rectangle, Curve, Polygon
– Character using this primitives
– True type font
RED ARROW
Circle
Row
Ctr
0
Col
Ctr
CLK > 1024x768x50Hz
1 2 3 4 ….. …1023
0
1
2
1024x768 Pixel LCD
767
Frame Buffer
8x3=24 Bits
R B G
Refresh screen 50 time a Sec
Pixels in Frame
Buffer
1 Bit Per Pixels
Pixels on
the Screen
Graphical representation of 1 bit color
Pixels in Frame
Buffer
15 Bit Per Pixels
Pixels on
the Screen
Graphical representation of 15 bit color
Pixels in Frame
Buffer
24 Bit Per Pixels
Pixels on
the Screen
Graphical representation of 24 bit color
1- bit color
8-bit color
16-bit color
• Vector graphics:
– Use geometrical primitives based
on mathematical equations, to
represent images in computer
graphics
– Points, Lines, Curve, shapes or
Polygons
• Raster Graphics: Complementary
to Vector Graphics
– Representation of images as an
array of pixels
– photographic images
• Store the primitives in the FILE
– Word, Photoshop, Xfig, GNUPlot, PS, HTML Tag
• Raster: Store the Pixel values in the FILE
– BMP, PNG, JPG
• At runtime, process the primitive and
generate Pixel to raster the screen (Display)
• Who do this?
– Software
– GPU (hardware accelerated routine)
• Computer font formats: TrueType Font
– Where each letter is created from Bézier curves
• Many varieties of font for a character
Units
Points with unit
and curve
properties are
stored
• GPU : specialized processor that accelerates
3D or 2D graphics primitives operations
• Lots of Floating point operations
• Accelerates Primitives
– Line, circle, polygon, mesh, projection, sphere,
3D application
3D API Commands
3D API:
OpenGL
DirectX/3D
CPU-GPU Boundary
GPU Command
& Data Stream
Vertex Index
Stream
GPU
Command
Assembled
polygon, line
& points
Primitive
Assembly
Pretransformed
Vertices
Programmable
Vertex
Processor
transformed
Vertices
Pixel
Updates
Pixel
Location
Stream
Rastereisation
Interpolation
Raster
Operation
Rastorized
Pretransformed
Fragments
Programmable
Fragment
Processors
Frame
Buffer
Transformed
Fragments
Vertices
(x,y,z)
Memory
System
Vertex
Shadder
Vertex
Processing
Pixel
Shadder
Pixel
Processing
Texture
Memory
Pixel
R, G,B
Frame
Buffer
• R S Gaonkar, “Microprocessor Architecture”, Unit II preface,
Chapter 14 and 17
Download