Sie sind auf Seite 1von 32

STAMFORD UNIVERSITY BANGLADESH

Department of Computer Science And Engineering

CSE 326: Microprocessor Lab


Manual

1|Page
Experiment No: 1

Name of the Experiment: Display of Seven Segment

Theory:

A seven-segment display (SSD), or seven-segment indicator, is a form of electronic display


device for displaying decimal numerals.
The seven segments are arranged as a rectangle of two vertical segments on each side with
one horizontal segment on the top, middle, and bottom. Additionally, the seventh segment
bisects the rectangle horizontally. The segments of a 7-segment display are referred to by
the letters A to G, where the optional decimal point is used for the display of non-integer
numbers.

Fig. A Seven Segment Display

Hexadecimal encoding to display the digits 0 to 9:

Digits Hex. Value H G F E D C B A


0 0C0h 1 1 0 0 0 0 0 0
1 0F9h 1 1 1 1 1 0 0 1
2 0A4h 1 0 1 0 0 1 0 0
3 0B0h 1 0 1 1 0 0 0 0
4 099h 1 0 0 1 1 0 0 1
5 092h 1 0 0 1 0 0 1 0
6 082h 1 0 0 0 0 0 1 0
7 0F8h 1 1 0 1 1 0 0 0
8 080h 1 0 0 0 0 0 0 0
9 090h 1 0 0 1 0 0 0 0

2|Page
Note: Active when 0
Inactive when 1

Equipment:
A computer
CMD Command prompt
WINCOM Software
Dash Board

Code Segment:

A SEGMENT PARA PUBLIC ‘CODE’ [runs the code publicly]


ASSUME CS: A
ORG 1000H [program starts at location 1000h]

S:

MOV AL, 80H [ initializes all ports as output]


OUT 1FH, AL [ enables display of value in AL register]

MOV AL, 0F8H [ gets the hexa-decimal value of 7]


OUT 19H, AL [displays the value in AL register on seven segments]

A ENDS [terminates the assembly]


END S [marks the end of segment]

DOS Command:
The following commands are given in the command prompt in order to connect the code
segment with the WINCOM software.

CD\
CD MDA CD
8086
CD ASM8086

3|Page
MASM
(NAME_OF_THE_FILE).ASM
(NAME_OF_THE_FILE).OBJ
(NAME_OF_THE_FILE).LST
LOD186
(NAME_OF_THE_FILE).0BJ
(NAME_OF_THE_FILE).ABS

After the commands ar given we select the WINCOM software from PC mode. We run the
WINCOM s/w and press RESET from the tool kit. As soon as we press the RESET, we can
see some machine written on the PC screen after which we give the following commands:

L (ENTER)
F3 (ENTER)
(NAME_OF_THE_FILE).ABS
G (ENTER)

After the commands are given, we can see our desired output on the tool kit.

Discussion:

The goal of the given experiment was to display decimal numbers using seven segment
displays. We achieved the goal but encountered some difficulty.
Being new to the WINCOM s/w, it took us time to figure out how to connect it with PC. We
kept the ASM file on some other folder which led to difficulty as the commands provided
was unable to locate the file and showed error.
Later we kept the file in MDA folder followed by 8086 and ASM8086. Thus, we ran the
WINCOM s/w after the providing the DOS Commands and got the desired output.

4|Page
Experiment No : 2

Name of the Experiment: To turn the Red light on LED

Theory:
This is the segment B(1BH). There are four LED lights available. The process to turn on the
lights on is the reverse of seven segments. The code for each LED light are: Red ( PB 0),
Green ( PB 1), Yellow ( PB 3), Red ( PB 3).

Table to display the values for LED lights:

LED Hexadecimal Value R Y G R


Red 01H 0 0 0 1
Green 02H 0 0 1 0
Yellow 04H 0 1 0 0
Red 08H 1 0 0 0

Note: Active when 1


Inactive when 0

Equipment:
A computer
CMD Command prompt
WINCOM Software
Dash Board

Code Segment:

A SEGMENT PARA PUBLIC ‘CODE’ [runs the code publicly]


ASSUME CS: A
ORG 1000H [program starts at location 1000h]

