Microprocessors Assignment / Lab / Discussion
ELEC 202_M6D.docx
Respond to the following:
• Describe the checksum method of ensuring data integrity in ROM.
• Describe the parity bit method of ensuring data integrity in RAM.
Respond to the following:
• How serial transmission differs from parallel transmission of data.
• List the advantages of serial transmission over parallel transmission.
M6A2 Lab Controlling the PC.docx
The objective of this lab is to control the hardware of a personal computer directly. A computer program called TONE.ASM (Attached) will be used to conduct this lab. This program is developed in assembly language.
Procedure
1. Download the program TONE.ASM (Attached). Assemble, link, and run. Hopefully, you will hear the speaker beep at a 1 KHz rate for a short period.
2. Adjust the INNER and OUTER values until the tone lasts for 5 seconds. How many loops are required? What is the speed of the processor on your system?
3. Readjust the INNER and OUTER values for tone duration of 0.25 seconds.
4. Modify the TONE.ASM program so that the 0.25-second 1 KHz tones plays five times, once each second. Hint: Use DOS INT 21H Function 2CH (Get Time) to read the system clock. Look for the seconds’ value to change. When it does, play the 0.25-second tone, then start watching the system clock again, waiting for the seconds to change again. Do this five times.
Here is some sample code for detecting when a new second has started:
<
The loop exits at the beginning of the new second. You will need to define NOW in the DATA portion of the program (NOW DB?).
5. Submit the final ASM file.
Textbook Problems Assignment.docx
CHAPTER 9: MEMORY SYSTEM DESIGN
Q9. Two 2KB EPROMs are used to make a 4KB memory. How many address lines are needed for the EPROMs? What upper address lines must be used for the decoder?
A9.
Q10. For the memory of Question 9, what is the address of the last memory location, if the starting address of the EPROM is E4000?
A10.
Q11. Design a memory address decoder for the EPROM memory of Question 10, using a circuit similar to that in Figure 9.10.
A11.
Q12. Repeat Questions 9 through 11 for these memory sizes and starting addresses:
(a) 8KB, base address of CC000
(b) 32KB, base address of 80000
(c) 256KB, base address of 00000
A12.
Q28. Design a partial-address decoder for a 64KB EPROM with a base address of 40000.
A28.
Q30. What are the ranges of addresses for the partial-address decoders of Example 9.7?
A30.
REFERENCES:
tone.asm
;Program TONE.ASM: Generate a 1 KHz tone on the PC speaker for 5 seconds. ; .MODEL SMALL .DATA ;Note: You will have to adjust these values to get the 5 seconds. ;The current values give just over 1 second on a 1.3 GHz machine. OUTER DW 4000 ;outer loop count INNER DW 50000 ;inner loop count .CODE .STARTUP CALL SPKRON ;turn speaker on MOV CX,1190 ;divisor for 1 KHz tone CALL LDTIMER ;set speaker frequency CALL DELAY ;wait for chosen duration CALL SPKROFF ;turn speaker off .EXIT SPKRON PROC NEAR IN AL,61H ;read current state of port 61h OR AL,3 ;set speaker control bits OUT 61H,AL ;output new state RET SPKRON ENDP SPKROFF PROC NEAR IN AL,61H ;read current state of port 61h AND AL,0FCH ;clear speaker control bits OUT 61H,AL ;output new state RET SPKROFF ENDP DELAY PROC NEAR MOV DX,OUTER WAIT1: MOV CX,INNER WAIT2: NOP NOP NOP NOP LOOP WAIT2 DEC DX JNZ WAIT1 RET DELAY ENDP ;Note: Output frequency equals 1,190,000 divided by CX LDTIMER PROC NEAR MOV AL,0B6H ;timer 2 control word OUT 43H,AL MOV AL,CL ;output lower byte of count OUT 42H,AL MOV AL,CH ;output upper byte of count OUT 42H,AL RET LDTIMER ENDP END