Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

3. Answer the following questions for the PIC 16F8AA (PDIP, 18 pin diagram).(20

ID: 2293024 • Letter: 3

Question

3. Answer the following questions for the PIC 16F8AA (PDIP, 18 pin diagram).(20 pts) a. The number of oscillator clocks to complete the instruction CLRW Is b. If this oscillator connected to pins 15&16 of the 16F84A is 100KHi, what is the single instruction cycle time in microseconds? c. When the external clock source is selected for the TMRO, which 16F84A PORT bit on PortA or PortB can be used to increment the TMRO. Be specific as to which bit orn PORTA which PORT it is. Answer 4. You are given the following PIC subroutine assembly code below; movf PORTA, w andlw 0x02 addwf PCL, f retlw Ox03 retiw Ox02 Table retiw ox10 retlw OxFE (circle at is the returned hex value in working register w if the value in PORTA is 0x177 ect answer) (10 pts) a. 0x 03 b. 0x 02 c. 0x10

Explanation / Answer

3 . (a) CLRW needs 1 instruction cycle which is equal to 4 clock (oscillator) cycles.

(b) Single Instruction cycle is FOSC / 4 . Hence 100KHz / 4 = 25Khz = 40us

(c) RA4 bit of PORT A

4. PORTA = 0x17 = 00010111

andlw 0x02 will and 0x17 with 0x02 (i.e. 00010111 and 00000010 = 0x02)

Hence w=0x02, So if PCL is updated by addwf PCL, f then next instruction that will be execuled will be PCL+0x02 .

Hence b. 0x02 will be returned in W by instruction retlw 0x02.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote