Section: Hardware Interfacing Experiments
Aim:
To design and display a moving/rolling message using the 8085 microprocessor trainer kit output display device.
Apparatus Required:
Microprocessor trainer kit, DC regulated power supply.
Algorithm:
- Start.
- Output command
00Hto control port80Hto reset the 8279 keyboard/display controller. - Output command
18Hto control port80Hto set the display mode. - Load the starting memory address of the message string into the HL register pair.
- Load register B with the message length count (
05H). - Read character data from memory into the accumulator and output it to display port
81H. - Call the delay subroutine to hold the displayed character for a specific time interval.
- Increment the HL memory pointer and decrement the character counter register B.
- Loop back to output the next character until register B becomes zero.
- Jump back to the starting roll loop to continuously repeat message scrolling.
Program:
| Address | Label | Mnemonics | Operand | Comment |
|---|---|---|---|---|
| 4100 | START | MVI | A, 00H | Load 8279 keyboard/display reset command |
| 4102 | OUT | 80H | Send reset command to 8279 control port | |
| 4104 | MVI | A, 18H | Load display mode set command | |
| 4106 | OUT | 80H | Send mode command to 8279 control port | |
| 4108 | ROLL | LXI | H, MSG | Load message starting memory address |
| 410B | MVI | B, 05H | Load message character count into B register | |
| 410D | NEXT | MOV | A, M | Read character data byte into accumulator |
| 410E | OUT | 81H | Send character code to 8279 display data port | |
| 4110 | CALL | DELAY | Call delay subroutine | |
| 4113 | INX | H | Increment HL message pointer | |
| 4114 | DCR | B | Decrement character counter B | |
| 4115 | JNZ | NEXT | Loop until all characters are displayed | |
| 4118 | JMP | ROLL | Repeat message scrolling continuously | |
| 411B | DELAY | LXI | D, 0FFFFH | Initialize DE pair with max delay count |
| 411E | D1 | DCX | D | Decrement DE pair |
| 411F | MOV | A, D | Copy D register to accumulator | |
| 4120 | ORA | E | Logical OR with E register | |
| 4121 | JNZ | D1 | Loop until DE pair reaches zero | |
| 4124 | RET | Return from subroutine |
Observation (Message Data):
- 7-Segment Display Hex Codes for Message "HELLO":
MSG:76H('H'),79H('E'),38H('L'),38H('L'),3FH('O').
Result:
Thus, the design for displaying a moving/rolling message using the 8085 microprocessor kit is completed and the output is verified.
Flowchart:
+-------------------+
| START |
+---------+---------+
|
v
+-------------------+
| [A] <- 00H |
| OUT to 80H | (Reset 8279)
+---------+---------+
|
v
+-------------------+
| [A] <- 18H |
| OUT to 80H | (Set Display Mode)
+---------+---------+
|
v <-------------------+
+-------------------+ |
| [HL] <- MSG | |
+---------+---------+ |
| |
v |
+-------------------+ |
| [B] <- 05H | |
+---------+---------+ |
| |
v <-------------+ |
+-------------------+ | |
| [A] <- [M] | | |
+---------+---------+ | |
| | |
v | |
+-------------------+ | |
| OUT to 81H | | | (Display Character)
+---------+---------+ | |
| | |
v | |
+-------------------+ | |
| CALL DELAY | | |
+---------+---------+ | |
| | |
v | |
+-------------------+ | |
| [HL] <- [HL] + 1 | | |
+---------+---------+ | |
| | |
v | |
+-------------------+ | |
| [B] <- [B] - 1 | | |
+---------+---------+ | |
| | |
v | |
/ \ | |
/ Is \ | |
/ [B] = 0? \ | |
< Is Zero? > -- NO -+ |
\ / |
\ / |
\ / |
| YES |
v |
+-------------------+ |
| JMP ROLL | ------------+ (Repeat Scrolling)
+-------------------+
Viva Questions:
- Which IC chip in the 8085 kit handles keyboard scanning and 7-segment display control?
- What is the function of the command bytes
00Hand18Hsent to port address80H? - How is the letter 'H' represented in 7-segment display hex code (
76H)? - How can you modify the scrolling speed of the rolling message?
- What is the purpose of using port
81Hin 8279 interfacing?
For all 2026 published articles list: click here:
…till the next post, bye-bye & take care