introduction to assembly language programming of z80

is an introduction to Z80 assembly language programming. It explains commonly used instructions, elementary pro­gramming techniques and their applications, and the modular approach to software design. The content is presented in a format sim­ilar to one for learning a foreign language. One approach to learning a foreign language is to be­gin with a few words […]
Continue reading…

 

SUMMARY OF INTERFACING I/O DEVICES

SUMMARY in this chapter, we have examined the machine cycles of the OUT and IN in­structions and derived the basic concepts for interfacing peripheral-mapped I/Os. Similarly, we examined the machine cycles of memory-related data trans­fer instructions and derived the basic concepts for interfacing memory-mapped I/Os. These concepts were illustrated with three examples of interfacing I/O […]
Continue reading…

 

5.8 TROUBLESHOOTING I/O INTERFACING CIRCUITS

5.8 TROUBLESHOOTING I/O INTERFACING CIRCUITS In the last several sections, we discussed the interfacing of I/O devices and in­structions to test them. In I11ustrative Example 1(Figure 5.4), the test program includes two instructions that load the byte 97H into the accumulator and output the byte to port 07H• If we execute these instructions and no […]
Continue reading…

 

5.7 ADDITIONAL ILLUSTRATIVE EXAMPLES: INTERFACING SENSORS AND MOTORS

5.7 ADDITIONAL ILLUSTRATIVE EXAMPLES: INTERFACING SENSORS AND MOTORS In previous examples, we illustrated the interfacing of I/O devices that were pri­marily binary devices (on/off). We now extend the concepts to interface analog devices such as temperature sensors and motors. In interfacing analog devices, the basic procedure remains similar to that of interfacing binary devices; the […]
Continue reading…

 

ILLUSTRATIVE EXAMPLE 3: APPLIANCE CONTROL USING MEMORY-MAPPED I/O TECHNIQUE

ILLUSTRATIVE EXAMPLE 3: APPLIANCE CONTROL USING MEMORY-MAPPED I/O TECHNIQUE Figure 5.10 shows a schematic of interfacing I/O devices using the memory ­mapped I/O technique. The circuit includes one input port with eight DIP switches and one output port to control the appliances. The appliances are turned on and off by the microprocessor according to the […]
Continue reading…

 

5.5 MEMORY-MAPPED I/O

5.5 MEMORY-MAPPED I/O In, memory-mapped I/O, the input and output devices are assigned and identified by 16-bit addresses. To transfer data between the microprocessor and I/O devices, memory- related instructions (such as LD A, (16-bit) and memory control signals (such as M̅R̅E̅Q̅) are used. The microprocessor communicates with an I/O device as if it were […]
Continue reading…

 

ILLUSTRATIVE EXAMPLE 2: INTERFACING INPUT SWITCHES

ILLUSTRATIVE EXAMPLE 2: INTERFACING INPUT SWITCHES In this section, we will analyze the circuit used for interfacing eight DIP switches as shown in Figure 5.8. The circuit includes the 74LS138 3-to-8 decoder to decode the low-order bus and the tri-state octal buffer (74LS244) to interface the switches to the data bus. The port can be […]
Continue reading…

 

INTERFACING INPUT DEVICES

5.3 INTERFACING INPUT DEVICES The interfacing of input devices is almost identical to that of interfacing output devices, but with some differences in bus signals and circuit components. In this discussion, we will assume that you are familiar with the basic concepts of inter­facing (Section 5.1.3) and describe only the additional details. First, we examine […]
Continue reading…