Lec09
-
Upload
mohammad-seemab-aslam -
Category
Documents
-
view
212 -
download
0
description
Transcript of Lec09
Dr A SahuDept of Computer Science &
EngineeringEngineering IIT Guwahati
• Peripheral communications • Display• LED Display
– Decoder – Generic model– Generic model– Interfacing
• Character Display Monitorp y– Decoder– Generic ModelG hi i• Graphics monitor – Why graphics? Vector Vs Raster
• Keyboard type and Interfaces• Keyboard type and Interfaces
RProcessor
RAM
• Peripherals : HD monitor, 5.1 speaker
• Interfaces : Intermediate HardwareInterfaces : Intermediate Hardware – Nvidia GPU card, Creative Sound Blaster card
• Interfaces : Intermediate Software/Program• Interfaces : Intermediate Software/Program– Nvidia GPU driver , Sound Blaster Driver software
• Transmission Controller:MPU control Device Control (DMA)– MPU control, Device Control (DMA)
• Type of IO mappingPeripheral (IN/Out) Memory mapped IO (LD/STMV)– Peripheral (IN/Out), Memory mapped IO (LD/ST,MV)
• Format of communicationS h (T & R ith l k) A h– Synchronous (T & R sync with clock), Asynchronous
• Mode of Data Transfer P ll l S i l (UART)– Parallel, Serial (UART)
• Condition for data transfer d lli d i l d h k– Uncond., Polling, Interrupt, Ready signal, Handshake
7 Seg 9 Seg 16 Seg 3x5 DotMatix 5x7 9x117 Seg 9 Seg 16 Seg 3x5 DotMatix 5x7 9x11
Dot Matrix Display Panel
25x80 character monitor
Di lData
ASCII/BCDDecoder
Or Memory
Display
Monitor/LEDs
Time to Decode Time to Display
• Data to 7 Segment DecoderData to 7 Segment Decoder
a
aD11
0
1
1b
fCommon Cathode
b
f
g
C
B
A
0
0
0
0
1
1
5
5v
1
1
1
5
5v
c
e
gce
d
LT
RBI
BI
5V
10
15V
11
1
dBI
Decoder
RBO
• Data to 7 Segment DecoderData to 7 Segment Decoder
Blank Blank
a b c d e f g
D C B A
RBI RBO
a b c d e f g
D C B A
RBI RBO
a b c d e f g
D C B A
RBI RBO
a b c d e f g
D C B A
RBI RBO
a b c d e f g
D C B A
RBI RBO
5V
10 0 1 1
0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 1 1
40 Bit data line
20 1 2 3 4Mod 5
Counter
8 Bit data lineData 1 Data 1 Data 2Data 2Data 3Data 3Data 4Data 4
Data 0
7 Segment Decoder
RAM
590
1:N Decoder
Counter
• Write a program to display contents of B C DWrite a program to display contents of B,C,D and E register to LED display
• Write to buffer memory to display to 7 Seg• Write to buffer memory to display to 7 Seg. LEDs
U dd FC H FD H FE H d FF H• Use address FC H,FD H,FE H and FF H to display
Ctr
A7A6A5A4
CS WR RD
4A3A2
LEDsBuffer Memory
Address lineMPU
A1A0
Datalines 7 Seg.
Decoder74LS373
LED7
D6
D5 Decoder74LS373Latches
D4
D3
D2
D1
D0
IO/MIO/MRD
WR
• Interface program to Display content of B C DInterface program to Display content of B,C,D and E after 1 Sec Delay
DIS: MVI A,BOUT FCHMVI A CMVI A,COUT FDHMVI A,DOUT FEHOUT FEHMVI A,EOUT FFHCALL DELAY ;1sec delay yJMP DIS;
Row Ctr
ColCtr
CLK > 50Hzx25x80
0 1 2 3 4 ….. 78 79C A T
F I R E
0 1 2 3 4 ….. 78 79012
25x80 character monitor 2324
A
DecoderOr
ROMDecoded
BitA ROMMemory
Bits
Counter
When C=0Ready
CS WR
Char FrameBuffer Memory
Address line
Stream Buffer
dd ( )
Datalines
Address (r,c)
• Delay of Monitor is 1/50 Sec, After Every 50 Second it makes readyF t b ff it it t F b ff ft• 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– You can write to LEDs at very high speed
– Display meant for to see some thing (Is it good?)
30 F /S i h h f• 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)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 )• LCD Monitor (1024x768,1280x1024,…)
• Graphics visually more appealing
• Display Line, Circle, Rectangle, Curve, Polygon– Character using this primitives
– True type fontRED ARROW
CircleCircle
Row Ctr
ColCtr
CLK > 1024x768x50Hz
0 1 2 3 4 ….. …10230 1 2 3 4 ….. …1023012
1024x768 Pixel LCD 767
8x3=24 Bits
Frame Buffer
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 colorGraphical representation of 1 bit color
Pixels in Frame Buffer
15 Bit Per Pixels
Pixels on the Screen
Graphical representation of 15 bit color p p
Pixels in Frame Buffer
24 Bit Per Pixels
Pixels on the Screen
Graphical representation of 24 bit color p p
1‐ bit color 8‐bit color 16‐bit color
• Vector graphics: g p– Use geometrical primitives based on mathematical equations, to represent images in computerrepresent images in computer graphics
– Points, Lines, Curve, shapes or PolygonsPolygons
• Raster Graphics: Complementary to Vector Graphicsp– Representation of images as an array of pixels photographic images– 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 At runtime, process the primitive andgenerate Pixel to raster the screen (Display)
• Who do this?• Who do this?– Software
GPU (hardware accelerated routine)– GPU (hardware accelerated routine)
• Computer font formats: TrueType Font – Where each letter is created from Bézier curvesWhere each letter is created from Bézier curves
• Many varieties of font for a characterUnits
Points with unit and curve
properties areproperties are stored
• GPU : specialized processor that accelerates 3D or 2D graphics primitives operations
• Lots of Floating point operationsg p p
• Accelerates Primitives – Line circle polygon mesh projection sphereLine, circle, polygon, mesh, projection, sphere,
3D application
3D API: OpenGL
/
3D API Commands
CPU GPU B d/DirectX/3D CPU‐GPU Boundary
GPU Command& Data Stream
AssembledPixel
iPixel U d t
GPU Command
PrimitiveAssembly
RastereisationInterpolation
RasterOperation
Frame Buffer
Vertex Index Stream
Assembled polygon, line & points
Location Stream
Updates
Command y p p
ProgrammableProgrammable
Transformed Fragments
RastorizedPretransformedFragments
transformedVerticesPretransformed
Vertices
Programmable Fragment Processors
ProgrammableVertex
Processor
Memory Vertices( )
ySystem
Vertex
(x,y,z)
Vertex Vertex Processing Shadder
Pi l
yTexture Memory
Pixel Processing
Pixel Shadder
Frame Buffer
PixelR G BR, G,B
• R S Gaonkar, “Microprocessor Architecture”, Unit II preface, Chapter 14 and 17p