S:
MOV AL, 80H [ initializes all ports as output]

5|Page
OUT 1FH, AL [ enables display of value in AL register]
MOV AL, 0FFH [ stops port A]
OUT 19H, AL

L:
MOV AL, 01H [ turn LED on]
OUT 1BH, AL
MOV CX, 0FFFFH [ delay for LED on]
L1: LOOP L1

MOV AL, 00H [ turn LED off]


OUT 1BH, AL

MOV CX, 0FFFFH [delay the LED off]


L2: LOOP L2

JMP L
A ENDS
END S

DOS Command:

The following commands are given in the command prompt in order to connect the code
segment with the WINCOM software.

CD\
CD MDA CD
8086
CD ASM8086
MASM
(NAME_OF_THE_FILE).ASM
(NAME_OF_THE_FILE).OBJ
(NAME_OF_THE_FILE).LST
LOD186
(NAME_OF_THE_FILE).0BJ
(NAME_OF_THE_FILE).ABS

After the commands are given we select the WINCOM software from PC mode. We run the
WINCOM s/w and press RESET from the tool kit. As soon as we press the RESET, we can
see some machine written on the PC screen after which we give the following commands:

L (ENTER)
F3 (ENTER)

6|Page
(NAME_OF_THE_FILE).ABS
G (ENTER)

After the commands are given, we can see our desired output on the tool kit.

Discussion:

The goal of the given experiment was to turn on RED LED on using LED display. We
achieved the goal encountering some difficulty. The PC was shut due to some unavoidable
circumstances. We had to rewrite the code and then provided the DOS Commands. Also,
we had difficulty turning the RED LED on and off using the JMP (jump) which is a loop.
Thus, we ran the WINCOM s/w after the providing the DOS Commands and got the desired
output.

Experiment No. : 3

Name of the Experiment: To turn the LED light clock wise

Theory:
This is the segment B (1BH). There are four LED lights available. The process to turn on
the lights on is the reverse of seven segments. The code for each LED light are: Red (PB
0), Green (PB 1), Yellow (PB 3), Red ( PB 3).

7|Page
Table to display the values for LED lights:

LED Hexadecimal Value R Y G R

Red 01H 0 0 0 1
Green 02H 0 0 1 0
Yellow 04H 0 1 0 0
Red 08H 1 0 0 0

Note: Active when 1


Inactive when 0

Equipment:
A computer
CMD Command prompt
WINCOM Software
Dash Board

Code Segment:

A SEGMENT PARA PUBLIC ‘CODE’


ASSUME CS: A
ORG 1000H

S:
MOV AL, 80H
OUT 1FH, AL

MOV AL, 0FFH


OUT 19H, AL
L:
MOV AL, 01H
OUT 1BH, AL

MOV CX, 0FFFFH


L1: LOOP L1

MOV AL, 00H


OUT 1BH, AL

MOV AL, 02H


8|Page
OUT 1BH, AL

MOV CX, 0FFFFH


L2: LOOP L2

MOV AL, 00H


OUT 1BH, AL

MOV AL, 08H


OUT 1BH, AL

MOV CX, 0FFFFH


L3: LOOP L3

MOV AL, 00H


OUT 1BH, AL

MOV AL, 04H


OUT 1BH, AL

MOV CX, 0FFFFH


L4: LOOP L4

MOV AL, 00H


OUT 1BH, AL

JMP L
A ENDS
END S

DOS Command:

The following commands are given in the command prompt in order to connect the code
segment with the WINCOM software.

CD\
CD MDA
CD 8086
CD ASM8086
MASM
(NAME_OF_THE_FILE).ASM
(NAME_OF_THE_FILE).OBJ
(NAME_OF_THE_FILE).LST
LOD186
9|Page
(NAME_OF_THE_FILE).0BJ
(NAME_OF_THE_FILE).ABS

After the commands are given we select the WINCOM software from
PC mode. We run the WINCOM s/w and press RESET from the tool
kit. As soon as we press the RESET, we can see some machine
written on the PC screen after which we give the following commands:

L (ENTER)
F3 (ENTER)
(NAME_OF_THE_FILE).ABS
G (ENTER)

After the commands are given, we can see our desired output on the tool kit.

