Thursday, 27 June 2013

Study of PLL (Phase Locked Loop) Generate square wave at P0.4 with PLL (Fosc=12 MHz and Cclk = 48 MHz) using ARM LPC2148....

AIM: Generate square wave at P0.4 with PLL (Fosc=12 MHz and Cclk = 48 MHz).

PLL is a block that allows multiplying the input frequency. The multiplication factor can be an integer or a rational number. There are two PLL modules in the LPC2141/2/4/6/8 microcontroller. The PLL0 is used to generate the CCLK clock (system clock) while the PLL1 has to supply the clock for the USB at the fixed rate of 48 MHz Structurally these two PLLs are identical with exception of the PLL interrupt capabilities reserved only for the PLL0. The PLL0 and PLL1 accept an input clock frequency in the range of 10 MHz to 25 MHz only.

Saturday, 22 June 2013

Key sensing and activating LED, Relay and Buzzer in ARM LPC2148

AIM: Sense key and activate following devices.

Sense key from P0.0
Activate LED and Relay connected at P0.3 and P0.6 resp.
Sense key from P0.1
Activate LED and Relay connected at P0.4 and P0.7 resp.
Sense key from P0.2
Activate Buzzer connected at P0.5.

Tuesday, 18 June 2013

Copy the content of memory location from one place to other (Block copy) in ARM LPC2148

AIM: Copy the content of memory location from one place to other.

This operation is carried out by copying content of 5 memory location. Source memory address is 0x01 and destination memory address is 0x21 by using LDR and STR instructions.

Tuesday, 11 June 2013

Implementing flashing of LED at port 0 using ARM LPC2148.

AIM: Flashing LED at P0.0, P0.1, P0.2 and P0.3 with 1 sec delay.
The LED flashing can be implemented using software delay and port pin handling.
PINSEL, IODIR, IOSET and IOCLR these four registers are very important registers when we consider port I/O operation. 

Addition of two 32 bit numbers with subroutine & function in assembly and embedded c language respectively (LPC2148).

AIM: Addition of two 32 bit numbers, with subroutine in assembly language and with function     in embedded c language.

Basically Arithmetic logical unit (ALU) is main important part of the processor. ALU used for performing various arithmetic as well as logical operations. If result of ALU is zero then Z flag of CPSR register will set. If carry is generated from 31th bit of the result then carry flag will set. If 31th bit of the result is 1 then negative flag will set.The arithmetic instructions implement addition and subtraction of 32-bit signed andunsigned values.

Monday, 3 June 2013

MATLAB code of RGB color Extraction from Color Image

RGB (Red, Green, Blue) Color model:
Basically image divided into three types. Binary image require 1 bit/pixel and it has 1 plane. Gray scale image require 8 bit/pixel and it has 8 bitplanes. Color image having 3 planes, red green and blue, each plane require 8 bits/pixel, it has 24 bitplanes.
The RGB color model is based on a Cartesian coordinate system whose axes represent the three primary colors of light (R, G, and B), usually normalized to the range [0, 1]. The eight vertices of the resulting cube correspond to the three primary colors of light, the three secondary colors, pure white and pure black.