Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

POLITIKENIK SULTAN MIZAN ZAINAL ABIDIN 15

DEPARTMENT OF ELECTRICAL ENGINEERING

Course Code : DEC40053 Course Name : Embedded System Application


Quiz : 2 Date : 17/5/2023
Name : DANIEL ISKANDAR BIN MOHD SHUKRI

Matrix Number:
13DTK21F1070

This question contain 3 Structure Question. Answer all questions.

QUESTION 1

List TWO (2) sources of interrupt in the PIC18 (2 marks)

(DK3, DP1, DP5, CLO1, C4)

External Interrupts: The PIC18 microcontroller has several pins that


can be configured as external interrupts. Timer Interrupts: The PIC18
microcontroller has built-in timers that can generate interrupts at
specified intervals. Timer Interrupts: The PIC18 microcontroller has
built-in timers that can generate interrupts at specified intervals.

PREPARED BY: APPROVED BY:


Course Lecturer Course Coordinator / Head of Programme

……………………………….. ………………………………..

SENARAI SEMAK PENILAIAN ITEM SEMAKAN (√)


Akur agihan AST/CIST

Sesuai aras domain taksonomi


Sesuai pembahagian markah

QUESTION 2
Give a name of PIC PIN, name of Flag Bit, name of Enable Bit and name of (5 marks) Register
that are associated to enable external hardware interrupt INTO. (Refer datasheet attached)

(DK4, DP1, CLO1, C4)


PIC pin name -RB0/INT0
Flag Bit - INT0IF
Enable Bit – INT0IF
Register – INTC0N

QUESTION 3
(8 marks)

Refer to Figure above, show the instruction needed to: -


(DK5, DP5, CLO1, C4)

i. Enable External Hardware Interrupt 0, INT0


TRISBbits.TRISB0 = 1;
INTCONbits.INT0IE = 1;
INTCONbits.GIE = 1;

ii. Enable External Hardware Interrupt 1, INT1


TRISBbits.TRISB1 = 1;
INTCON3bits.INT1IE = 1;
INTCONbits.GIE = 1;
iii. Enable Serial Transmit Interrupt, TXIF
PIE1bits.TXIE = 1;
INTCONbits.GIE = 1;
2

You might also like