Discussion:

The goal of the given experiment was to turn on LED on using LED display clock wise. We
achieved the goal encountering some difficulty.
The PC was shut due to some unavoidable circumstances. We had to rewrite the code and
then provided the DOS Commands. Also, we had difficulty turning the LED clock wise on
and off using the JMP (jump) which is a loop.
Thus, we ran the WINCOM s/w after the providing the DOS Commands and got the desired
output.

Experiment No : 4

Name of the Experiment: To turn the LED light Anti clock wise

Theory:
This is the segments B (1BH). There are four LED lights available. The process to turn on
the lights on is the reverse of seven segments. The code for each LED light are: Red (PB
0), Green (PB 1), Yellow (PB 3), Red (PB 3).

10 | P a g e
Table to display the values for LED lights:

LED Hexadecimal Value R Y G R

Red 01H 0 0 0 1
Green 02H 0 0 1 0
Yellow 04H 0 1 0 0
Red 08H 1 0 0 0

Note: Active when 1


Inactive when 0

Equipment:
A computer
CMD Command prompt
WINCOM Software
Dash Board

Code Segment:

A SEGMENT PARA PUBLIC ‘CODE’


ASSUME CS: A
ORG 1000H

S:
MOV AL, 80H [set control register]
OUT 1FH, AL

MOV AL, 0FFH [stop port A]


OUT 19H, AL
L:

MOV AL, 04H [ turn on Yellow LED]


OUT 1BH, AL

11 | P a g e
MOV CX, 0FFFFH [ delay]
L1: LOOP L1

MOV AL, 00H [ turn off Yellow LED]


OUT 1BH, AL

MOV AL, 01H [turn Red LED on]


OUT 1BH, AL

MOV CX, 0FFFFH [delay]


L2: LOOP L2

MOV AL, 00H [turn off Red LED]


OUT 1BH, AL

MOV AL, 02H [turn on Green LED]


OUT 1BH, AL

MOV CX, 0FFFFH [delay]


L3: LOOP L3

MOV AL, 00H [turn off Green LED]


OUT 1BH, AL

MOV AL, 08H [turn on Red LED]


OUT 1BH, AL

MOV CX, 0FFFFH [delay]


L4: LOOP L4

MOV AL, 00H [turn off Red LED]


OUT 1BH, AL
JMP L
A ENDS
END S

12 | P a g e
DOS Command:

The following commands are given in the command prompt in order to connect the code
segment with the WINCOM software.

CD\
CD MDA
CD 8086
CD ASM8086
MASM
(NAME_OF_THE_FILE).ASM
(NAME_OF_THE_FILE).OBJ
(NAME_OF_THE_FILE).LST
LOD186
(NAME_OF_THE_FILE).0BJ
(NAME_OF_THE_FILE).ABS
After the commands are given we select the WINCOM software from PC mode. We run the
WINCOM s/w and press RESET from the tool kit. As soon as we press the RESET, we can
see some machine written on the PC screen after which we give the following commands:

L (ENTER)
F3 (ENTER)
(NAME_OF_THE_FILE).ABS
G (ENTER)

After the commands are given, we can see our desired output on the tool kit.

Discussion:

The goal of the given experiment was to turn on LED on using LED display clock wise. We
achieved the goal encountering some difficulty.
The PC was shut due to some unavoidable circumstances. We had to rewrite the code and
then provided the DOS Commands. Also, we had difficulty turning the LED clock wise on
and off using the JMP (jump) which is a loop.
Thus, we ran the WINCOM s/w after the providing the DOS Commands and got the desired
output.

13 | P a g e
Experiment No : 5

Name of the Experiment: The Traffic Signal

Theory:
In general we know how a traffic signal works. At first the red light turns on then the yellow
light after which the green light turns on.
Here, we first turn the Red light on and then display 0-9 backwards on the seven segments
display. Then the yellow light, green light and then again the red light.

Table to display the values for LED lights:

LED Hexadecimal Value R Y G R

Red 01H 0 0 0 1
Green 02H 0 0 1 0
Yellow 04H 0 1 0 0
Red 08H 1 0 0 0

Note: Active when 1


Inactive when 0

