1. If the MOVLW Instruction takes 2 microsecond to execute, what is the frequenc
ID: 1766195 • Letter: 1
Question
1. If the MOVLW Instruction takes 2 microsecond to execute, what is the frequency of the ceramic resonator connected to OSC1 and OSC2 on the 16F84A (pins 15 and 16 for 18 pin 16F84A part) 2. Place the following development steps in the correct implementation order: (a) Download HEX file; (b) Assemble/build source code; (c)enter and edit source code; (d) test in hardware; e) design the program )simulate source code with debugger 3. If an addition operation n of the C flag and Z flag? If an addition operation result of two Hex numbers is less than OXFF, what is the status of the C flag and Z flag? 4. 5. Which status flag[s) should be checked to see the subtraction operation is positive or negative? 6. If an addition operation result of two Hex numbers is equal to oX00, what is the status of the C flag and Z flag? 7. If the Configuration word is 0x3FF2 for the PIC16F84A, what type of Oscillator is use for the design- circle correct answer. RC HS XT LP 8. For the 16F84A, how many 14 bit words of Flash Program memory are provided in this Microcontroller? 9. What Bit in the Status register is used to switch from Bank 1 to Bank 0? 10. How many VO bits ar available in PORTA of the 16F84A chip.Explanation / Answer
Answer :- 1) MOVLW instruction takes one machine cycle to execute. In PIC, one machine cycle is equal to four clock cycle.
Here 2 mico-second is equal to 4 clock cycle.Hence, 1 clock cycle = 0.5 us.
Thus clock frequency = 1/0.5 MHz = 2 MHz. So 2 MHz ceramic resonator is required.
Answer :- 2) The correct sequence is-
e) Design the program
c) Enter and edit the source code
b) Assemble and build the source code
f) Simulate source code with debugger
a) Download hex file
d) Test in hardware
Answer :- 3) Carry flag bit will set i.e. C = 1. Zero flag will set if result is 0x100 i.e. one more than 0xFF. If result is more than 0x100 i.e 0xFF + 0x2 or 0xFF + 0x3 ... then zero flag wil be clear.
Answer :- 4) Both status bits will be clear.
Answer :- 5) Carry flag. If C = 0 then positive else negative.
Answer :- 6) Assuming both numbers are non zero and positive then both will be set. As result is zero so, Z = 1. Result is zero in 8-bit, higher bit may be set as this is a sum, so there must be a carry. So C = 1.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.