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

I want the solution for this exam ,please Microprocessors and microcontrollers E

ID: 3876439 • Letter: I

Question

I want the solution for this exam ,please

Microprocessors and microcontrollers Exercise1 1. Cite the four sources of interrupts in PIC16F84 2. Give the role of the following bits: C, DC, Z. 3. Give the operating principle of the watchdog timer 4. Give the difference between the i 5. Explain the instructions: DECFSZ, BTFSC, ANDL W and give an example of use nstructions: MOVLW, MOVWF and MOVF for each of these instructions 6. W 7. Describe how an interruption works. hat are the three types of memory available on the PIC 16F84 microcontroller? Give the role of the following bits: a- RPO b- RBIF cEEIIE 9. What is the role of the registry: a- TRISA b- TRISB c- INTCON 10. Give the operating principle of the interruption INT /RBO. 11. Calculates the clock cycle of the PIC 16F84, if the external frequency is 20MHz. 12. Give the role of the following bits: PSA, [PS2 PSI :PSO], INTF and TOIF. 13. Which register reads the value of Timer0? 14. Give PIC 16F84 Input Output Configuration Logs Exercise 2 Give the necessary instructions for a) Delete the PORTB; b) Set the binary value 01101101 in the file 0x15; c) Put the contents of the queue (0x30) in the work register; d) Connect to the

Explanation / Answer

EXERCISE 1

Ans 1: The sources of PIC16F84 interrupts:

Ans 2: The Status Register is most important to programming the PIC, it contains the arithmetic status of ALU, the RESET status & the bank selection bits, direct & indirect. These bits are Readable/Writable & after a reset there value are unknown. If an instruction executed has an effect on these bits, then they become automatically & temporarily read-only.

2. Bit DC (Bit 1): Digit Carry/Borrow: This bit watches if a carry out from the 4th lower order of the byte is occurred. The values it can get:

3. Bit Z (Bit 2): Zero: This bit watches if the result of an arithmetic or logic operation was zero. The value it get:

Ans 4: Difference between instruction:

Syntax: MOVF k

Status flag effected: Z

A_REGISTER

Copy the content of the register labeled A_REGISTER to w.

Syntax: MOVWF f

Status flag effected: None

A_REGISTER

Copy the working register content to A_REGISTER.

Syntax: MOVLW f

Status flags effected: None

MOVLW A_VALUE

Ans 6: Three types of memory in PIC 16F84:

Each one of them has the different role. Program memory & Data memory are needed to build a program, Data EEPROM is used to save data after the microcontroller is turn off.

Ans 7: When there is an interrupt request to the misroprocessor then after the accepting the interrupts microprocessor send the INTA(active low) signal to the peripheral. The vectored address of particular interrupt is stored in program counter. The process executes an interrupts service routine (ISR) addressed in program counter.

Ans 8:

Role of bit RP0: (Bit 5): Bit 5,6 work together. They are called Register Bank Selection.

Those bits are Readable/Writable & after a reset it will get the value 0. Their task it to select the active Register Bank in use. The values it can get are:

RP<1:0>

A_REGISTER

Copy the content of the register labeled A_REGISTER to w.

MOVF 0x20 Copy the content of register at address 0x20 to w.
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