Equipment:
A computer
CMD Command prompt
WINCOM Software
Dash Board

Code Segment:

A SEGMENT PARA PUBLIC ‘CODE’


ASSUME CS: A
ORG 1000H

S:
MOV AL,80H
14 | P a g e
OUT 1FH, AL

MOV AL,0FFH
OUT 19H, AL

Q:
MOV AL,01H
OUT 1BH, AL

MOV CX,0FFFFH
L12: LOOP L12

MOV AL,090H
OUT 19H, AL
MOV CX, 0FFFFH
S10: LOOP S10

MOV AL,080H
OUT 19H, AL
MOV CX, 0FFFFH
S9: LOOP S9

MOV AL,0D8H
OUT 19H, AL
MOV CX, 0FFFFH
S8: LOOP S8

MOV AL,082H
OUT 19H, AL
MOV CX, 0FFFFH
S7: LOOP S7

MOV AL,092H
OUT 19H, AL
MOV CX, 0FFFFH
S6: LOOP S6

MOV AL,099H
OUT 19H, AL
MOV CX, 0FFFFH
S5: LOOP S5
15 | P a g e
MOV AL,0B0H
OUT 19H, AL
MOV CX, 0FFFFH
S4: LOOP S4

MOV AL,0A4H
OUT 19H, AL
MOV CX, 0FFFFH
S3: LOOP S3

MOV AL,0F9H
OUT 19H, AL
MOV CX, 0FFFFH
S2: LOOP S2

MOV AL,0C0H
OUT 19H, AL
MOV CX, 0FFFFH
S1: LOOP S1

MOV AL,00H
OUT 1BH, AL
MOV CX,0FFFFH
L13: LOOP L13

MOV AL,04H
OUT 1BH, AL
MOV CX,0FFFFH
L14: LOOP L14

MOV AL,0B0H
OUT 19H, AL
MOV CX, 0FFFFH
S15: LOOP S15

MOV AL,0A4H
OUT 19H, AL
MOV CX, 0FFFFH
S16: LOOP S16

MOV AL,0F9H
OUT 19H, AL
MOV CX, 0FFFFH
16 | P a g e
S17: LOOP S17

MOV AL,0C0H
OUT 19H, AL
MOV CX, 0FFFFH
S18: LOOP S18

MOV AL,02H
OUT 1BH, AL
MOV CX,0FFFFH
L19: LOOP L19

MOV AL,090H
OUT 19H, AL
MOV CX, 0FFFFH
S20: LOOP S20

MOV AL,080H
OUT 19H, AL
MOV CX, 0FFFFH
S21: LOOP S21

MOV AL,0D8H
OUT 19H, AL
MOV CX, 0FFFFH
S22: LOOP S22

MOV AL,082H
OUT 19H, AL
MOV CX, 0FFFFH
S23: LOOP S23

MOV AL,092H
OUT 19H, AL
MOV CX, 0FFFFH
S24: LOOP S24

MOV AL,099H
OUT 19H, AL
MOV CX, 0FFFFH
S25: LOOP S25

17 | P a g e
MOV AL,0B0H
OUT 19H, AL
MOV CX, 0FFFFH
S26: LOOP S26

MOV AL,0A4H
OUT 19H, AL
MOV CX, 0FFFFH
S27: LOOP S27

MOV AL,0F9H
OUT 19H, AL
MOV CX, 0FFFFH
S28: LOOP S28

MOV AL,0C0H
OUT 19H, AL
MOV CX, 0FFFFH
S29: LOOP S29

JMP S
A ENDS
END S

DOS Command:

The following commands are given in the command prompt in order to connect the code
segment with the WINCOM software.

CD\
CD MDA CD
8086
CD ASM8086
MASM
(NAME_OF_THE_FILE).ASM
(NAME_OF_THE_FILE).OBJ
(NAME_OF_THE_FILE).LST
LOD186
(NAME_OF_THE_FILE).OBJ
(NAME_OF_THE_FILE).ABS

18 | P a g e
After the commands are given we select the WINCOM software from PC mode. We run the
WINCOM s/w and press RESET from the tool kit. As soon as we press the RESET, we can
see some machine written on the PC screen after which we give the following commands:

L (ENTER)
F3 (ENTER)
(NAME_OF_THE_FILE).ABS
G (ENTER)

After the commands are given, we can see our desired output on the tool kit.

Discussion:

The goal of the given experiment was to display the Traffic Signal.
We achieved the goal encountering some difficulty.
The PC was shut due to some unavoidable circumstances. We had to rewrite the code and
then provided the DOS Commands. Moreover, the code for the experiment was too lengthy
we experiment which is why there were several mistakes and the outcome of the
experiment was achieved lately. After several checking of the code we achieved the goal.
Thus, we ran the WINCOM s/w after the providing the DOS Commands and got the desired
output.

Experiment No : 6

Name of the Experiment: 0 to 9 LED light

Theory:
We display numbers e g, 0 t 9 which is displayed on the seven segment and their result is
also displayed in the seven segment. The result shown by sequentially 0 to 9 and take
delay of time for each digit print.

19 | P a g e
Equipment:
A computer
CMD Command prompt
WINCOM Software
Dash Board

Code Segment:

A SEGMENT PARA PUBLIC 'CODE'


ASSUME CS: A
ORG 1000H
S:
MOV AL,80H
OUT 1FH, AL
L:
MOV AL,0C0H
OUT 19H, AL
MOV CX, 0FFFFH
S1: LOOP S1
MOV AL,0F9H
OUT 19H, AL
MOV CX, 0FFFFH
20 | P a g e
S2: LOOP S2

MOV AL,0A4H
OUT 19H, AL
MOV CX, 0FFFFH
S3: LOOP S3

MOV AL,0B0H
OUT 19H, AL
MOV CX, 0FFFFH
S4: LOOP S4

MOV AL,099H
OUT 19H, AL
MOV CX, 0FFFFH
S5: LOOP S5

MOV AL,092H
OUT 19H, AL
MOV CX, 0FFFFH
S6: LOOP S6

MOV AL,082H
OUT 19H, AL
MOV CX, 0FFFFH
S7: LOOP S7

MOV AL,0D8H
OUT 19H, AL
MOV CX, 0FFFFH
S8: LOOP S8

MOV AL,080H
OUT 19H, AL
MOV CX, 0FFFFH
S9: LOOP S9

MOV AL,090H
OUT 19H, AL
MOV CX, 0FFFFH
21 | P a g e
S10: LOOP S10

JMP L
A ENDS
END S

DOS Command:

The following commands are given in the command prompt in order to connect the code
segment with the WINCOM software.

CD\
CD MDA CD
8086
CD ASM8086
MASM
(NAME_OF_THE_FILE).ASM
(NAME_OF_THE_FILE).OBJ
(NAME_OF_THE_FILE).LST
LOD186
(NAME_OF_THE_FILE).OBJ
(NAME_OF_THE_FILE).ABS

After the commands are given we select the WINCOM software from PC mode. We run the
WINCOM s/w and press RESET from the tool kit. As soon as we press the RESET, we can
see some machine written on the PC screen after which we give the following commands:

L (ENTER)
F3 (ENTER)
(NAME_OF_THE_FILE).ABS
G (ENTER)
After the commands are given, we can see our desired output on the tool kit.

22 | P a g e
Discussion:

The goal of the given experiment was to display the 0 to 9 print in the result using the
seven segments. We achieved the goal encountering one difficulty.
That is The PC was shut due to some unavoidable circumstances. We had to rewrite the
code and then provided the DOS Commands. Moreover, the code for the experiment was
too small and we are finely done this experiment .
Thus, we ran the WINCOM s/w after the providing the DOS Commands and got the desired
output.

Experiment No : 7

Name of the Experiment: 0 to 4 Reverse 4 to 0 LED Light

Theory:
We display numbers e g, 0 to 4 and reverse 4 to 0. which is displayed on the seven
segment and their result is also displayed in the seven segments. The result shown by
sequentially 0 to 4 and 4 to 0. When show 0 and at a time on 0n LED, when show then on
red led, when show then on red and green led at a time, when show 3 then on red, green,
yellow led at a time, when show 4 then on red, green, yellow, red led at a time . This
process in run sequential and vice versa.

