29. Figure 6.15 shows an input port with an 8-key DIP switch. When all switches are off, the microprocessor reads the da
Posted: Sun May 15, 2022 8:34 pm
29. Figure 6.15 shows an input port with an 8-key DIP switch. When all switches are off, the microprocessor reads the data FFH. When a switch is turned on (closed), it goes to logic 0 (for all switches ON, the data will be OOH). Write instructions to read the input port and, if all switches are open, set the Zero flag. (Use the instruc- tion CMA to complement the input reading and ORA A to set the Zero flag.)
+5V w D Input Port 07H Data Bus Do Input Enable FIGURE 6.15 DIP Switch Input Port with Address 07H
+5V w D Input Port 07H Data Bus Do Input Enable FIGURE 6.15 DIP Switch Input Port with Address 07H