Beruflich Dokumente
Kultur Dokumente
ARM7 Overview
On April 26th, 1985, ARM was first developed by Acorn Computers in
Cambridge, England.
The CPU at the heart of the LPC2000 family is an ARM7. The ARM7 is a RISC computer with a small instruction set and
consequently a small gate count.
Architecture of ARM7
ARM7 Registers
The ARM7 is a load-and-store architecture. The central set of registers are a bank of 16 user registers R0 R15.
Each of these registers is 32 bits wide and R0 R12 are user registers in that they do not have any specific other function.
The ARM7 CPU has two instruction sets: ARM instruction set which has 32-bit wide instructions. THUMB instruction set which has 16-bit wide instructions. The THUMB instruction set is a compressed form of the ARM instruction set. By compiling code in the THUMB instruction set we can get a space saving of 30%, while the same code compiled as ARM code will run 40% faster.
R0 = R0+R1
The ARM7 is designed to operate as a big-endian or little-endian processor. The LPC2000 family fixes the endianess of the processor as little endian (i.e. MSB at highest bit address).
CS0_LED
Clk
P1.16 to P1.23
74HC273
( 8 Positive Edge Triggered FF )
8 LEDs
LPC2148
CS0_LED CS1_SW
P0.19 P0.20
3:8 decoder
P0.22
8 I/P Switches
CS1_SW
int main (void) { unsigned char b; InitializeIO( ); while(1) { IOCLR0 = 0x00580000; IOSET0 = 0x00080000; IODIR1 &= 0xFF00FFFF; b = IOPIN1 >> 16; IODIR1 |= 0x00FF0000; IOPIN1 = b << 16; IOCLR0 = 0x00580000; } }
// Address Lines A0,A1,A2 set as 0 // Set A0 to generate chip enable for toggle switches // Set the data lines to input // Read from toggle switches // Set the data lines to output // Display the data on LEDs // A0 - A2 set as 0
main
/* Display Result */
here: b here
Message:
.ascii " Multiplication "
.include "LCD.s"
LCD.S It contains all the necessary subroutines while using the LCD display like to initialize LCD, display character, display word etc.
LPC214X.H
It is a common header file for 2141/42/46 microcontrollers provided by manufacturer Philips. It contains the address for all the internal blocks and special registers such as Timers, Serial ports etc. eg. # define IODIR0 0XE0028008
Vector.S
It contains the start up code. This file is used to initialize the values of PC,SP,Timers etc.
Flash.ld It is a Linker file for running the code from flash memory. File named Flash.ld which is Script File uses to keep the beginning and the end of default value with Flash Memory size.
Thank you