Equipment:
A computer
CMD Command prompt
WINCOM Software
Dash Board

Code Segment:

A SEGMENT PARA PUBLIC 'CODE'


ASSUME CS: A
ORG 1000H

S:
MOV AL,80H

23 | P a g e
OUT 1FH, AL

P:
MOV AL,0C0H
OUT 19H, AL
MOV CX,0FFFFH
S1: LOOP S1

Q:
MOV AL,0F9H
OUT 19H, AL
MOV CX,0FFFFH
H1: LOOP H1

MOV AL,0FFH
OUT 19H, AL

MOV AL,01H
OUT 1BH, AL

MOV CX,0FFFFH
L1: LOOP L1

MOV AL,00H
OUT 1BH, AL

MOV CX,0FFFFH
L2: LOOP L2

B:
MOV AL,0A4H
OUT 19H, AL
MOV CX,0FFFFH
I1: LOOP I1

MOV AL,0FFH
OUT 19H, AL

MOV AL,03H

24 | P a g e
OUT 1BH, AL

MOV CX,0FFFFH
L3: LOOP L3

MOV AL,00H
OUT 1BH, AL

MOV CX,0FFFFH
L4: LOOP L4

C:
MOV AL,0B0H
OUT 19H, AL
MOV CX,0FFFFH
J1: LOOP J1

MOV AL,0FFH
OUT 19H, AL

MOV AL,07H
OUT 1BH, AL

MOV CX,0FFFFH
L5: LOOP L5

MOV AL,00H
OUT 1BH, AL

MOV CX,0FFFFH
L6: LOOP L6

D:
MOV AL,099H
OUT 19H, AL
MOV CX,0FFFFH
K4: LOOP K4

MOV AL,0FFH

25 | P a g e
OUT 19H, AL

MOV AL,0FH
OUT 1BH, AL

MOV CX,0FFFFH
L7: LOOP L7

MOV AL,00H
OUT 1BH, AL

MOV CX,0FFFFH
L8: LOOP L8

E:
MOV AL,0B0H
OUT 19H, AL
MOV CX,0FFFFH
M1: LOOP M1

MOV AL,0FFH
OUT 19H, AL

MOV AL,07H
OUT 1BH, AL

MOV CX,0FFFFH
L9: LOOP L9

MOV AL,00H
OUT 1BH, AL

MOV CX,0FFFFH
L10: LOOP L10

F:
MOV AL,0A4H
OUT 19H, AL
MOV CX,0FFFFH

26 | P a g e
N1: LOOP N1

MOV AL,0FFH
OUT 19H, AL
MOV AL,03H
OUT 1BH, AL

MOV CX,0FFFFH
L11: LOOP L11
MOV AL,00H
OUT 1BH, AL

MOV CX,0FFFFH
L12: LOOP L12

G:
MOV AL,0F9H
OUT 19H, AL
MOV CX,0FFFFH
O1: LOOP O1

MOV AL,0FFH
OUT 19H, AL

MOV AL,01H
OUT 1BH, AL

MOV CX,0FFFFH
L13: LOOP L13

MOV AL,00H
OUT 1BH, AL

MOV CX,0FFFFH
L14: LOOP L14

JMP P
A ENDS
END S

27 | P a g e
DOS Command:

The following commands are given in the command prompt in order to connect the code
segment with the WINCOM software.

CD\
CD MDA CD
8086
CD ASM8086
MASM
(NAME_OF_THE_FILE).ASM
(NAME_OF_THE_FILE).OBJ
(NAME_OF_THE_FILE).LST
LOD186
(NAME_OF_THE_FILE).OBJ
(NAME_OF_THE_FILE).ABS

After the commands are given we select the WINCOM software from PC mode. We run the
WINCOM s/w and press RESET from the tool kit. As soon as we press the RESET, we can
see some machine written on the PC screen after which we give the following commands:

L (ENTER)
F3 (ENTER)
(NAME_OF_THE_FILE).ABS
G (ENTER)
After the commands are given, we can see our desired output on the tool kit.

