a) Demonstrate that you can switch ON the LED1 on-board LPC4088QSB, using the given ARM assembly language program.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Program code for part(a):
1OCON_P1_13
1OCON PI 18
EQU Ox4002coBe ; PI[13] 10CON_P1_13 R/N Ox030 Ox4002coBa
EQU Ox4002coCs : PI(18] IOCON PI 18 R/N Ox030 Dx4002 cocs D (tables 83, 84)
LPC4088QSB_PO
LPC4088OSB_PI
LPC4088OSB P2
LPC4088QSB_P3
LEC4088OSB P4
LPC4088QSB_Ps
DIR REG OFFSET
MSK REG OFFSET
: This is essentially Table 94 from UM10562
EQU Ox20098000
EQU Ox20098020
EQU Ox20098040
EQU Ox20098060
EQU Ox20098080
EQU OX2009BOAO
EQU Ox00
EQU Ox10
EQU Ox14
EQU Ox18
EQU Oxle
PIN REG OFFSET
SET REG OPFSET
CLR REG_OFESET
; End Table 94
EQU (1 <« 13) : Ox0000200
EQU (1 << 18): Ox00040000
bit13
bit18
AREA my_asm, CODE, READONLY
ENTRY
EXPORT
_main
main
: setup LED1 on porti[18]
: setup the, IOCON, I/0 configuration - default is Gx30, setup to Ox00
; setup for GPIO and inactive and no hysteresis
R1, =10CON_P1_18
R2, =0x0000oodo
LDR
: Pg 126
LDR
STR
R2, [RI, #0X00I
R1,-LPC4088OSB_P1
R3, =bitl8
i pointer to base reg of portl - Pg 146
i set LED I port pin to output - pin 18
; set DIRECTION bits
LDR
LDR
STR
R3, [RI, DIR_REG_OFFSET
; pointer to base reg ofE portl
: MSK register setting
: set MASK bits
LDR
R1,=LEC4088OSE_P1
R3, =0x00000000
R3, (R1, MSK_REG_OFFSET
LDR
STR
:* LED is NEGATIVE logic,
t SET turns it OFE
* CLR turna it ON
i pointer to base reg of portl
: SET register setting
; set SET bits - This turns OFF the LED
LDR
R1,=LPC4088OSB_P1
R3, -biti8
LDR
STR
R3, (R1, ESET_REs_OFFSET|
bl delay
LOR
LDR
R1,=LPC40880SB_P1
R3, -bitl8
R3, (RI, +CLR_RzG OFFSET
i pointer to base reg of portl
: CLR register setting
; set CLEAR bits - This turns ON the LED
STR
stp
b stp
i Delay subroutine
delay
PUSH (RO, LR)
MOVS r0, 40x1000000
;l cycle
SUBS r0, r0, #1
;1 cycle
:2 if taken, I otherwise
ENE
B1
POP
(RO, PC)
i end delay subroutine
ALIGN
END
Transcribed Image Text:Program code for part(a): 1OCON_P1_13 1OCON PI 18 EQU Ox4002coBe ; PI[13] 10CON_P1_13 R/N Ox030 Ox4002coBa EQU Ox4002coCs : PI(18] IOCON PI 18 R/N Ox030 Dx4002 cocs D (tables 83, 84) LPC4088QSB_PO LPC4088OSB_PI LPC4088OSB P2 LPC4088QSB_P3 LEC4088OSB P4 LPC4088QSB_Ps DIR REG OFFSET MSK REG OFFSET : This is essentially Table 94 from UM10562 EQU Ox20098000 EQU Ox20098020 EQU Ox20098040 EQU Ox20098060 EQU Ox20098080 EQU OX2009BOAO EQU Ox00 EQU Ox10 EQU Ox14 EQU Ox18 EQU Oxle PIN REG OFFSET SET REG OPFSET CLR REG_OFESET ; End Table 94 EQU (1 <« 13) : Ox0000200 EQU (1 << 18): Ox00040000 bit13 bit18 AREA my_asm, CODE, READONLY ENTRY EXPORT _main main : setup LED1 on porti[18] : setup the, IOCON, I/0 configuration - default is Gx30, setup to Ox00 ; setup for GPIO and inactive and no hysteresis R1, =10CON_P1_18 R2, =0x0000oodo LDR : Pg 126 LDR STR R2, [RI, #0X00I R1,-LPC4088OSB_P1 R3, =bitl8 i pointer to base reg of portl - Pg 146 i set LED I port pin to output - pin 18 ; set DIRECTION bits LDR LDR STR R3, [RI, DIR_REG_OFFSET ; pointer to base reg ofE portl : MSK register setting : set MASK bits LDR R1,=LEC4088OSE_P1 R3, =0x00000000 R3, (R1, MSK_REG_OFFSET LDR STR :* LED is NEGATIVE logic, t SET turns it OFE * CLR turna it ON i pointer to base reg of portl : SET register setting ; set SET bits - This turns OFF the LED LDR R1,=LPC4088OSB_P1 R3, -biti8 LDR STR R3, (R1, ESET_REs_OFFSET| bl delay LOR LDR R1,=LPC40880SB_P1 R3, -bitl8 R3, (RI, +CLR_RzG OFFSET i pointer to base reg of portl : CLR register setting ; set CLEAR bits - This turns ON the LED STR stp b stp i Delay subroutine delay PUSH (RO, LR) MOVS r0, 40x1000000 ;l cycle SUBS r0, r0, #1 ;1 cycle :2 if taken, I otherwise ENE B1 POP (RO, PC) i end delay subroutine ALIGN END
Objective:
Controlling the on-board LEDS of the LPC4088 QSB using an ARM Assembly Language
Program.
You will demonstrate control of the on-board LEDS on the LPC4088 QSB using an ARM
Assembly Language program by switching them ON/OFF
The lab consists of multiple steps (each 25 points), each is explained in detail later:
a) Demonstrate that you can switch ON the LED1 on-board LPC4088QSB, using the given
ARM assembly language program.
b) Demonstrate that you can cause the LEDI on-board LPC4088QSB to blink by turning it
ON/OFF in an infinite loop. You can achieve this by making changes to the given ARM
assembly language program.
c) Demonstrate that you can blink the LED2 on-board LPC4088QSB, using an ARM assembly
language program.
d) Demonstrate that you can blink the LED3 on-board LPC4088QSB, using an ARM assembly
language program.
e) Demonstrate that you can cause the LEDS to light up in order, LED1, LED2, LED3, LED4 on-
board LPC4088QSB to blink by turning it ON/OFF in an infinite loop. You can achieve this by
making changes to the previous ARM assembly language program.
Transcribed Image Text:Objective: Controlling the on-board LEDS of the LPC4088 QSB using an ARM Assembly Language Program. You will demonstrate control of the on-board LEDS on the LPC4088 QSB using an ARM Assembly Language program by switching them ON/OFF The lab consists of multiple steps (each 25 points), each is explained in detail later: a) Demonstrate that you can switch ON the LED1 on-board LPC4088QSB, using the given ARM assembly language program. b) Demonstrate that you can cause the LEDI on-board LPC4088QSB to blink by turning it ON/OFF in an infinite loop. You can achieve this by making changes to the given ARM assembly language program. c) Demonstrate that you can blink the LED2 on-board LPC4088QSB, using an ARM assembly language program. d) Demonstrate that you can blink the LED3 on-board LPC4088QSB, using an ARM assembly language program. e) Demonstrate that you can cause the LEDS to light up in order, LED1, LED2, LED3, LED4 on- board LPC4088QSB to blink by turning it ON/OFF in an infinite loop. You can achieve this by making changes to the previous ARM assembly language program.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY