PIC LAB-1
Test-5
Page 18
INDEX
Answer the following questions .
. . JavaScript is required!
More questions on programming . . .
The best way to learn a topic is with questions.
We have proven this. It's similar to reverse learning or reverse engineering and
is called Mitchellism. The author has coined this word through a wave of
success. You can learn five times faster though mistakes than slowly plodding
through the front door.
These questions and answers produce more thought than lines and pages of
text.
Try them out . . .
1. Drag the correct instructions and place them in the program:
2. Drag the correct instructions and place them in the program:
3. Drag the correct instructions and place them in the program:
4. Drag the correct instruction to the program:
5. Name the input/output bits for Port B:
6. Name the fault in this routine:
Delay
|
NOP
DECFSZ 1A
GOTO
Delay
RETURN
|
|
|
7. Write the instruction to move 44h from W to file 1A?
8. Drag the correct instructions to the program:
9. Write the instructions to make bit 3 of TRIS 06 an INPUT
10. Write the instructions to make bit 3 of Port B HIGH
11. Describe the main difference between: GOTO Tester and CALL
Tester.
12. Drag the correct instructions to the program:
13. Describe, in words, the following instruction:
DECFSZ 1A,1
14.
Write the two instructions to carry out the following: Put 8E into file 1C
15. Drag the correct instructions to the program:
16. Name the lines of input/output Port A:
17. What value will be contained in file 1A after the instruction: BSF
1A,4
18. File 1B holds the value 0000 1100. After the following instruction:
BSF 1B,6 the file will
contain:
19. Name the fault in this routine:
|
BTFSS 05,0
CLRF 1F
GOTO String
BSF 05,0
INCF 1F,1
|
;Test button"A"
(Button is active HIGH)
;Clear file 1F
;Goto String
;Set bit 0
Increment file 1F
|
|
20. The TRISB file is loaded with 0011 1011. Name the output line(s) created by
this value.
21. Name the lowest in/out line for Port B:
22. Write in words the instruction: BCF 06,0
23. Name the highest in/out line for a PIC16F84:
24. Write the "bit set file" instruction for the 8 output
lines of Port B for a PIC16F84:
25. What does "bit manipulation" mean?
NEXT
|