Discussion:
The goal of the given experiment was to display the 0 to 4 and 4 to 0 print at a time on LED
given seven segments results in the result using the seven segments. We achieved the
goal encountering some difficulty.
The PC was shut due to some unavoidable circumstances. We had to rewrite the code and
then provided the DOS Commands. Moreover, the code for the experiment was too lengthy
we experiment which is why there were several mistakes and the outcome of the
experiment was achieved lately. After several checking of the code we achieved the goal.
Thus, we ran the WINCOM s/w after the providing the DOS Commands and got the desired
output.

28 | P a g e
Experiment No : 8

Name of the Experiment: Dot Matrix Display Show Letters

Theory:
A dot-matrix display is a display device used to display information on machines, clocks,
railway departure indicators and many other devices requiring a simple display device of limited
resolution. The display consists of a dot matrix of lights or mechanical indicators arranged in a
rectangular configuration. such that by switching on or off selected lights, text or graphics can be
displayed .Here We Show the ‘ H ’ alphabet in dot matrix display.

Dot-Matrix Display:

C1 C2 C3 C4 C5 C6 C7 C8

E1 1 1 1 1 1 1 1 1

E2 1 1 0 1 1 0 1 1

E3 1 1 0 1 1 0 1 1

E4 1 1 0 0 0 0 1 1

E5 1 1 0 1 1 0 1 1

E6 1 1 0 1 1 0 1 1

E7 1 1 1 1 1 1 1 1

E8 1 1 1 1 1 1 1 1

Equipment:
A computer
CMD Command prompt
WINCOM Software
Dash Board

29 | P a g e
Code Segment:

CODE SEGMENT
ASSUME CS: CODE, DS: CODE, ES: CODE, SS: CODE PPIC_C EQU 1FH

PPIC_C EQU 1EH


PPIC EQU 1CH
PPIB EQU 1AH
PPIA EQU 18H

ORG 1000H

MOV AL, 10000000B


OUT PPIC_C, AL

MOV AX, CS
MOV DS, AX
XOR AX, AX

L1:
MOV SI, OFFSET FONT
MOV AH, 00000001B

L2:
MOV AL, [SI]
OUT PPIB, AL

MOV AL, AH
OUT PPIC, AL
CALL TIMER
INC SI
CLC
ROL AH,1
JNC L2
JMP L1

INT 3

TIMER:
30 | P a g e
MOV CX, 300
TIMER1:
NOP
NOP
NOP
NOP
NOP
LOOP TIMER1
RET
HLT

FONT
DB 11111111B
DB 11111111B
DB 01111101B
DB 01111101B
DB 00000001B
DB 01111101B
DB 01111101B
DB 11111111B

CODE ENDS
END

DOS Command:

The following commands are given in the command prompt in order to connect the code
segment with the WINCOM software.

CD\
CD MDA CD
8086
CD ASM8086
MASM
(NAME_OF_THE_FILE).ASM
(NAME_OF_THE_FILE).OBJ
(NAME_OF_THE_FILE).LST
LOD186
(NAME_OF_THE_FILE).OBJ
(NAME_OF_THE_FILE).ABS

31 | P a g e
After the commands are given we select the WINCOM software from PC mode. We run the
WINCOM s/w and press RESET from the tool kit. As soon as we press the RESET, we can
see some machine written on the PC screen after which we give the following commands:

L (ENTER)
F3 (ENTER)
(NAME_OF_THE_FILE).ABS
G (ENTER)
After the commands are given, we can see our desired output on the tool kit.

Discussion:
We are currently perform to code a simple program that would allow me to light up an
individual LED on an 8X8 LED board dot matrix and shown that the alphabet ‘ H ’
We achieved the goal encountering some difficulty.
Here are the problems:
All the rows can ON individually UNTIL I turn all 8 rows ON. When I do this the last column
turns OFF by itself.
The columns aren't even working properly either. Every time I assign a column ON, the last
column faintly turns ON too
one of the LEDs light in that column is broken so that is expect to be OFFI think those are
the reasons
why I am not able to singly assign a particular LED to be ON according to assignments in
the array.
If someone could spot my mistakes, it would greatly be appreciated.
After several checking of the code we achieved the goal.
Thus, we ran the WINCOM s/w after the providing the DOS Commands and got the desired
output.

32 | P a g e

Das könnte Ihnen auch gefallen