Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

lpc2148 assembly language

Status
Not open for further replies.

shubh1994

Member level 1
Member level 1
Joined
Jul 7, 2012
Messages
32
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Visit site
Activity points
1,540
I have wrote many c codes for lpc2148 like adc,i2c,spi...
but now i want to write codes in assembly language but i am not getting the start.
cam anybody give few examples of assembly coding of lpc2148

plz help!!
 

I have wrote many c codes for lpc2148 like adc,i2c,spi...
but now i want to write codes in assembly language but i am not getting the start.
cam anybody give few examples of assembly coding of lpc2148


The LPC21XX family of ARMs actually support two very different instruction sets and conversely two different assembly languages, ARM and Thumb.

Development for the LPC21XX is more commonly done in the ARM Assembly Language, while development for the LPC17XX is done in Thumb as it only supports the Thumb Assembly Language.

It would be helpful to know which development toolsuite you are using, KEIL, GCC-ARM, IAR, etc?

Each requires its particular style/syntax when writing assembly language code.

Unfortunately, there are not a lot of online resources which cover ARM Assembly Language.

A few of the better ARM Assembly centric resources are the following:

Whirlwind Tour of ARM Assembly



ELEC 5260/ELEC 6260: Embedded Computing Systems

While I have numerous texts which cover ARM/Thumb Assembly, I have found the following quite good for a beginner and affordable as well:

Arm Assembly Language - an Introduction (Second Edition)

The first example code in the above text, written in ARM Assembly, for the KEIL development toolsuite, simply adds two numbers:


Code ASM - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
; Complete test version for Keil tools of Program 4.1, identical to full Program 4.3
; This is the only program file required in the project
; Date:-      24th May 2011
; Revision:-  None
; Author:-    J.R. Gibson
 
            AREA  Test,  CODE,  READONLY   ; the only code module name Demo1
 
            EXPORT     Reset_Handler
 
Reset_Handler
            MOV    r3, #25              ; load first value
            MOV    r7, #204             ; load second value
            ADD    r2, r3, r7           ; form the sum of the two values
 
stop        BAL   stop                  ; end mechanism
 
            END           ; END directive to show nothing more



BigDog
 

thank you so much for reply!!!
but sir, my problem is how to use lpc2148 register like IODIR ,PINSEL etc in assembly language.
i would be thankful if you provide me led blinking program in assembly.
I learned assembly language programming for ARM 7 architecture but not knowing how to implement it on lpc2148.

I think you would have understood my problem
 

thank you so much for reply!!!
i would be thankful if you provide me led blinking program in assembly.
I learned assembly language programming for ARM 7 architecture but not knowing how to implement it on lpc2148.

I think that would be a good learning experience for you. Write the LED blinking program for the ARM 7, and do an instruction by instruction check and if needed 'translation'.

If you have problems, then I am sure some-one can help.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top