[go: up one dir, main page]

0% found this document useful (0 votes)
160 views4 pages

Interrupt ARM PDF

The document discusses implementing interrupts in an ARM processor. It describes connecting switches to trigger interrupts on pin PF4 and PF0. The main program blinks red and green LEDs, while an interrupt service routine blinks a yellow LED when the external interrupt switch is pressed. The circuit diagram and program code are provided to demonstrate blinking the LEDs as interrupts are triggered.

Uploaded by

Anand Duraiswamy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
160 views4 pages

Interrupt ARM PDF

The document discusses implementing interrupts in an ARM processor. It describes connecting switches to trigger interrupts on pin PF4 and PF0. The main program blinks red and green LEDs, while an interrupt service routine blinks a yellow LED when the external interrupt switch is pressed. The circuit diagram and program code are provided to demonstrate blinking the LEDs as interrupts are triggered.

Uploaded by

Anand Duraiswamy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

WWW.STUDENTSFOCUS.

COM

IMPLEMENTING INTERRUPT IN ARM PROCESSOR
AIM
To implement interrupt in ARM processor.

APPARATUS REQUIRED
1. ARM processor, EK-TM4C123GXL
2. Computer with energia software.
3. LED – 3 nos
4. Bread Board.
5. Connecting wires

THEORY
Two interrupt ports are available in ARM processor. Two interrupt ports are PUSH1,
PUSH2. PUSH1 is linked with PF4 and PUSH2 is linked with PF0, so external switch is to be
connected with PF4 to trigger the PUSH1 interrupt, and PF0 for PUSH2.
SW1 and SW2 switch are present in the ARM target board, SW1 can be used instead
of connecting external switch to PF4 to trigger PUSH1 interrupt. SW2 can be used instead of
connecting external switch to PF0 to trigger PUSH2 interrupt.
These interrupts are initiated on RISING or FALLING of signal which is to provided
through switches and as mentioned in program in “attachInterrupt” function.

PROCEDURE
1. Connections are given as per the circuit diagram.
2. Program is uploaded to ARM processor.
3. Output is verified in LEDs.
4. The main program execution is observed in Red and Green Leds continuously blinking.
5. When pressing External interrupt switch Yellow Led is glowing for some time due to
interrupt is initiated.

PROGRAM
int ledRed=PE_1;
int ledGreen=PE_2;
int ledYellow=PE_3;
int interrCount=0;

void setup()
{
pinMode(ledRed, OUTPUT);
pinMode(ledGreen, OUTPUT);
pinMode(ledYellow, OUTPUT);

digitalWrite(ledRed, LOW);
digitalWrite(ledGreen, LOW);
digitalWrite(ledYellow, LOW);

pinMode(PUSH2, INPUT_PULLUP);

attachInterrupt(PUSH2, interruptBlink, RISING);


}

WWW.STUDENTSFOCUS.COM

void loop()
{
interrCount++;

digitalWrite(ledRed, HIGH);
digitalWrite(ledGreen, LOW);
delay(300);
digitalWrite(ledRed, LOW);
digitalWrite(ledGreen, HIGH);
delay(300);

if ( interrCount == 10 )
{
interrCount = 0;
digitalWrite(ledYellow, LOW);
}

void interruptBlink()
{
digitalWrite(ledYellow, HIGH);
}


CIRCUIT DIAGRAM

WWW.STUDENTSFOCUS.COM

INPUT

HIGH and LOW signal to Red and Green Led


HIGH signal to Yellow Led when interrupt is triggered

OUTPUT

Red and Green Led continuously blinking


Yellow led blinking when External interrupt switch is pressed.

WWW.STUDENTSFOCUS.COM

RESULT
Thus the implementation of interrupt is performed in ARM processor.

You might also like