0% found this document useful (0 votes)
50 views42 pages

Micro Processors and Micro Controllers

The document discusses Direct Memory Access (DMA) and peripherals interfacing in 8086 systems. It describes the 8257 DMA controller and its operating modes, registers and pin diagrams. It then covers the 8237 DMA controller and its 25 registers used for DMA transfers. The document also discusses interfacing 8086 with peripherals like the 8255 Programmable Peripheral Interface and memory. It provides examples of minimum and maximum mode 8086 systems with memory interfacing details. Finally, it lists some tutorial questions about 8086 flags, developing algorithms in assembly language to find largest number, factorial, sum of squares and counting even/odd or positive/negative numbers.

Uploaded by

Naveen Vakkanti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views42 pages

Micro Processors and Micro Controllers

The document discusses Direct Memory Access (DMA) and peripherals interfacing in 8086 systems. It describes the 8257 DMA controller and its operating modes, registers and pin diagrams. It then covers the 8237 DMA controller and its 25 registers used for DMA transfers. The document also discusses interfacing 8086 with peripherals like the 8255 Programmable Peripheral Interface and memory. It provides examples of minimum and maximum mode 8086 systems with memory interfacing details. Finally, it lists some tutorial questions about 8086 flags, developing algorithms in assembly language to find largest number, factorial, sum of squares and counting even/odd or positive/negative numbers.

Uploaded by

Naveen Vakkanti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 42

UNIT - III

PERIPHERALS
AND
INTERFACING

1
DMA
• It does the Data Transfer in following modes:
– Single Transfer Mode
– Block Transfer Mode
– Demand Transfer Mode

2
8257 Pin Diagram

3
Block Diagram of 8257

4
8257 Count Register

5
8257 Mode Set Register

6
8257 Status Register

7
8257 Register Addresses

8
8237 DMA Controller
• It has total 25 registers:
– 16-bit Current Address Register (4)
– 16-bit Current Word Register (4)
– 16-bit Base Address Register (4)
– 16-bit Base Word Count Register (4)
– 8-bit Mode Register (4)
– 8-bit Command Register
– 8-bit Request Register
– 8-bit Mask Register
– 8-bit Status Register
– 8-bit Temporary Register
9
8237 Pin Diagram

10
8237 Block Diagram

11
8237 Command Register

12
8237 Mode Register

13
8237 Request Register

14
8237 Mask Register

15
8237 Mask Register

16
8237 Status Register

17
8237 Command Codes

18
8237 Channel Addresses

19
Interfacing with 8086
Address buss A0-A15

OE# 8 BIT
STB LATCH
A0-A15 BUSEN
AEN A0-A3 A4-A7 CS/ ADSTB
HOLD HRQ
DB0-DB7
HOLDA HLDA I8237A
DREQ0-3
DACK0-3
CPU CLK RESET MEMR# MEMW# IOR# IOW#

CLOCK
RESET
MEMR#
MEMW#
IOR#
IOW# Control buss
D0-D7
Sistem data buss

20
Interfacing with 8086

21
8255 PPI

22
Program control transfer
Instructions

23
Machine Control Instructions

24
Shift / Rotate Instructions

25
Flag Manipulation Instructions

26
String Instructions

27
Assembler Directives
• There are some instructions in the assembly
language program which are not part of processor
instruction set.
• These are the instructions to assembler, linker and
loader.
• These are referred to as pseudo-operations or as
assembler directives.
• There are many specialized assembler directives. Let
us see some commonly used assembler directive in
8086 assembly language programming .

28
Assembler Directives
ASSUME CS: CODE, DS: DATA
DATA SEGMENT
---
DATA ENDS
CODE SEGMENT
START: ---
---
CODE ENDS
END START

29
Assembler Directives
• 1. ASSUME: It is used to tell the name of the logical
segment.
– EX: ASSUME CS: CODE
• 2. DB -Define Byte: The DB directive is used to reserve byte
or bytes of memory locations in the available memory.
– EX: RANKS DB 01H,02H,03H,04H
• 3. DW -Define Word: 1 word (16-bit numbers)
• 4. DD -Define Double word: 2 words
• 5. DQ -Define Quad word: 4 words
• 6. DT -Define Ten Bytes: 10 bytes
• 7. END-End of Program: The END directive marks the end
of an assembly language program.
30
Assembler Directives
• 8. ENDP-End of Procedure:
• 9. ENDS-End of Segment:
• 10. EQU-Equate:
• 11. EVEN:
• 12. EXTRN:
• 13. GLOBAL
• 14. GROUP
• 15. INCLUDE
• 16. LABEL
• 17. NAME
• 18. OFFSET
31
Assembler Directives
• 19. ORG
• 20. PROC
– SMART_DIVIDE PROC FAR
• 21. PTR
– INC BYTE PTR[BX]
• 22. PUBLIC
• 23. SEGMENT
• 24. SHORT
• 25. TYPE

32
Minimum Mode 8086 System

33
Minimum Mode 8086 System

34
Maximum Mode 8086 System

35
Maximum Mode 8086 System

36
Memory Interfacing

37
Memory Interfacing

38
Memory Interfacing

39
TUTORIAL
• Draw the Flags Register of 8086 and explain
each flag with example.

• Develop an ALP to find the largest number.

• Develop an ALP to find the factorial of 6.

40
TUTORIAL
• Write an ALP to calculate the sum of squares
of 5 natural numbers.

• Develop an ALP to find the number of Even


and Odd numbers from a given series.

• Develop an ALP to find the number of Positive


and Negative numbers from a given series.
41
TUTORIAL

42

You might also like