SlideShare a Scribd company logo
1 of 152
Download to read offline
UNIT III
Interfacing and Programming
Dr. P. H. Zope
SSBT’s College of Engineering and Technology Bambhori Jalgaon
North Maharashtra University
phzope@gmail.com
9860631040
1. What is Interfacing and Need of interfacing.
2. Different Interfacing techniques.
3. Basic embedded C programs for on-chip peripherals
studied in system architecture.
4. Interfacing of different displays including Graphic LCD
(320X240), Interfacing of input devices including touch
screen etc,
5. Interfacing of output devices like thermal printer etc.,
6. Embedded communication using CAN and Ethernet,
7. RF modules, GSM modem for AT command study etc.
Topics
An interface is the point of interaction with software, or computer
hardware, or with peripheral devices such as a computer monitor or
a keyboard.
Some computer interfaces such as a touch screen can send and
receive data, while others such as a mouse, microphone or joystick
can only send data.
Types of Interfacing
1. Hardware
2. Software
What is Interfacing
Hardware interfaces
Hardware interfaces exist in computing systems between many of
the components such as the various buses, storage devices,
other I/O devices, etc.
A hardware interface is described by the mechanical, electrical and
logical signals at the interface and the protocol for sequencing
them (sometimes called signaling).
A standard interface, such as SCSI, decouples the design and
introduction of computing hardware, such as I/O devices, from the
design and introduction of other components of a computing
system, thereby allowing users and manufacturers great flexibility
in the implementation of computing systems.
Hardware interfaces can be parallel where performance is
important or serial where distance is important.
Software interfaces
A software interface may refer to a wide range of different types of
interface at different "levels": an operating system may interface
with pieces of hardware.
Applications or programs running on the operating system may need
to interact via streams, and in object oriented programs, objects
within an application may need to interact via methods.
Programming to the interface
The use of interfaces allows a programming style
called programming to the interface.
The idea behind this is to base programming logic on the interfaces
of the objects used, rather than on internal implementation details.
Programming to the interface reduces dependency on
implementation specifics and makes code more reusable.
It gives the programmer the ability to later change the behavior of
the system by simply swapping the object used with another
implementing the same interface.
Benefits
1.Low cost
2.Easy interfacing & Design
3.Easy Production
4.users choice for interfacing
5.No Maintenance
6.Easier Handling
Disadvantages
1.Compact size is not possible
2.Power consumption is more as compared to SOC
3.Leakage current is more
4.Limited Devices Addressing
5.No Support of Multi/ Master configuration
Different Interfacing techniques
ROM image creation in an Embedded System
Process of converting C , C ++ -program into ROM image
and ready to use
To make the application run independently with the specific board one can
follow the steps given below so that the application developed on the host
system, after cross compiling the same for specific image and specific board
The step wise process is as follows :
To write your first program, you'll need to have the following
software installed on your system:
• Triton IDE installed
• JRE of version 1.5 or higher ( provided in Triton IDE setup)
• Philips Utility ( provided in Triton IDE setup)
Setting up the Project
To create an IDE project:
• Start Triton IDE.
• Select the workspace in which you can create all your projects as
shown in the figure below. Click OK.
Triton IDE C/C++ Environment opens as shown in below figure in
which you can create new project, open existing one etc.
To create new project go to Project menu New C Project.
You will get below figure.
In the Project Name field, type keypad.
o Select the Target as per the board you have.
o Select the Variant from the variant list.
o Select Operating System as per your requirement.
o Select the Port from Port field.
o Select the Baud Rate.
o Select the Build options.
o Select the Download options
o Select the Debug type
o You can also change the location of project.
For that uncheck use default location.
o Check Create Project Using Template.
Click Next.
• Belo s ree ill appear. “ele t De ug a d
Release configurations.
Click Finish.
The project is created and opened in the IDE. You should see the following components:
• The Proje ts i do , hi h o tai s a tree ie of the o po e ts of the project, including
source files and properties file that your code depends on. .
• The “our e Editor i do ith a file alled ke pad_ ai . ope .
Adding Code to the Generated Source File
Because you have left the Create Project Using Template checkbox selected in the New
Project wizard, the IDE has created a skeleton class for you. You can add your keypad
code to the skeleton code by replacing the line:
//TODO: You can write your code at here
Sample code for Keypad
-------------------------------
#include <board.h>
int main(void)
{
char key;
q_keyinit(SPIRIT);
q_lcdinit(SPIRIT); /* initialise the LCD*/
q_printf("%s rnkey;","Hello");
q_displaylcd("Hello", 5);
while(1)
{
while((key = q_keyread()) == 0);
key = key + 0x30;
q_clrscreen();
q_printf("%x n", key);
q_displaylcd(&key, 1);
}
}
Save the change by choosing File > Save.
Compiling the Project
To compile project you need to select Debug or Release mode.
• Debug mode: This creates an executable which you after
downloading on the target board are able to debug.
• Release mode: This creates an executable which you can download
on the target board but you won’t be able to debug.
• Right click on the keypad project and point to Active Build
Configuration and select Release as shown in the below screen.
•To build Project right click on keypad project and select Build Project.
• Open the build console view to check for any errors as shown in the below figure.
If your project has built successfully *.hex will be created.
• If there are any errors in the project Build Console view will display the error
messages and from Build Output view you can check the location of errors in your
code.
• When you build the project, the keypad.hex is generated. You can see where
the new file is generated by opening the C/C++ Projects view and expanding the
keypad project node as shown in the following figure.
Now that you have built the
project, you download executable
on target board and run the
program.
Downloading the Program
• I Trito IDE e e uta le a e do loaded three optio s:
ISP Utility, Odyssey JTAG and FTP.
• “ele t the appropriate do load optio a d right li k o the *.he file ge erated
and click Download as shown below.
After successful download of
program you can check the
application by running it
on target board.
Debugging the Program
In Triton IDE you can debug your program by three options:-
Monitor, Odyssey JTAG and Ethernet.
• As per your requirement select appropriate option for debugging and build the
project in debug mode (same step as Release mode)
• After compilation download the generated executable and you can now debug the
project.
• Right click on the project and select Debug As and click Debug Local C/C++
Application.
330_09 30
GPIO - General purpose input/output.
FEATURES
• Direction control of individual bits
• Separate control of output set and clear
• All I/O default to inputs after reset
APPLICATIONS
• General purpose I/O
• Driving LEDs, or other indicators
• Controlling off-chip devices
• Sensing digital inputs
330_09 31
IOPIN
GPIO Port Pin value register. The current state of the port pins
can always be read from this register, regardless of pin
direction and mode.
IOSET
GPIO Port Output set register. This register controls the state
of output pins in conjunction with the IOCLR register. Writing
ones produces highs at the corresponding port pins. Writing
zeroes has no effect.
IODIR
GPIO Port Direction control register. This register individually
controls the direction of each port pin.
IOCLR
GPIO Port Output clear register. This register controls the state
of output pins. Writing ones produces lows at the
corresponding port pins and clears the corresponding bits in
the IOSET register. Writing zeroes has no effect.
LED Interfacing
32330_09
P0-15
P0-16
P0-17
P0-18
P0-19
P0-20
P0-21
P0-22
P0-23
330_09 33
A31302928 A27262524 A23222120 A19181716 A15141312 A111098 A7654 A3210
0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0000 0000 0000
0 0 7 F 8 0 0 0
Prepare code for Pin Declaration
A31302928 A27262524 A23222120 A19181716 A15141312 A111098 A7654 A3210
0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0000 0000 0000
0 0 7 F 8 0 0 0
Prepare code for Data Display on port Lines
330_09 34
A31302928 A27262524 A23222120 A19181716 A15141312 A111098 A7654 A3210
0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 0 0000 0000 0000
0 0 2 A 8 0 0 0
Prepare code for Data Display on port Lines =55
A31302928 A27262524 A23222120 A19181716 A15141312 A111098 A7654 A3210
0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 0 0 0000 0000 0000
0 0 5 5 0 0 0 0
Prepare code for Data Display on port Lines = AA
330_09 35
#include<LPC21xx.h>
void delay();
int main(void)
{
*IODIR0 = 0x7f8000;
while(1)
{
*IOPIN0 = 0x550000;
delay();
*IOPIN0 = 0x2A8000;
delay();
}
return 0;
}
void delay()
{
unsigned int x=500000;
while( x > 0 )
x--;
}
Seven-Segment Display
 Seven-segment Displays
 Used to display BCD digits
 0 thru 9
 A group of 7 LEDs physically
mounted in the shape of the
number eight
 Plus a decimal point
 Each LED is called a segment
 ‘a’ through ‘g’
 Two types
 Common anode
 Common cathode
36330_09
Seven-Segment Display
 Common Anode
 All anodes are connected together to a power supply
 Cathodes are connected to data lines
 Logic 0 turns on a segment
 Example: To display the digit 1
 All segments except b and c should be off
 11111001 = F9H
37330_09
Common Anode
Interface Seven-Segment Display
 Common Cathode
 All cathodes are connected together to ground
 Anodes are connected to data lines
 Logic 1 turns on a segment
 Example: To display digit 1
 All segments except b and c should be off
 00000110 = 06H
38330_09
39330_09
330_09 40
Serial Number DP G F E D C B A Code
0 0 0 1 1 1 1 1 1 3FH
1 0 0 0 0 0 1 1 0 06H
2 0 1 0 1 1 0 1 1 5BH
3 0 1 0 0 1 1 1 1 4FH
4 0 1 1 0 0 1 1 0 66H
5 0 1 1 0 1 1 0 1 6DH
6 0 1 1 1 1 1 0 1 7DH
7 0 0 0 0 0 1 1 1 07H
8 0 1 1 1 1 1 1 1 7FH
9 0 1 1 0 1 1 1 1 6FH
A 0 1 1 1 0 1 1 1 77H
B 0 1 1 1 1 1 0 0 7DH
C 0 0 1 1 1 0 0 1 39H
D 0 1 0 1 1 1 1 0 5EH
E 0 1 1 1 1 0 0 1 79H
F 0 1 1 1 0 0 0 1 71H
Look-Up Table
330_09 41
#include<LPC21xx.h>
void delay();
int main(void)
{
*IODIR1 = 0XFF0000;
while(1)
{
*IOCLR1 = 0Xff0000;
*IOSET1 = 0x3f0000; //0
delay();
*IOCLR1 = 0Xff0000;
*IOSET1 = 0x060000; //1
delay();
*IOCLR1 = 0Xff0000;
*IOSET1 = 0x5b0000; //2
delay();
*IOCLR1 = 0Xff0000;
*IOSET1 = 0x4f0000; //3
delay();
*IOCLR1 = 0Xff0000;
*IOSET1 = 0x660000; //4
delay();
330_09 42
*IOCLR1 = 0Xff0000;
*IOSET1 = 0x6d0000; //5
delay();
*IOCLR1 = 0Xff0000;
*IOSET1 = 0x7d0000; //6
delay();
*IOCLR1 = 0Xff0000;
*IOSET1 = 0x070000; //7
delay();
*IOCLR1 = 0Xff0000;
*IOSET1 = 0x7f0000; //8
delay();
*IOCLR1 = 0Xff0000;
*IOSET1 = 0x6f0000; //9
delay();
*IOCLR1 = 0Xff0000;
*IOSET1= 0x770000; //A
delay();
330_09 43
*IOCLR1 = 0xff0000;
*IOSET1 = 0x7c0000; //b
delay();
*IOCLR1 = 0xff0000;
*IOSET1 = 0x390000; //C
delay();
*IOCLR1 = 0xff0000;
*IOSET1 = 0x5e0000; //d
delay();
*IOCLR1 = 0xff0000;
*IOSET1 = 0x790000; //E
delay();
*IOCLR1 = 0xff0000;
*IOSET1 = 0x710000; //F
delay();
}
return 0;
}
330_09 44
void delay()
{
int x=500000;
while( x > 0 )
x--;
}
330_09 45
Interface Seven-Segment Display
using Interrupt signal (IRQ)
330_09 46
330_09 47
SEVEN-SEGMENT DISPLAY INTERFACE USING INTERRUPT
#include<board.h>
#include<LPC21xx.h>
void ISRHandlerEXTINT3()__attribute__((interrupt("IRQ")));
void delay()
{
int x=500000;
while( x > 0 )
x--;
}
330_09 48
void ISRHandlerEXTINT3(void)
{
*EXTINT=0x00000008;
q_printf("External Interruptn");
*IOCLR1 = 0Xff0000;
*IOSET1 = 0x3f0000;//0
delay();
*IOCLR1 = 0Xff0000;
*IOSET1 = 0x060000; //1
delay();
*IOCLR1 = 0Xff0000;
*IOSET1 = 0x5b0000; //2
delay();
*IOCLR1 = 0Xff0000;
*IOSET1 = 0x4f0000; //3
delay();
330_09 49
*IOCLR1 = 0Xff0000;
*IOSET1 = 0x660000; //4
delay();
*IOCLR1 = 0Xff0000;
*IOSET1 = 0x6d0000; //5
delay();
*IOCLR1 = 0Xff0000;
*IOSET1 = 0x7d0000; //6
delay();
*IOCLR1 = 0Xff0000;
*IOSET1 = 0x070000; //7
delay();
*IOCLR1 = 0Xff0000;
*IOSET1 = 0x7f0000; //8
delay();
*IOCLR1 = 0Xff0000;
*IOSET1 = 0x6f0000; //9
delay();
330_09 50
*IOCLR1 = 0Xff0000;
*IOSET1 = 0x770000; //A
delay();
*IOCLR1 = 0xff0000;
*IOSET1 = 0x7c0000; //b
delay();
*IOCLR1 = 0xff0000;
*IOSET1 = 0x390000; //C
delay();
*IOCLR1 = 0xff0000;
*IOSET1 = 0x5e0000; //d
delay();
*IOCLR1 = 0xff0000;
*IOSET1 = 0x790000; //E
delay();
*IOCLR1 = 0xff0000;
*IOSET1 = 0x710000; //F
330_09 51
delay();
*IOCLR1 = 0xff0000;
*IOSET1 = 0x760000;//H
delay();
*IOCLR1 = 0xff0000;
*IOSET1 = 0x800000;//DP
delay();
q_printf("Press the switch againn");
*VICVectAddr=0 ;
}
330_09 52
void IRQInit()
{
*PINSEL1=0x20000000;
*EXTMODE=0x8;
*VICVectAddr0=(unsigned int)ISRHandlerEXTINT3;
*VICVectCntl0=0x20|0x11;
*VICIntEnable=0x20000 |*VICIntEnable;
}
int main(void)
{
*IODIR0=0x7F8000;
IRQInit();
q_printf("mainn ");
return 0;
}
Time Multiplex Scanning
53330_09
Interfacing Push-Button Keys
 When a key is pressed (or released), mechanical metal contact
bounces momentarily and can be read as multiple inputs
 Key debounce
 Eliminating reading of one contact as multiple inputs
 Hardware or Software
54330_09
Key Debounce Techniques
 Hardware technique
 Two NAND gates
 S-R latch
 The output of the latch is
a pulse without a bounce
 Software technique
 Wait for 10 to 20 ms
after detection of a
switch closure
 If the reading is still the
same it is accepted
330_09 55
Interfacing a Matrix Keypad
 Problem statement
 Interface a 4 x 4 Hex keypad to ARM-7
 Write a program to recognize a key pressed and
encode the key in its binary value
 Display binary code on LCD
56330_09
Interfacing a Matrix Keypad
 PIC18 Simulator Keypad Matrix
57330_09
1
4
7
A
2
5
8
0
3
6
9
B
C
D
E
F
Time Multiplex Scanning
 Software
 Codes of the numbers to be displayed are stored in data
registers in sequence
 The program gets the codes from the data registers by
using the pointer (FSR0) and sends them out to the LED
segments through PORTB
 One display at a time is turned on by sending logic 1 to the
corresponding transistor connected to PORTC
 After an appropriate delay, the first display is turned off
and the next display is turned on
 Turning displays on/off is repeated in sequence
58330_09
Interfacing LCD
 Problem statement
 Interface a 2-line x 16 character LCD module
with the built-in HD44780 controller to I/O ports
of the ARM-7 microcontroller.
 Explain the control signals necessary to read
from and write to the LCD.
 Write a program to display ASCII characters.
59330_09
Interfacing LCD
 Hardware
 16 x 2-line LCD display
 Two lines with 16 characters per line
 LCD has a display Data RAM
 Stores data in 8-bit character code
 Each register in Data RAM has its own address
60330_09
330_09 61
Interfacing LCD
62
GND
ARM -7
P1-16
P1-17
P1-18
P1-19
P1-20
P1-21
P1-22
P1-23
P0-28
GND
P0-29
Interfacing LCD
 Driver HD44780
 8-bit data bus (RD7-RD0)
 Three control signals
 RS – Register Select
 R/W – Read/Write
 E – Enable
 Three power connections
 Power, ground, and variable resistor to control brightness
63330_09
Interfacing LCD
 Can be interfaced either in 8-bit mode or 4-bit mode
 In 8-bit mode, all eight data lines are connected
 In 4-bit mode, only four data lines are connected
 Two transfers per character (or instruction) are needed
 Driver has two 8-bit internal registers
 Instruction Register (IR) to write instructions to set up LCD
 Table 9-3
 Data Register (DR) to write data (ASCII characters)
64330_09
330_09 65
Pin No Symbol I/O Description
1 Vss - Ground
2 Vcc +5V
3 Vee Contrast Control
4 RS Input Command/Data Register
5 R/W Input Read/Write Register
6 E Input/Output Enable
7 DB0 Input/Output Not Used in 4-Bit Mode
8 DB1 Input/Output Not Used in 4-Bit Mode
9 DB2 Input/Output Not Used in 4-Bit Mode
10 DB3 Input/Output Not Used in 4-Bit Mode
11 DB4 Input/Output Data Bus in 4-Bit Mode
12 DB5 Input/Output Data Bus in 4-Bit Mode
13 DB6 Input/Output Data Bus in 4-Bit Mode
14 DB7 Input/Output Data Bus in 4-Bit Mode
15 Vcc - For LCD Back Light
16 Vss - For LCD Back Light
LCD Pin Description
66
LCD Commands
Interfacing LCD
 LCD Operation
 When the MPU writes an instruction to IR or data to DR,
the controller:
 Sets DB7 high indicating that the controller is busy
 Sets DB7 low after the completion of the operation
 The MPU should always check whether DB7 is low
before sending an instruction or a data byte
67330_09
Interfacing LCD
 Writing to or Reading from LCD
 The MPU:
 Asserts RS low to select IR
 Asserts RS high to select DR
 Reads from LCD by asserting the R/W signal high
 Writes into LCD by asserting the R/W signal low
 Asserts the E signal high and then low (toggles) to latch a data
byte or an instruction
68330_09
Interfacing LCD
 Timing diagram: writing to LCD
69330_09
Interfacing LCD
 Software
 To write into the LCD
 Send the initial instructions to set up the LCD
 4-bit or 8-bit mode
 Continue to check DB7 until it goes low
 Write instructions to IR to set up LCD parameters
 Number of display lines and cursor status
 Write data to display a message
70330_09
330_09 71
Pin Assignment: LCD display interface
Sr. No. Signal Description
1 Pin 16 (P1.16) Data 0
2 Pin 12 (P1.17) Data 1
3 Pin 8 (P1.18) Data 2
4 Pin 4 (P1.19) Data 3
5 Pin 48 (P1.20) Data 4
6 Pin 44 (P1.21) Data 5
7 Pin 40 (P1.22) Data 6
8 Pin 36 (P1.23) Data 7
9 Pin 13 (P0.28) RS
10 Pin 14 (P0.29) EN
11 GND WR
330_09 72
A31302928 A27262524 A23222120 A19181716 A15141312 A111098 A7654 A3210
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 F F 0 0 0 0
Prepare code for Data Display on port Lines
Prepare code for interface LCD
A31302928 A27262524 A23222120 A19181716 A15141312 A111098 A7654 A3210
0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
3 0 0 0 0 0 0 0
A31302928 A27262524 A23222120 A19181716 A15141312 A111098 A7654 A3210
0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0
A31302928 A27262524 A23222120 A19181716 A15141312 A111098 A7654 A3210
0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0
330_09 73
#include<lpc21xx.h>
void lcddata(int value);
void lcdcmd(int value);
void delay(int itime);
int main()
{
*IODIR1=0x00FF0000;
*IODIR0=0x30000000;
lcdcmd(0x38);
delay(250);
lcdcmd(0x0e);
delay(250);
lcdcmd(0x80);
delay(250);
330_09 74
lcddata('h');
delay(250);
lcddata('e');
delay(250);
lcddata('l');
delay(250);
lcddata('l');
delay(250);
lcddata('o');
delay(250);
return 0;
}
330_09 75
void lcdcmd(int value)
{
*IOCLR1=0x00FF0000;
*IOCLR0=0x10000000;
value<<=16;
*IOSET1=value;
*IOCLR0=0x20000000;
delay(250);
*IOSET0=0x20000000;
delay(250);
*IOCLR0=0x20000000;
delay(250);
}
330_09 76
void lcddata(int value)
{
*IOCLR1=0x00FF0000;
*IOSET0=0x10000000;
value<<=16;
*IOSET1=value;
*IOCLR0=0x20000000;
delay(250);
*IOSET0=0x20000000;
delay(250);
*IOCLR0=0x20000000;
delay(250);
}
void delay(int itime)
{
int i;
for(i=0;i<itime;i++);
}
77
Program to interface keypad and LCD
330_09 78
Write a Program to interface keypad and LCD.
#include <board.h>
int main(void)
{
char key;
q_keyinit(TITAN);
q_lcdinit(TITAN);
q_printf("%s rnkey;","Hello");
q_displaylcd("Hello", 5);
while(1)
{
while((key = q_keyread()) == 0);
key = key + 0x30;
q_clrscreen();
q_printf("%x rn", key);
q_displaylcd(&key, 1);
}
}
79
ASCII Code Chart
80
Interfacing Stepper Motor
P0-11
P0-12
P0-13
P0-14
330_09 81
330_09 82
STEP SEQUENCE (ONE PHASE ON SEQUNCE)
330_09 83
STEPPER MOTOR CHARACTERISTICS
•Stepper motors are constant-power devices (power = angular velocity x torque).
•As motor speed increases, torque decreases.
•The torque curve may be extended by using current limiting drivers and
increasing the driving voltage.
•Steppers exhibit more vibration than other motor types, as the discrete step tends
to snap the rotor from one position to another.
•This vibration can become very bad at some speeds and can cause the motor to
lose torque.
•The effect can be mitigated by accelerating quickly through the problem speed
range, physically damping the system, or using a micro-stepping driver.
•Motors with greater number of phases also exhibit smoother operation than those
with fewer phases.
84
Computer-controlled stepper motors are one of the most versatile
forms of positioning systems . They are typically digitally
controlled as part of an open loop system, and are simpler and
more rugged than closed loop servo systems. Industrial applications
are in high speed pick and place equipment and multi-axis machine
CNC machines often directly driving lead screws or ball screws .
In the field of lasers and optics they are frequently used in precision
positioning equipment such as linear actuators , linear stages ,
rotation stages and mirror mounts . Other uses are in packaging
machinery, and positioning of valve pilot stages for fluid control
systems. Commercially, stepper motors are used in floppy disk
drives , flatbed scanners , computer printers , plotters and many
more devices.
APPLICATIONS
85
Prepare code for interface Stepper Motor
A31302928 A27262524 A23222120 A19181716 A15141312 A111098 A7654 A3210
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 7 8 0 0
Step A31302928 A27262524 A23222120 A19181716 A15141312 A111098 A7654 A3210
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 7 8 0 0
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 2 8 0 0
2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 3 0 0 0
3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 5 0 0 0
4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 4 8 0 0
86
#include <LPC21xx.h>
#include<board.h>
int main(void)
{
unsigned long int i,j;
*IODIR0 = *IODIR0 | (0X00007800);
q_lcdinit(TITAN);
while(1)
{
q_displaylcd("clkwise directxn",16);
330_09 87
for(j=0;j<12;j++)
{
*IOSET0 = 0x00002800;
for(i=0;i<25000;i++);
*IOCLR0 = 0x00002800;
for(i=0;i<25000;i++);
*IOSET0 = 0x00003000;
for(i=0;i<25000;i++);
*IOCLR0 = 0x00003000;
for(i=0;i<25000;i++);
*IOSET0 = 0x00005000;
for(i=0;i<25000;i++);
*IOCLR0 = 0x00005000;
for(i=0;i<25000;i++);
*IOSET0 = 0x00004800;
for(i=0;i<25000;i++);
*IOCLR0 = 0x00004800;
for(i=0;i<25000;i++);
}
330_09 88
q_clrscreen();
q_displaylcd("anticlk directxn",16);
for(j=0;j<12;j++)
{
*IOSET0 = 0x00002800;
for(i=0;i<25000;i++);
*IOCLR0 = 0x00002800;
for(i=0;i<25000;i++);
*IOSET0 = 0x00004800;
for(i=0;i<25000;i++);
*IOCLR0 = 0x00004800;
for(i=0;i<25000;i++);
*IOSET0 = 0x00005000;
for(i=0;i<25000;i++);
*IOCLR0 = 0x00005000;
for(i=0;i<25000;i++);
*IOSET0 = 0x00003000;
for(i=0;i<25000;i++);
*IOCLR0 = 0x00003000;
for(i=0;i<25000;i++);
}
q_clrscreen();
}
return 0;
}
330_09 89
Interfacing GSM with ARM Board
What is GSM ?
Global System for Mobile (GSM) is a
second generation cellular standard
developed to cater voice services and
data delivery using digital modulation
330_09 91
92
Introduction:
GSM (Global System for Mobile) / GPRS (General Packet Radio Service)
TTL –Modem is SIM900 Quad-band GSM / GPRS device, works on
frequencies 850 MHZ, 900 MHZ, 1800MHZ and 1900 MHZ. It is very
compact in size and easy to use as plug in GSM Modem. The Modem is
designed with 3V3 and 5V DC TTL interfacing circuitry, which allows
User to directly interface with 5V Microcontrollers (PIC, AVR, Arduino,
8051, etc.) as well as 3V3Microcontrollers (ARM, ARM Cortex XX, etc.).
The baud rate can be configurable from 9600-115200 bps through AT
(Attention) commands. This GSM/GPRS TTL Modem has internal TCP/IP
stack to enable User to connect with internet through GPRS feature. It is
suitable for SMS as well as DATA transfer application in mobile phone to
mobile phone interface.
The modem can be interfaced with a Microcontroller using USART
(Universal Synchronous Asynchronous Receiver and Transmitter) feature
(serial communication).
330_09 93
Features:
 Quad Band GSM/GPRS : 850 / 900 / 1800 / 1900 MHz
 Built in RS232 to TTL or viceversa Logic Converter (MAX232)
Configurable Baud Rate
SMA (SubMiniature version A) connector with GSM L Type
Antenna
Built in SIM (Subscriber Identity Module) Card holder
Built in Network Status LED
Inbuilt Powerful TCP / IP (Transfer Control Protocol / Internet
Protocol) stack for internet data transfer through GPRS (General
Packet Radio Service)
 Audio Interface Connectors (Audio in and Audio out)
 Most Status and Controlling pins are available
 Normal Operation Temperature : -20 °C to +55 °C
 Input Voltage : 5V to 12V DC
 LDB9 connector (Serial Port) provided for easy interfacing
330_09 94
330_09 95
SIMCom SIM900A GSM Module:
This is actual SIM900 GSM module which is manufactured by SIMCom. Designed
for global market, SIM900 is a quad-band GSM/GPRS engine that works on
frequencies GSM 850MHz, EGSM 900MHz, DCS 1800MHz and PCS 1900MHz.
SIM900 features GPRS multislot class 10/ class 8 (optional) and supports the
GPRS coding schemes CS-1, CS-2, CS-3 and CS-4. With a tiny configuration of
24mm x 24mm x 3mm, SIM900 can meet almost all the space requirements in
User’s applications, such as M2M, smart phone, PDA and other mobile devices.
330_09 96
MAX232 IC:
The MAX232 is an integrated circuit that converts signals from an RS-232 serial
port to signals suitable for use in TTL compatible digital logic circuits, so that
devices works on TTL logic can share the data with devices connected through
Serial port (DB9 Connector).
330_09 97
Serial port / DB9 connector:
User just needs to attach RS232 cable here so that it can be connected to devices
which has Serial port / DB9 Connector.
330_09 98
Power Supply Socket:
This power supply socket which actually named as AC/DC Socket provides the
functionality to user to connect external power supply from Transformer, Battery or
Adapter through DC jack. User can provide maximum of 12V AC/DC power supply
through AC/DC socket. This is power supply designed into maximum protection
consideration so that it can even prevent reverse polarity DC power supply as well
as DC conversion from AC power Supply. It also includes LM317 Voltage Regulator
which provides an output voltage adjustable over a1.2V to 37V.
330_09 99
Power On/Off and GSM On Switch:
Power On/Off switch is type of push-on push-off DPDT switch which is used for
only make power supply on/off provided through AC/DC Socket indicated by
‘Power LED’. GSM On Switch is type of Push on DPST tactile switch which is
used for only to make GSM module ‘On’indicated by ‘Module On/Off LED’while
initiating with Network indicated by ‘Network Indication LED’.
330_09 100
SIM (Subscriber Identity Module) Card Slot:
This onboard SIM card slot provide User functionality of insert a SIM (GSM
only) card of any service provider. Process of inserting and locking SIM card into
SIM card slot is given in this manual. While inserting in and removing out SIM
card from SIM card slot, User needs to take precaution that power supply should
be OFF so that after making Power supply ON it will be easy to reinitialize with
SIM for this module.
330_09 101
Indicator LEDs:
Indicator LEDs just used to indicate status accordingly. These are three LEDs
represents Power On/Off Status, Network Status and Module On/Off Status
respectively. Power LED will keep on until the power supply is enable to this board
by using push-on push-off switch. Network Status LED will show whether inserted
SIM card successfully connected to service provider’s Network or not, in short
signal strength. Module On/Off indicator LED will show status of GSM
module’s power on/off.
330_09 102
RXD, TXD and GND pins (JP2):
These pins are used to connect devices which needs to be connected to GSM
module through USART (Universal Synchronous Asynchronous Receiver and
Transmitter) communication. Devices may be like Desktop or Laptop Computer
System, Microcontrollers, etc. RXD (Receive Data) should be connected to TXD
(Transmit Data) of other device and viceversa, whereas GND (Ground) should be
connected to other device’s GND pin to make ground common for both systems.
330_09 103
Audio Connectors:
Audio Connectors deals with Audio related operations. These pins already shown
in hardware description diagram. These are eight pins in a group of two each
denoted by SV4.
GND (0V Supply) and VCC (+5V Supply) are used to have source for external
device. MIC+ and MICused to connect Microphone (abbr. as Mic) through which
user can give audio input while calling. SP- and SP+ used to connect Speaker (can
be connected to amplifier circuit if necessary) through which User can hear audio
output. LN-L and LN-R used to connect Line in to GSM module.
330_09 104
Debugger (DBG-R and DBG-T) Connectors (J2):
These connectors are 2-wire null modem interface DBG_TXD and DBG_RXD.
These pins can be used for debugging and upgrading firmware. User generally no
need to deal with these pins.
330_09 105
Inserting SIM card into SIM card Slot/Holder:
Here is the process how to insert SIM card into SIM card slot. User just need to
unlock SIM card cover by sliding back. Then user need to open this cover and
insert SIM card according to slot. Put down cover on SIM card and then lock by
sliding forward.
330_09 106
Power On/Off and Module On/Off process:
Here is the process how User should make power supply on/off and module on/off.
First of all User need to connect external power supply by using Battery / Adapter /
Transformer. Now User needs to press Power On/Off switch (It is push-on push-off
switch, thus User need to push it to make power on and push it again to make power
supply off). Two LEDs will glow, one is Power On/Off indicator LED and another
one is Network Status LED (which glows continuous to indicate no network or
searching for network). After this User needs to press Module on switch (denoted as
PWR) for at least 2 seconds. As soon as Module On/Off LED will glow User can
release this switch, Network LED will blink to indicate signal strength.
330_09 107
Connecting GSM module with RS232 (SB9-DB9) Serial Cable:
User can connect GSM interfacing board either through Serial port or
through Serial to USB converter. Here is process to connect RS232 cable to GSM
interfacing board.
330_09 108
Connecting GSM Module with Serial to USB converter through
RXD, TXD and GND:
This module is designed in a way so that User can connect this module without
Serial cable, this module can be connected to any of Serial to USB converter
module or cable. Here we have shown demo how to connect this interfacing board
with CP2102 Serial to USB converter Module through RXD, TXD and GND.
Connect CP2102 Serial to USB converter module to PC through USB cable,
connect one end of USB cable to PC’s USB connector and connect another end of
USB to CP2102 module’s USB connector.
330_09 109
Connect three Single Berg Wires to CP2102 modules’s RXD, TXD and GND pin.
Then connect RXD wire to TXD of GSM module and TXD wire to RXD of GSM
module. Make GND common by connecting GND wire to GND pin of GSM
module.
330_09 110
Various AT commands for GSM modem
Call command:-
•For dialing number
Step 1 – ATD (enter the number)
Step 2 - ;
Step 3 - < Press Enter >
•For answering the call when the RING text appear
continuously on hyper terminal
Step 1 – ATA
Step 2 - <Press Enter>
330_09 111
•For terminating call
Step 1 – ATH
Step 2 - <Press Enter>
•For enables caller number
Step 1 – AT + CLIP = 1
Step 2 - <Press Enter>
CLIP- Calling Line Identification Presentation
330_09 112
SMS Command:-
1. To read SMS automatic to terminal
Step 1 – AT + CMGF = 1 // for text mode operator
Step 2 – AT + CNMI = 1 // automatic sensing
CMGF –Message Format
CNMI - New Message Indication to Terminal Equipment
2. To send SMS
Step 1 – AT + CMGS = Enter mobile number
Step 2 - <Press Enter>
Step 3 – Enter Text
Step 4 – Press ctrl + Z
CMGS – Send Message
3. For acknowledge SMS (if not acknowledge the SMS, SMS server
will resend SMS)
Step 1 – AT + CNMA
CNMA – Message Acknowledge
330_09 113
COM 1
DB9-
Female
data 2
GND-3
GPIO (CN/4) 2-9, 49, 50
(With CNB) 13-22, 47 GND
(with (N/4)
CN 13, 1-,
14 7,8,19,20
CN 13, 1-,
10 19,20
Keypad
(4 × 4)
LCD DISPLAY
GSM
RS – 238
Cable
Null male-male
connector
FRC
Cable
GSM antenna
Power supply
ARM
PROCESSOR
/BOARD
Interfacing GSM with ARM
Board
GSM Applications
 Mobile telephony
 GSM-R
 Telemetry System
- Fleet management
- Automatic meter reading
- Toll Collection
- Remote control and fault reporting of DG sets
 Value Added Services
330_09 115
Interfacing FIM (BIOMETRICS) with ARM / ARM Board
330_09 116
FIM:- Fingerprint Identification Module
FIM is a stand – alone Fingerprint Identification Device with many excellent
features.
It provides benefits such as high identification performance, low power
consumption and RS – 232 serial interface with the various commands for easy
integration a wide range of applications.
It is a durable and compact device with fingerprint identification module
containing NITGEN® optics – based fingerprint sensor inside.
117
 Interface: FBI-compliant scanners often have analogue output and a frame grabber is
necessary to digitize the images. This introduces an extra cost and usually requires an internal
board to be mounted in the host. In non-AFIS devices, the analogue-to-digital conversion is
performed by the scanner itself and the interface to the host is usually through a simple
Parallel Port or USB connection.
 Frames per second: This is the number of images the scanner is able to acquire and send to
the host in a second.
 Automatic finger detection: Some scanners automatically detect the presence of a finger on
the acquisition surface, without requiring the host to continually grab and process frames; this
allows the acquisition process to be automatically initiated as soon as the user’s finger touches
the sensor.
 Encryption: This is the securing of the communication channel between the scanner and the
host.
 Supported operating systems: Compatibility with more operating systems is an important
requirement.
Fingerprint Scanners and their Features
118
 Resolution: This indicates the number of dots or pixels per inch (dpi).
 Area: The size of the rectangular area sensed by a fingerprint scanner is a
fundamental parameter. The larger the area, the more ridges and valleys are
captured and the more distinctive the fingerprint becomes.
 Number of Pixels: This can be derived from the resolution and the fingerprint area.
A scanner working at r dpi over an area of height (h) X width (w) inch2 has rh X
rw pixels.
 Dynamic range (or depth): This denotes the number of bits used to encode the
intensity value of each pixel.
 Geometric accuracy: This is specified by the maximum geometric distortion
introduced by the acquisition device, and expressed as a percentage with respect to
x and y directions.
 Image quality: The image quality depends on the quality of scanner and also on
the intrinsic finger status. When the ridge prominence is very low (for manual
workers, elderly people), or fingers are too moist or too dry, most scanners produce
poor quality images.
Characteristics of Fingerprint Images
119
The general structure of fingerprint
scanner is shown in figure
330_09 120
330_09 121
COM 1
DB9-
Female
data 2
GND-3
GPIO (CN/4) 2-9, 49, 50
(With CNB) 13-22, 47 GND
(with (N/4)
CN 13, 1-,
14 7,8,19,20
CN 13, 1-,
10 19,20
Keypad
(4 × 4)
LCD DISPLAY
FIM
RS – 323
Cable
Null male-male
connector
FRC
Cable
Power supply
ARM
PROCESSOR
/BOARD
330_09 122
Communication:-
FIM has RS – serial communication port through that FIM communicates at the
same time.
These ports support 6 baud rate modes such as 9600, 14400, 19200, 38400, 57600
and 115200 bps.
User Data Area:-
FIM provides 64 bytes flash memory. Using this memory, host can save
private data for specific usage.
The caution is needed because the responsibility for reading, writing and
erasing user data area is given to the best.
Key Function:-
FIM supports 3 function key input such as Enroll _ Key, Delete _ Key, and
Identify _ Key.
Using these keys without serial communication, enrollment, deletion, all
deletion and identification operating can be executed.
123
Applications
•Print on scale device
•Ticket generation
•Bill printing
•ATM machines
124
Fingerprint sensing
 Based on the mode of acquisition, a fingerprint image is classified
as
Off line image
Live-scan image
 There are a number of live-scan sensing mechanisms that can
detect the ridges and valleys present in the fingertip
Examples are
Optical FTIR
Capacitive
Pressure-based
Ultrasound
125
Scanning and Digitizing
126
Fingerprint images
Optical scanner Capacitive scanner Piezoelectric scanner
Thermal scanner Inked impression Latent fingerprint
127
 Interface: FBI-compliant scanners often have analogue output and a frame grabber is
necessary to digitize the images. This introduces an extra cost and usually requires an internal
board to be mounted in the host. In non-AFIS devices, the analogue-to-digital conversion is
performed by the scanner itself and the interface to the host is usually through a simple
Parallel Port or USB connection.
 Frames per second: This is the number of images the scanner is able to acquire and send to
the host in a second.
 Automatic finger detection: Some scanners automatically detect the presence of a finger on
the acquisition surface, without requiring the host to continually grab and process frames; this
allows the acquisition process to be automatically initiated as soon as the user’s finger touches
the sensor.
 Encryption: This is the securing of the communication channel between the scanner and the
host.
 Supported operating systems: Compatibility with more operating systems is an important
requirement.
Fingerprint Scanners and their Features
128
The most important part of a fingerprint scanner is the sensor.
Sensors belong to one of the three families:
 Optical sensors
• Frustrated Total Internal Reflection (FTIR)
• FTIR with a sheet prism
• Optical fibers
• Electro-Optical
 Solid-state sensors
• Thermal
• Electric field
• Piezoelectric
 Ultrasound sensors
Fingerprint Sensing
129
Frustered Total Internal Reflection (FTIR):
The oldest and most used livescan technique.
The finger touches the top side of a glass
prism, but while the ridges enter in contact
with the prism surface, the valleys remain
at a certain distance. The left side of the
prism is illuminated through a diffused
light which is reflected at the valleys and
randomly scattered (absorbed) at the ridges.
The lack of reflection allows the ridges
(appear dark) to be discriminated from the
valleys (appear bright). The light rays exit
from the right side of the prism and are
focused through a lens onto a CCD or
CMOS image sensor. Because FTIR
devises sense a 3D surface, they cannot be
easily deceived by a photograph or printed
image of a fingerprint.
Fingerprint Sensing: optical FTIR
130
FTIR with a sheet prism: Using a sheet prism made of a number of “prismlets”
adjacent to each other, instead of a single large prism, allows the size of the
mechanical assembly to be reduced to some extent. However, the quality of the
acquired images is generally lower than the traditional FTIR techniques using glass
prisms.
Fingerprint Sensing: FTIR with a sheet prism
131
A significant reduction of the packaging size can be achieved by substituting prism and
lens with a fiber-optic platen. The finger is in direct contact with the upper side of
the platen; on the opposite side, a CCD or CMOS, tightly coupled with the platen,
receives the finger residual light conveyed through the glass fibers. Unlike the FTIR
devices, the CCD/CMOS is in direct contact with the platen and therefore its size
has to cover the whole sensing area. This may result in a high cost for producing
large area sensors.
Optical Fibers
132
Electro-Optical
 Electro-optical sensors contain light-emitting
polymer instead of a prism that activates the
photodiode array embedded in glass to obtain
fingerprint image.
133
Optical Sensors
134
Thermal: These sensors are made of pyro-electric material that generates current based
on temperature differentials. The fingerprint ridges, being in contact with the sensor
surface, produce a different temperature differential than the valleys, which are
away from the sensor surface. The sensors are typically maintained at a high
temperatures.
Electric Field: The sensor consists of a drive ring that generates a sinusoidal signal and
a matrix of active antennas that receives a very small amplitude signal transmitted
by the drive ring and modulated by the derma structure (subsurface of the finger
skin). The finger must be simultaneously in contact with the sensor and the drive
ring. To image a fingerprint, the analogue response of each element in the sensor
matrix is amplified and digitized.
Piezoelectric: Pressure-sensitive sensors produce an electrical signal when mechanical
stress is applied to them. The sensor surface is made of a non-conducting dielectric
material which generates a small amount of current. Since ridges and valleys are
present at different distances from the sensor surface, result in different currents.
Solid State Sensing
135
Ultrasound sensing is based on sending acoustic signals toward the fingertip and
capturing the echo signal. The echo signal is used to compute the range
image of the fingerprint and subsequently, the ridge structure itself. This
method images the subsurface of the finger skin (even through thin gloves).
Therefore, it is resilient to dirt and oil accumulations that may visually mar
the fingerprint. However, the scanner is large with mechanical parts and
quite expensive. Moreover, it takes a few seconds to acquire an image.
Ultrasound sensors
136
Fingerprint Sensing: sweep systems
 Sweep systems
 Touch systems
137
The touch method is most commonly used with sensors wherein the finger is
simply put on the scanner, without moving it.
To reduce costs, especially in silicon sensors, another sensing method has been
proposed: to sweep the finger over the sensor. Since the sweeping consists
of a vertical movement only, the chip must be as wide as a finger; on the
other hand, in principle, the height could be as low as one pixel. At the end
of the sweep, a single fingerprint image is reconstructed from the slices.
Image reconstruction from slices
138
The sweep method allows the cost of a sensor to be significantly reduced, but requires
reliable reconstruction to be performed. The main stages of the reconstruction are:
 Slice quality computation: For each slice, a single global quality measure and several local
measures are compared by using an image contrast estimator.
 Slice pair registration: For each pair of consecutive slices, the only possible transformation
is assumed to be a global translation [∆x, ∆y], where the ∆y component is dominant, but a
limited ∆x is also allowed to cope with lateral movements of the finger during sweeping.
 Relaxation: When the quality of slices is low, the registration may fail and give incorrect
translation vectors. Assuming a certain continuity of the finger speed during sweeping allows
analogous hypotheses to be generated on the continuity of the translation vectors. The
translation vectors’ continuity may be obtained through a method called relaxation which has
the nice property of smoothing the samples without affecting the correct measurements too
much.
 Mosaicking: The enhanced translation vectors produced by the relaxation stage are used to
register and superimpose the slices. Finally, each pixel of the reconstructed output image is
generated by performing a weighted sum of the intensities of the corresponding pixels in the
slices.
Image reconstruction from slices
139
Image reconstruction from slices
140
The cost of a sensor increases with increase in size of sensing area.
With smaller areas, the identification accuracy may deteriorate.
Sensing Area vs. Accuracy
141
Quality of images
Good quality
fingerprint
Dry finger Wet finger Intrinsically
bad fingerprint
142
Different scanners – ideal conditions
143
Different scanners – bad conditions
144
The Wavelet Scalar Quantization (WSQ) is an effective compression
technique (achieves compression ratio of 10 to 25).
The WSQ encoder performs the following steps:
1. The fingerprint image is decomposed into a number of spatial
frequency sub-bands (typically 64) using a Discrete Wavelet
Transform (DWT).
2. The resulting DWT coefficients are quantized into discrete values;
results in some loss of information.
3. The quantized sub-bands are concatenated into several blocks
(typically three to eight) and compressed using an adaptive Huffman
run-length encoding.
Compressing Fingerprint Images
330_09 145
Interfacing Graphics LCD (320 X 240) with ARM board

330_09 146
330_09 147
330_09 148
330_09 149
330_09 150
330_09 151
#include <LPC214x.H>
#include "GLCD.H"
#include "GLCDBMP.H"
#define RST 7
void main()
{
PINSEL0 = 0;
PINSEL1 = 0;
IODIR0 = 0x0000FFFF;
GLCD_Init (&IO0PIN, 8);
while(1)
{
Delay();
Delay();
Delay();
Delay();
330_09 152
GLCD_Draw (&IO0PIN, 8, PAN_LOGO);
Delay();
Delay();
Delay();
Delay();
GLCD_Draw(&IO0PIN, 8, BMP_IMG);
}
}
void Delay()
{
unsigned int i,j;
for(i=0;i<25;i++)
for(j=0;j<300;j++);
}

More Related Content

What's hot

Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Dhaval Kaneria
 
Microprocessor 8085 complete
Microprocessor 8085 completeMicroprocessor 8085 complete
Microprocessor 8085 completeShubham Singh
 
Interfacing of io device to 8085
Interfacing of io device to 8085Interfacing of io device to 8085
Interfacing of io device to 8085Nitin Ahire
 
8051 Addressing Modes
8051 Addressing Modes8051 Addressing Modes
8051 Addressing ModesSenthil Kumar
 
PIC Microcontrollers.ppt
PIC Microcontrollers.pptPIC Microcontrollers.ppt
PIC Microcontrollers.pptDr.YNM
 
prom,pld problems
prom,pld problemsprom,pld problems
prom,pld problemsAnish Gupta
 
DAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdfDAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdfSrikrishna Thota
 
Embedded System Tools ppt
Embedded System Tools  pptEmbedded System Tools  ppt
Embedded System Tools pptHalai Hansika
 
Microcontroller-8051.ppt
Microcontroller-8051.pptMicrocontroller-8051.ppt
Microcontroller-8051.pptDr.YNM
 
Memory organization of 8051
Memory organization of 8051Memory organization of 8051
Memory organization of 8051Muthu Manickam
 
Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor  Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor Mustapha Fatty
 
Sequential Logic Circuit
Sequential Logic CircuitSequential Logic Circuit
Sequential Logic CircuitRamasubbu .P
 
Microprocessor & microcontroller
Microprocessor & microcontroller Microprocessor & microcontroller
Microprocessor & microcontroller Nitesh Kumar
 
SHIFT REGISTERS
SHIFT REGISTERSSHIFT REGISTERS
SHIFT REGISTERSkumari36
 

What's hot (20)

Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)Serial Peripheral Interface(SPI)
Serial Peripheral Interface(SPI)
 
LCD Interacing with 8051
LCD Interacing with 8051LCD Interacing with 8051
LCD Interacing with 8051
 
Microprocessor 8085 complete
Microprocessor 8085 completeMicroprocessor 8085 complete
Microprocessor 8085 complete
 
Interfacing of io device to 8085
Interfacing of io device to 8085Interfacing of io device to 8085
Interfacing of io device to 8085
 
Instruction Set of 8051 Microcontroller
Instruction Set of 8051 MicrocontrollerInstruction Set of 8051 Microcontroller
Instruction Set of 8051 Microcontroller
 
8051 Addressing Modes
8051 Addressing Modes8051 Addressing Modes
8051 Addressing Modes
 
PIC Microcontrollers.ppt
PIC Microcontrollers.pptPIC Microcontrollers.ppt
PIC Microcontrollers.ppt
 
PIC Microcontrollers
PIC MicrocontrollersPIC Microcontrollers
PIC Microcontrollers
 
prom,pld problems
prom,pld problemsprom,pld problems
prom,pld problems
 
DAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdfDAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdf
 
Embedded System Tools ppt
Embedded System Tools  pptEmbedded System Tools  ppt
Embedded System Tools ppt
 
Microcontroller-8051.ppt
Microcontroller-8051.pptMicrocontroller-8051.ppt
Microcontroller-8051.ppt
 
Interfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 MicrocontrollerInterfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 Microcontroller
 
Memory organization of 8051
Memory organization of 8051Memory organization of 8051
Memory organization of 8051
 
Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor  Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor
 
PLDs
PLDsPLDs
PLDs
 
Sequential Logic Circuit
Sequential Logic CircuitSequential Logic Circuit
Sequential Logic Circuit
 
8255 PPI
8255 PPI8255 PPI
8255 PPI
 
Microprocessor & microcontroller
Microprocessor & microcontroller Microprocessor & microcontroller
Microprocessor & microcontroller
 
SHIFT REGISTERS
SHIFT REGISTERSSHIFT REGISTERS
SHIFT REGISTERS
 

Similar to Unit III ARM Interface and ARM Programming

Larson and toubro
Larson and toubroLarson and toubro
Larson and toubroanoopc1998
 
ABC Consolidated Financial InfoABC Companys current financial inf.docx
ABC Consolidated Financial InfoABC Companys current financial inf.docxABC Consolidated Financial InfoABC Companys current financial inf.docx
ABC Consolidated Financial InfoABC Companys current financial inf.docxransayo
 
verilog basics.ppt
verilog basics.pptverilog basics.ppt
verilog basics.ppt8885684828
 
Embedded c lab and keil c manual
Embedded  c  lab  and keil c  manualEmbedded  c  lab  and keil c  manual
Embedded c lab and keil c manualHari K
 
Lecture 3 (tool stick platform) rv01
Lecture 3 (tool stick platform) rv01Lecture 3 (tool stick platform) rv01
Lecture 3 (tool stick platform) rv01cairo university
 
Bluetooth quick start_guide / Controlanything India
Bluetooth quick start_guide / Controlanything IndiaBluetooth quick start_guide / Controlanything India
Bluetooth quick start_guide / Controlanything IndiaDcube Tech Ventures
 
시크 SICK Lector63x 2D DPM스캐너 고정식바코드스캐너 산업용바코드리더 이미지스캐너 매뉴얼
시크 SICK Lector63x 2D DPM스캐너 고정식바코드스캐너 산업용바코드리더 이미지스캐너 매뉴얼시크 SICK Lector63x 2D DPM스캐너 고정식바코드스캐너 산업용바코드리더 이미지스캐너 매뉴얼
시크 SICK Lector63x 2D DPM스캐너 고정식바코드스캐너 산업용바코드리더 이미지스캐너 매뉴얼HION IT
 
How to work with code blocks
How to work with code blocksHow to work with code blocks
How to work with code blocksTech Bikram
 
Chapter+1 +the+adventure+begins
Chapter+1 +the+adventure+beginsChapter+1 +the+adventure+begins
Chapter+1 +the+adventure+beginsnoor020202
 
Cvavr getting started with atmel studio
Cvavr getting started with atmel studioCvavr getting started with atmel studio
Cvavr getting started with atmel studioBayu Agung
 
An introduction to_programming_the_microchip_pic_in_ccs_c
An introduction to_programming_the_microchip_pic_in_ccs_cAn introduction to_programming_the_microchip_pic_in_ccs_c
An introduction to_programming_the_microchip_pic_in_ccs_cSuresh Murugesan
 
First fare 2010 lab-view creating custom dashboards
First fare 2010 lab-view creating custom dashboardsFirst fare 2010 lab-view creating custom dashboards
First fare 2010 lab-view creating custom dashboardsOregon FIRST Robotics
 
Rodrigo Almeida - Microkernel development from project to implementation
Rodrigo Almeida - Microkernel development from project to implementationRodrigo Almeida - Microkernel development from project to implementation
Rodrigo Almeida - Microkernel development from project to implementationFelipe Prado
 
Programming 8051 with C and using Keil uVision5.pptx
Programming 8051 with C and using Keil uVision5.pptxProgramming 8051 with C and using Keil uVision5.pptx
Programming 8051 with C and using Keil uVision5.pptxShyamkant Vasekar
 
Computer programming all chapters
Computer programming all chaptersComputer programming all chapters
Computer programming all chaptersIbrahim Elewah
 

Similar to Unit III ARM Interface and ARM Programming (20)

Larson and toubro
Larson and toubroLarson and toubro
Larson and toubro
 
ABC Consolidated Financial InfoABC Companys current financial inf.docx
ABC Consolidated Financial InfoABC Companys current financial inf.docxABC Consolidated Financial InfoABC Companys current financial inf.docx
ABC Consolidated Financial InfoABC Companys current financial inf.docx
 
verilog basics.ppt
verilog basics.pptverilog basics.ppt
verilog basics.ppt
 
Embedded c lab and keil c manual
Embedded  c  lab  and keil c  manualEmbedded  c  lab  and keil c  manual
Embedded c lab and keil c manual
 
Lecture 3 (tool stick platform) rv01
Lecture 3 (tool stick platform) rv01Lecture 3 (tool stick platform) rv01
Lecture 3 (tool stick platform) rv01
 
Bluetooth quick start_guide / Controlanything India
Bluetooth quick start_guide / Controlanything IndiaBluetooth quick start_guide / Controlanything India
Bluetooth quick start_guide / Controlanything India
 
시크 SICK Lector63x 2D DPM스캐너 고정식바코드스캐너 산업용바코드리더 이미지스캐너 매뉴얼
시크 SICK Lector63x 2D DPM스캐너 고정식바코드스캐너 산업용바코드리더 이미지스캐너 매뉴얼시크 SICK Lector63x 2D DPM스캐너 고정식바코드스캐너 산업용바코드리더 이미지스캐너 매뉴얼
시크 SICK Lector63x 2D DPM스캐너 고정식바코드스캐너 산업용바코드리더 이미지스캐너 매뉴얼
 
How to work with code blocks
How to work with code blocksHow to work with code blocks
How to work with code blocks
 
Chapter+1 +the+adventure+begins
Chapter+1 +the+adventure+beginsChapter+1 +the+adventure+begins
Chapter+1 +the+adventure+begins
 
Pres
PresPres
Pres
 
Pres
PresPres
Pres
 
Cvavr getting started with atmel studio
Cvavr getting started with atmel studioCvavr getting started with atmel studio
Cvavr getting started with atmel studio
 
embedded system and AVR
embedded system and AVRembedded system and AVR
embedded system and AVR
 
An introduction to_programming_the_microchip_pic_in_ccs_c
An introduction to_programming_the_microchip_pic_in_ccs_cAn introduction to_programming_the_microchip_pic_in_ccs_c
An introduction to_programming_the_microchip_pic_in_ccs_c
 
First fare 2010 lab-view creating custom dashboards
First fare 2010 lab-view creating custom dashboardsFirst fare 2010 lab-view creating custom dashboards
First fare 2010 lab-view creating custom dashboards
 
Rodrigo Almeida - Microkernel development from project to implementation
Rodrigo Almeida - Microkernel development from project to implementationRodrigo Almeida - Microkernel development from project to implementation
Rodrigo Almeida - Microkernel development from project to implementation
 
Programming 8051 with C and using Keil uVision5.pptx
Programming 8051 with C and using Keil uVision5.pptxProgramming 8051 with C and using Keil uVision5.pptx
Programming 8051 with C and using Keil uVision5.pptx
 
Resume
ResumeResume
Resume
 
W1.pptx
W1.pptxW1.pptx
W1.pptx
 
Computer programming all chapters
Computer programming all chaptersComputer programming all chapters
Computer programming all chapters
 

More from Dr. Pankaj Zope

Unit 4 Real Time Operating System
Unit 4 Real Time Operating SystemUnit 4 Real Time Operating System
Unit 4 Real Time Operating SystemDr. Pankaj Zope
 
Unit II Study of Onchip Peripherals
Unit II Study of Onchip PeripheralsUnit II Study of Onchip Peripherals
Unit II Study of Onchip PeripheralsDr. Pankaj Zope
 
Unit II Arm7 Thumb Instruction
Unit II Arm7 Thumb InstructionUnit II Arm7 Thumb Instruction
Unit II Arm7 Thumb InstructionDr. Pankaj Zope
 
Unit II arm 7 Instruction Set
Unit II arm 7 Instruction SetUnit II arm 7 Instruction Set
Unit II arm 7 Instruction SetDr. Pankaj Zope
 
Unit II Arm 7 Introduction
Unit II Arm 7 IntroductionUnit II Arm 7 Introduction
Unit II Arm 7 IntroductionDr. Pankaj Zope
 
ME Final project report setting 09-03-2015
ME Final project report setting 09-03-2015ME Final project report setting 09-03-2015
ME Final project report setting 09-03-2015Dr. Pankaj Zope
 
BE E&TC Embedded System Manual 09 03-2015
BE E&TC Embedded System Manual 09 03-2015BE E&TC Embedded System Manual 09 03-2015
BE E&TC Embedded System Manual 09 03-2015Dr. Pankaj Zope
 
Ph.d. thesis modeling and simulation of z source inverter design and its con...
Ph.d. thesis  modeling and simulation of z source inverter design and its con...Ph.d. thesis  modeling and simulation of z source inverter design and its con...
Ph.d. thesis modeling and simulation of z source inverter design and its con...Dr. Pankaj Zope
 
Unit-I Basic Embedded System Notes
Unit-I Basic Embedded System NotesUnit-I Basic Embedded System Notes
Unit-I Basic Embedded System NotesDr. Pankaj Zope
 

More from Dr. Pankaj Zope (11)

Unit 4 Real Time Operating System
Unit 4 Real Time Operating SystemUnit 4 Real Time Operating System
Unit 4 Real Time Operating System
 
Unit ii arm7 thumb
Unit ii arm7 thumbUnit ii arm7 thumb
Unit ii arm7 thumb
 
Unit II Study of Onchip Peripherals
Unit II Study of Onchip PeripheralsUnit II Study of Onchip Peripherals
Unit II Study of Onchip Peripherals
 
Unit II Arm7 Thumb Instruction
Unit II Arm7 Thumb InstructionUnit II Arm7 Thumb Instruction
Unit II Arm7 Thumb Instruction
 
Unit II arm 7 Instruction Set
Unit II arm 7 Instruction SetUnit II arm 7 Instruction Set
Unit II arm 7 Instruction Set
 
Unit II Arm 7 Introduction
Unit II Arm 7 IntroductionUnit II Arm 7 Introduction
Unit II Arm 7 Introduction
 
ME Final project report setting 09-03-2015
ME Final project report setting 09-03-2015ME Final project report setting 09-03-2015
ME Final project report setting 09-03-2015
 
BE E&TC Embedded System Manual 09 03-2015
BE E&TC Embedded System Manual 09 03-2015BE E&TC Embedded System Manual 09 03-2015
BE E&TC Embedded System Manual 09 03-2015
 
Unit I Testing
Unit I TestingUnit I Testing
Unit I Testing
 
Ph.d. thesis modeling and simulation of z source inverter design and its con...
Ph.d. thesis  modeling and simulation of z source inverter design and its con...Ph.d. thesis  modeling and simulation of z source inverter design and its con...
Ph.d. thesis modeling and simulation of z source inverter design and its con...
 
Unit-I Basic Embedded System Notes
Unit-I Basic Embedded System NotesUnit-I Basic Embedded System Notes
Unit-I Basic Embedded System Notes
 

Recently uploaded

Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgsaravananr517913
 
home automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadhome automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadaditya806802
 
The SRE Report 2024 - Great Findings for the teams
The SRE Report 2024 - Great Findings for the teamsThe SRE Report 2024 - Great Findings for the teams
The SRE Report 2024 - Great Findings for the teamsDILIPKUMARMONDAL6
 
Solving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.pptSolving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.pptJasonTagapanGulla
 
Industrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.pptIndustrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.pptNarmatha D
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleAlluxio, Inc.
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating SystemRashmi Bhat
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating SystemRashmi Bhat
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxRomil Mishra
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substationstephanwindworld
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncssuser2ae721
 

Recently uploaded (20)

Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
home automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadhome automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasad
 
The SRE Report 2024 - Great Findings for the teams
The SRE Report 2024 - Great Findings for the teamsThe SRE Report 2024 - Great Findings for the teams
The SRE Report 2024 - Great Findings for the teams
 
Solving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.pptSolving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.ppt
 
Industrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.pptIndustrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.ppt
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at Scale
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating System
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating System
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptx
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substation
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
 

Unit III ARM Interface and ARM Programming

  • 1. UNIT III Interfacing and Programming Dr. P. H. Zope SSBT’s College of Engineering and Technology Bambhori Jalgaon North Maharashtra University phzope@gmail.com 9860631040
  • 2. 1. What is Interfacing and Need of interfacing. 2. Different Interfacing techniques. 3. Basic embedded C programs for on-chip peripherals studied in system architecture. 4. Interfacing of different displays including Graphic LCD (320X240), Interfacing of input devices including touch screen etc, 5. Interfacing of output devices like thermal printer etc., 6. Embedded communication using CAN and Ethernet, 7. RF modules, GSM modem for AT command study etc. Topics
  • 3. An interface is the point of interaction with software, or computer hardware, or with peripheral devices such as a computer monitor or a keyboard. Some computer interfaces such as a touch screen can send and receive data, while others such as a mouse, microphone or joystick can only send data. Types of Interfacing 1. Hardware 2. Software What is Interfacing
  • 4. Hardware interfaces Hardware interfaces exist in computing systems between many of the components such as the various buses, storage devices, other I/O devices, etc. A hardware interface is described by the mechanical, electrical and logical signals at the interface and the protocol for sequencing them (sometimes called signaling). A standard interface, such as SCSI, decouples the design and introduction of computing hardware, such as I/O devices, from the design and introduction of other components of a computing system, thereby allowing users and manufacturers great flexibility in the implementation of computing systems. Hardware interfaces can be parallel where performance is important or serial where distance is important.
  • 5. Software interfaces A software interface may refer to a wide range of different types of interface at different "levels": an operating system may interface with pieces of hardware. Applications or programs running on the operating system may need to interact via streams, and in object oriented programs, objects within an application may need to interact via methods.
  • 6. Programming to the interface The use of interfaces allows a programming style called programming to the interface. The idea behind this is to base programming logic on the interfaces of the objects used, rather than on internal implementation details. Programming to the interface reduces dependency on implementation specifics and makes code more reusable. It gives the programmer the ability to later change the behavior of the system by simply swapping the object used with another implementing the same interface.
  • 7. Benefits 1.Low cost 2.Easy interfacing & Design 3.Easy Production 4.users choice for interfacing 5.No Maintenance 6.Easier Handling Disadvantages 1.Compact size is not possible 2.Power consumption is more as compared to SOC 3.Leakage current is more 4.Limited Devices Addressing 5.No Support of Multi/ Master configuration
  • 9. ROM image creation in an Embedded System Process of converting C , C ++ -program into ROM image and ready to use To make the application run independently with the specific board one can follow the steps given below so that the application developed on the host system, after cross compiling the same for specific image and specific board The step wise process is as follows : To write your first program, you'll need to have the following software installed on your system: • Triton IDE installed • JRE of version 1.5 or higher ( provided in Triton IDE setup) • Philips Utility ( provided in Triton IDE setup)
  • 10. Setting up the Project To create an IDE project: • Start Triton IDE. • Select the workspace in which you can create all your projects as shown in the figure below. Click OK. Triton IDE C/C++ Environment opens as shown in below figure in which you can create new project, open existing one etc.
  • 11.
  • 12. To create new project go to Project menu New C Project. You will get below figure. In the Project Name field, type keypad. o Select the Target as per the board you have. o Select the Variant from the variant list. o Select Operating System as per your requirement. o Select the Port from Port field. o Select the Baud Rate. o Select the Build options. o Select the Download options o Select the Debug type o You can also change the location of project. For that uncheck use default location. o Check Create Project Using Template.
  • 13. Click Next. • Belo s ree ill appear. “ele t De ug a d Release configurations.
  • 14. Click Finish. The project is created and opened in the IDE. You should see the following components: • The Proje ts i do , hi h o tai s a tree ie of the o po e ts of the project, including source files and properties file that your code depends on. . • The “our e Editor i do ith a file alled ke pad_ ai . ope .
  • 15.
  • 16. Adding Code to the Generated Source File Because you have left the Create Project Using Template checkbox selected in the New Project wizard, the IDE has created a skeleton class for you. You can add your keypad code to the skeleton code by replacing the line: //TODO: You can write your code at here Sample code for Keypad ------------------------------- #include <board.h> int main(void) { char key; q_keyinit(SPIRIT); q_lcdinit(SPIRIT); /* initialise the LCD*/ q_printf("%s rnkey;","Hello"); q_displaylcd("Hello", 5); while(1) { while((key = q_keyread()) == 0); key = key + 0x30; q_clrscreen(); q_printf("%x n", key); q_displaylcd(&key, 1); } } Save the change by choosing File > Save.
  • 17. Compiling the Project To compile project you need to select Debug or Release mode. • Debug mode: This creates an executable which you after downloading on the target board are able to debug. • Release mode: This creates an executable which you can download on the target board but you won’t be able to debug. • Right click on the keypad project and point to Active Build Configuration and select Release as shown in the below screen.
  • 18.
  • 19. •To build Project right click on keypad project and select Build Project. • Open the build console view to check for any errors as shown in the below figure.
  • 20. If your project has built successfully *.hex will be created. • If there are any errors in the project Build Console view will display the error messages and from Build Output view you can check the location of errors in your code. • When you build the project, the keypad.hex is generated. You can see where the new file is generated by opening the C/C++ Projects view and expanding the keypad project node as shown in the following figure. Now that you have built the project, you download executable on target board and run the program.
  • 21. Downloading the Program • I Trito IDE e e uta le a e do loaded three optio s: ISP Utility, Odyssey JTAG and FTP. • “ele t the appropriate do load optio a d right li k o the *.he file ge erated and click Download as shown below. After successful download of program you can check the application by running it on target board.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27. Debugging the Program In Triton IDE you can debug your program by three options:- Monitor, Odyssey JTAG and Ethernet. • As per your requirement select appropriate option for debugging and build the project in debug mode (same step as Release mode) • After compilation download the generated executable and you can now debug the project. • Right click on the project and select Debug As and click Debug Local C/C++ Application.
  • 28.
  • 29.
  • 30. 330_09 30 GPIO - General purpose input/output. FEATURES • Direction control of individual bits • Separate control of output set and clear • All I/O default to inputs after reset APPLICATIONS • General purpose I/O • Driving LEDs, or other indicators • Controlling off-chip devices • Sensing digital inputs
  • 31. 330_09 31 IOPIN GPIO Port Pin value register. The current state of the port pins can always be read from this register, regardless of pin direction and mode. IOSET GPIO Port Output set register. This register controls the state of output pins in conjunction with the IOCLR register. Writing ones produces highs at the corresponding port pins. Writing zeroes has no effect. IODIR GPIO Port Direction control register. This register individually controls the direction of each port pin. IOCLR GPIO Port Output clear register. This register controls the state of output pins. Writing ones produces lows at the corresponding port pins and clears the corresponding bits in the IOSET register. Writing zeroes has no effect.
  • 33. 330_09 33 A31302928 A27262524 A23222120 A19181716 A15141312 A111098 A7654 A3210 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0000 0000 0000 0 0 7 F 8 0 0 0 Prepare code for Pin Declaration A31302928 A27262524 A23222120 A19181716 A15141312 A111098 A7654 A3210 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0000 0000 0000 0 0 7 F 8 0 0 0 Prepare code for Data Display on port Lines
  • 34. 330_09 34 A31302928 A27262524 A23222120 A19181716 A15141312 A111098 A7654 A3210 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 0 0000 0000 0000 0 0 2 A 8 0 0 0 Prepare code for Data Display on port Lines =55 A31302928 A27262524 A23222120 A19181716 A15141312 A111098 A7654 A3210 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 0 0 0000 0000 0000 0 0 5 5 0 0 0 0 Prepare code for Data Display on port Lines = AA
  • 35. 330_09 35 #include<LPC21xx.h> void delay(); int main(void) { *IODIR0 = 0x7f8000; while(1) { *IOPIN0 = 0x550000; delay(); *IOPIN0 = 0x2A8000; delay(); } return 0; } void delay() { unsigned int x=500000; while( x > 0 ) x--; }
  • 36. Seven-Segment Display  Seven-segment Displays  Used to display BCD digits  0 thru 9  A group of 7 LEDs physically mounted in the shape of the number eight  Plus a decimal point  Each LED is called a segment  ‘a’ through ‘g’  Two types  Common anode  Common cathode 36330_09
  • 37. Seven-Segment Display  Common Anode  All anodes are connected together to a power supply  Cathodes are connected to data lines  Logic 0 turns on a segment  Example: To display the digit 1  All segments except b and c should be off  11111001 = F9H 37330_09 Common Anode
  • 38. Interface Seven-Segment Display  Common Cathode  All cathodes are connected together to ground  Anodes are connected to data lines  Logic 1 turns on a segment  Example: To display digit 1  All segments except b and c should be off  00000110 = 06H 38330_09
  • 40. 330_09 40 Serial Number DP G F E D C B A Code 0 0 0 1 1 1 1 1 1 3FH 1 0 0 0 0 0 1 1 0 06H 2 0 1 0 1 1 0 1 1 5BH 3 0 1 0 0 1 1 1 1 4FH 4 0 1 1 0 0 1 1 0 66H 5 0 1 1 0 1 1 0 1 6DH 6 0 1 1 1 1 1 0 1 7DH 7 0 0 0 0 0 1 1 1 07H 8 0 1 1 1 1 1 1 1 7FH 9 0 1 1 0 1 1 1 1 6FH A 0 1 1 1 0 1 1 1 77H B 0 1 1 1 1 1 0 0 7DH C 0 0 1 1 1 0 0 1 39H D 0 1 0 1 1 1 1 0 5EH E 0 1 1 1 1 0 0 1 79H F 0 1 1 1 0 0 0 1 71H Look-Up Table
  • 41. 330_09 41 #include<LPC21xx.h> void delay(); int main(void) { *IODIR1 = 0XFF0000; while(1) { *IOCLR1 = 0Xff0000; *IOSET1 = 0x3f0000; //0 delay(); *IOCLR1 = 0Xff0000; *IOSET1 = 0x060000; //1 delay(); *IOCLR1 = 0Xff0000; *IOSET1 = 0x5b0000; //2 delay(); *IOCLR1 = 0Xff0000; *IOSET1 = 0x4f0000; //3 delay(); *IOCLR1 = 0Xff0000; *IOSET1 = 0x660000; //4 delay();
  • 42. 330_09 42 *IOCLR1 = 0Xff0000; *IOSET1 = 0x6d0000; //5 delay(); *IOCLR1 = 0Xff0000; *IOSET1 = 0x7d0000; //6 delay(); *IOCLR1 = 0Xff0000; *IOSET1 = 0x070000; //7 delay(); *IOCLR1 = 0Xff0000; *IOSET1 = 0x7f0000; //8 delay(); *IOCLR1 = 0Xff0000; *IOSET1 = 0x6f0000; //9 delay(); *IOCLR1 = 0Xff0000; *IOSET1= 0x770000; //A delay();
  • 43. 330_09 43 *IOCLR1 = 0xff0000; *IOSET1 = 0x7c0000; //b delay(); *IOCLR1 = 0xff0000; *IOSET1 = 0x390000; //C delay(); *IOCLR1 = 0xff0000; *IOSET1 = 0x5e0000; //d delay(); *IOCLR1 = 0xff0000; *IOSET1 = 0x790000; //E delay(); *IOCLR1 = 0xff0000; *IOSET1 = 0x710000; //F delay(); } return 0; }
  • 44. 330_09 44 void delay() { int x=500000; while( x > 0 ) x--; }
  • 45. 330_09 45 Interface Seven-Segment Display using Interrupt signal (IRQ)
  • 47. 330_09 47 SEVEN-SEGMENT DISPLAY INTERFACE USING INTERRUPT #include<board.h> #include<LPC21xx.h> void ISRHandlerEXTINT3()__attribute__((interrupt("IRQ"))); void delay() { int x=500000; while( x > 0 ) x--; }
  • 48. 330_09 48 void ISRHandlerEXTINT3(void) { *EXTINT=0x00000008; q_printf("External Interruptn"); *IOCLR1 = 0Xff0000; *IOSET1 = 0x3f0000;//0 delay(); *IOCLR1 = 0Xff0000; *IOSET1 = 0x060000; //1 delay(); *IOCLR1 = 0Xff0000; *IOSET1 = 0x5b0000; //2 delay(); *IOCLR1 = 0Xff0000; *IOSET1 = 0x4f0000; //3 delay();
  • 49. 330_09 49 *IOCLR1 = 0Xff0000; *IOSET1 = 0x660000; //4 delay(); *IOCLR1 = 0Xff0000; *IOSET1 = 0x6d0000; //5 delay(); *IOCLR1 = 0Xff0000; *IOSET1 = 0x7d0000; //6 delay(); *IOCLR1 = 0Xff0000; *IOSET1 = 0x070000; //7 delay(); *IOCLR1 = 0Xff0000; *IOSET1 = 0x7f0000; //8 delay(); *IOCLR1 = 0Xff0000; *IOSET1 = 0x6f0000; //9 delay();
  • 50. 330_09 50 *IOCLR1 = 0Xff0000; *IOSET1 = 0x770000; //A delay(); *IOCLR1 = 0xff0000; *IOSET1 = 0x7c0000; //b delay(); *IOCLR1 = 0xff0000; *IOSET1 = 0x390000; //C delay(); *IOCLR1 = 0xff0000; *IOSET1 = 0x5e0000; //d delay(); *IOCLR1 = 0xff0000; *IOSET1 = 0x790000; //E delay(); *IOCLR1 = 0xff0000; *IOSET1 = 0x710000; //F
  • 51. 330_09 51 delay(); *IOCLR1 = 0xff0000; *IOSET1 = 0x760000;//H delay(); *IOCLR1 = 0xff0000; *IOSET1 = 0x800000;//DP delay(); q_printf("Press the switch againn"); *VICVectAddr=0 ; }
  • 52. 330_09 52 void IRQInit() { *PINSEL1=0x20000000; *EXTMODE=0x8; *VICVectAddr0=(unsigned int)ISRHandlerEXTINT3; *VICVectCntl0=0x20|0x11; *VICIntEnable=0x20000 |*VICIntEnable; } int main(void) { *IODIR0=0x7F8000; IRQInit(); q_printf("mainn "); return 0; }
  • 54. Interfacing Push-Button Keys  When a key is pressed (or released), mechanical metal contact bounces momentarily and can be read as multiple inputs  Key debounce  Eliminating reading of one contact as multiple inputs  Hardware or Software 54330_09
  • 55. Key Debounce Techniques  Hardware technique  Two NAND gates  S-R latch  The output of the latch is a pulse without a bounce  Software technique  Wait for 10 to 20 ms after detection of a switch closure  If the reading is still the same it is accepted 330_09 55
  • 56. Interfacing a Matrix Keypad  Problem statement  Interface a 4 x 4 Hex keypad to ARM-7  Write a program to recognize a key pressed and encode the key in its binary value  Display binary code on LCD 56330_09
  • 57. Interfacing a Matrix Keypad  PIC18 Simulator Keypad Matrix 57330_09 1 4 7 A 2 5 8 0 3 6 9 B C D E F
  • 58. Time Multiplex Scanning  Software  Codes of the numbers to be displayed are stored in data registers in sequence  The program gets the codes from the data registers by using the pointer (FSR0) and sends them out to the LED segments through PORTB  One display at a time is turned on by sending logic 1 to the corresponding transistor connected to PORTC  After an appropriate delay, the first display is turned off and the next display is turned on  Turning displays on/off is repeated in sequence 58330_09
  • 59. Interfacing LCD  Problem statement  Interface a 2-line x 16 character LCD module with the built-in HD44780 controller to I/O ports of the ARM-7 microcontroller.  Explain the control signals necessary to read from and write to the LCD.  Write a program to display ASCII characters. 59330_09
  • 60. Interfacing LCD  Hardware  16 x 2-line LCD display  Two lines with 16 characters per line  LCD has a display Data RAM  Stores data in 8-bit character code  Each register in Data RAM has its own address 60330_09
  • 63. Interfacing LCD  Driver HD44780  8-bit data bus (RD7-RD0)  Three control signals  RS – Register Select  R/W – Read/Write  E – Enable  Three power connections  Power, ground, and variable resistor to control brightness 63330_09
  • 64. Interfacing LCD  Can be interfaced either in 8-bit mode or 4-bit mode  In 8-bit mode, all eight data lines are connected  In 4-bit mode, only four data lines are connected  Two transfers per character (or instruction) are needed  Driver has two 8-bit internal registers  Instruction Register (IR) to write instructions to set up LCD  Table 9-3  Data Register (DR) to write data (ASCII characters) 64330_09
  • 65. 330_09 65 Pin No Symbol I/O Description 1 Vss - Ground 2 Vcc +5V 3 Vee Contrast Control 4 RS Input Command/Data Register 5 R/W Input Read/Write Register 6 E Input/Output Enable 7 DB0 Input/Output Not Used in 4-Bit Mode 8 DB1 Input/Output Not Used in 4-Bit Mode 9 DB2 Input/Output Not Used in 4-Bit Mode 10 DB3 Input/Output Not Used in 4-Bit Mode 11 DB4 Input/Output Data Bus in 4-Bit Mode 12 DB5 Input/Output Data Bus in 4-Bit Mode 13 DB6 Input/Output Data Bus in 4-Bit Mode 14 DB7 Input/Output Data Bus in 4-Bit Mode 15 Vcc - For LCD Back Light 16 Vss - For LCD Back Light LCD Pin Description
  • 67. Interfacing LCD  LCD Operation  When the MPU writes an instruction to IR or data to DR, the controller:  Sets DB7 high indicating that the controller is busy  Sets DB7 low after the completion of the operation  The MPU should always check whether DB7 is low before sending an instruction or a data byte 67330_09
  • 68. Interfacing LCD  Writing to or Reading from LCD  The MPU:  Asserts RS low to select IR  Asserts RS high to select DR  Reads from LCD by asserting the R/W signal high  Writes into LCD by asserting the R/W signal low  Asserts the E signal high and then low (toggles) to latch a data byte or an instruction 68330_09
  • 69. Interfacing LCD  Timing diagram: writing to LCD 69330_09
  • 70. Interfacing LCD  Software  To write into the LCD  Send the initial instructions to set up the LCD  4-bit or 8-bit mode  Continue to check DB7 until it goes low  Write instructions to IR to set up LCD parameters  Number of display lines and cursor status  Write data to display a message 70330_09
  • 71. 330_09 71 Pin Assignment: LCD display interface Sr. No. Signal Description 1 Pin 16 (P1.16) Data 0 2 Pin 12 (P1.17) Data 1 3 Pin 8 (P1.18) Data 2 4 Pin 4 (P1.19) Data 3 5 Pin 48 (P1.20) Data 4 6 Pin 44 (P1.21) Data 5 7 Pin 40 (P1.22) Data 6 8 Pin 36 (P1.23) Data 7 9 Pin 13 (P0.28) RS 10 Pin 14 (P0.29) EN 11 GND WR
  • 72. 330_09 72 A31302928 A27262524 A23222120 A19181716 A15141312 A111098 A7654 A3210 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 F F 0 0 0 0 Prepare code for Data Display on port Lines Prepare code for interface LCD A31302928 A27262524 A23222120 A19181716 A15141312 A111098 A7654 A3210 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 A31302928 A27262524 A23222120 A19181716 A15141312 A111098 A7654 A3210 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 A31302928 A27262524 A23222120 A19181716 A15141312 A111098 A7654 A3210 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
  • 73. 330_09 73 #include<lpc21xx.h> void lcddata(int value); void lcdcmd(int value); void delay(int itime); int main() { *IODIR1=0x00FF0000; *IODIR0=0x30000000; lcdcmd(0x38); delay(250); lcdcmd(0x0e); delay(250); lcdcmd(0x80); delay(250);
  • 75. 330_09 75 void lcdcmd(int value) { *IOCLR1=0x00FF0000; *IOCLR0=0x10000000; value<<=16; *IOSET1=value; *IOCLR0=0x20000000; delay(250); *IOSET0=0x20000000; delay(250); *IOCLR0=0x20000000; delay(250); }
  • 76. 330_09 76 void lcddata(int value) { *IOCLR1=0x00FF0000; *IOSET0=0x10000000; value<<=16; *IOSET1=value; *IOCLR0=0x20000000; delay(250); *IOSET0=0x20000000; delay(250); *IOCLR0=0x20000000; delay(250); } void delay(int itime) { int i; for(i=0;i<itime;i++); }
  • 77. 77 Program to interface keypad and LCD
  • 78. 330_09 78 Write a Program to interface keypad and LCD. #include <board.h> int main(void) { char key; q_keyinit(TITAN); q_lcdinit(TITAN); q_printf("%s rnkey;","Hello"); q_displaylcd("Hello", 5); while(1) { while((key = q_keyread()) == 0); key = key + 0x30; q_clrscreen(); q_printf("%x rn", key); q_displaylcd(&key, 1); } }
  • 82. 330_09 82 STEP SEQUENCE (ONE PHASE ON SEQUNCE)
  • 83. 330_09 83 STEPPER MOTOR CHARACTERISTICS •Stepper motors are constant-power devices (power = angular velocity x torque). •As motor speed increases, torque decreases. •The torque curve may be extended by using current limiting drivers and increasing the driving voltage. •Steppers exhibit more vibration than other motor types, as the discrete step tends to snap the rotor from one position to another. •This vibration can become very bad at some speeds and can cause the motor to lose torque. •The effect can be mitigated by accelerating quickly through the problem speed range, physically damping the system, or using a micro-stepping driver. •Motors with greater number of phases also exhibit smoother operation than those with fewer phases.
  • 84. 84 Computer-controlled stepper motors are one of the most versatile forms of positioning systems . They are typically digitally controlled as part of an open loop system, and are simpler and more rugged than closed loop servo systems. Industrial applications are in high speed pick and place equipment and multi-axis machine CNC machines often directly driving lead screws or ball screws . In the field of lasers and optics they are frequently used in precision positioning equipment such as linear actuators , linear stages , rotation stages and mirror mounts . Other uses are in packaging machinery, and positioning of valve pilot stages for fluid control systems. Commercially, stepper motors are used in floppy disk drives , flatbed scanners , computer printers , plotters and many more devices. APPLICATIONS
  • 85. 85 Prepare code for interface Stepper Motor A31302928 A27262524 A23222120 A19181716 A15141312 A111098 A7654 A3210 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 8 0 0 Step A31302928 A27262524 A23222120 A19181716 A15141312 A111098 A7654 A3210 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 8 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 8 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 0 0 0 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 8 0 0
  • 86. 86 #include <LPC21xx.h> #include<board.h> int main(void) { unsigned long int i,j; *IODIR0 = *IODIR0 | (0X00007800); q_lcdinit(TITAN); while(1) { q_displaylcd("clkwise directxn",16);
  • 87. 330_09 87 for(j=0;j<12;j++) { *IOSET0 = 0x00002800; for(i=0;i<25000;i++); *IOCLR0 = 0x00002800; for(i=0;i<25000;i++); *IOSET0 = 0x00003000; for(i=0;i<25000;i++); *IOCLR0 = 0x00003000; for(i=0;i<25000;i++); *IOSET0 = 0x00005000; for(i=0;i<25000;i++); *IOCLR0 = 0x00005000; for(i=0;i<25000;i++); *IOSET0 = 0x00004800; for(i=0;i<25000;i++); *IOCLR0 = 0x00004800; for(i=0;i<25000;i++); }
  • 88. 330_09 88 q_clrscreen(); q_displaylcd("anticlk directxn",16); for(j=0;j<12;j++) { *IOSET0 = 0x00002800; for(i=0;i<25000;i++); *IOCLR0 = 0x00002800; for(i=0;i<25000;i++); *IOSET0 = 0x00004800; for(i=0;i<25000;i++); *IOCLR0 = 0x00004800; for(i=0;i<25000;i++); *IOSET0 = 0x00005000; for(i=0;i<25000;i++); *IOCLR0 = 0x00005000; for(i=0;i<25000;i++); *IOSET0 = 0x00003000; for(i=0;i<25000;i++); *IOCLR0 = 0x00003000; for(i=0;i<25000;i++); } q_clrscreen(); } return 0; }
  • 89. 330_09 89 Interfacing GSM with ARM Board
  • 90. What is GSM ? Global System for Mobile (GSM) is a second generation cellular standard developed to cater voice services and data delivery using digital modulation
  • 92. 92 Introduction: GSM (Global System for Mobile) / GPRS (General Packet Radio Service) TTL –Modem is SIM900 Quad-band GSM / GPRS device, works on frequencies 850 MHZ, 900 MHZ, 1800MHZ and 1900 MHZ. It is very compact in size and easy to use as plug in GSM Modem. The Modem is designed with 3V3 and 5V DC TTL interfacing circuitry, which allows User to directly interface with 5V Microcontrollers (PIC, AVR, Arduino, 8051, etc.) as well as 3V3Microcontrollers (ARM, ARM Cortex XX, etc.). The baud rate can be configurable from 9600-115200 bps through AT (Attention) commands. This GSM/GPRS TTL Modem has internal TCP/IP stack to enable User to connect with internet through GPRS feature. It is suitable for SMS as well as DATA transfer application in mobile phone to mobile phone interface. The modem can be interfaced with a Microcontroller using USART (Universal Synchronous Asynchronous Receiver and Transmitter) feature (serial communication).
  • 93. 330_09 93 Features:  Quad Band GSM/GPRS : 850 / 900 / 1800 / 1900 MHz  Built in RS232 to TTL or viceversa Logic Converter (MAX232) Configurable Baud Rate SMA (SubMiniature version A) connector with GSM L Type Antenna Built in SIM (Subscriber Identity Module) Card holder Built in Network Status LED Inbuilt Powerful TCP / IP (Transfer Control Protocol / Internet Protocol) stack for internet data transfer through GPRS (General Packet Radio Service)  Audio Interface Connectors (Audio in and Audio out)  Most Status and Controlling pins are available  Normal Operation Temperature : -20 °C to +55 °C  Input Voltage : 5V to 12V DC  LDB9 connector (Serial Port) provided for easy interfacing
  • 95. 330_09 95 SIMCom SIM900A GSM Module: This is actual SIM900 GSM module which is manufactured by SIMCom. Designed for global market, SIM900 is a quad-band GSM/GPRS engine that works on frequencies GSM 850MHz, EGSM 900MHz, DCS 1800MHz and PCS 1900MHz. SIM900 features GPRS multislot class 10/ class 8 (optional) and supports the GPRS coding schemes CS-1, CS-2, CS-3 and CS-4. With a tiny configuration of 24mm x 24mm x 3mm, SIM900 can meet almost all the space requirements in User’s applications, such as M2M, smart phone, PDA and other mobile devices.
  • 96. 330_09 96 MAX232 IC: The MAX232 is an integrated circuit that converts signals from an RS-232 serial port to signals suitable for use in TTL compatible digital logic circuits, so that devices works on TTL logic can share the data with devices connected through Serial port (DB9 Connector).
  • 97. 330_09 97 Serial port / DB9 connector: User just needs to attach RS232 cable here so that it can be connected to devices which has Serial port / DB9 Connector.
  • 98. 330_09 98 Power Supply Socket: This power supply socket which actually named as AC/DC Socket provides the functionality to user to connect external power supply from Transformer, Battery or Adapter through DC jack. User can provide maximum of 12V AC/DC power supply through AC/DC socket. This is power supply designed into maximum protection consideration so that it can even prevent reverse polarity DC power supply as well as DC conversion from AC power Supply. It also includes LM317 Voltage Regulator which provides an output voltage adjustable over a1.2V to 37V.
  • 99. 330_09 99 Power On/Off and GSM On Switch: Power On/Off switch is type of push-on push-off DPDT switch which is used for only make power supply on/off provided through AC/DC Socket indicated by ‘Power LED’. GSM On Switch is type of Push on DPST tactile switch which is used for only to make GSM module ‘On’indicated by ‘Module On/Off LED’while initiating with Network indicated by ‘Network Indication LED’.
  • 100. 330_09 100 SIM (Subscriber Identity Module) Card Slot: This onboard SIM card slot provide User functionality of insert a SIM (GSM only) card of any service provider. Process of inserting and locking SIM card into SIM card slot is given in this manual. While inserting in and removing out SIM card from SIM card slot, User needs to take precaution that power supply should be OFF so that after making Power supply ON it will be easy to reinitialize with SIM for this module.
  • 101. 330_09 101 Indicator LEDs: Indicator LEDs just used to indicate status accordingly. These are three LEDs represents Power On/Off Status, Network Status and Module On/Off Status respectively. Power LED will keep on until the power supply is enable to this board by using push-on push-off switch. Network Status LED will show whether inserted SIM card successfully connected to service provider’s Network or not, in short signal strength. Module On/Off indicator LED will show status of GSM module’s power on/off.
  • 102. 330_09 102 RXD, TXD and GND pins (JP2): These pins are used to connect devices which needs to be connected to GSM module through USART (Universal Synchronous Asynchronous Receiver and Transmitter) communication. Devices may be like Desktop or Laptop Computer System, Microcontrollers, etc. RXD (Receive Data) should be connected to TXD (Transmit Data) of other device and viceversa, whereas GND (Ground) should be connected to other device’s GND pin to make ground common for both systems.
  • 103. 330_09 103 Audio Connectors: Audio Connectors deals with Audio related operations. These pins already shown in hardware description diagram. These are eight pins in a group of two each denoted by SV4. GND (0V Supply) and VCC (+5V Supply) are used to have source for external device. MIC+ and MICused to connect Microphone (abbr. as Mic) through which user can give audio input while calling. SP- and SP+ used to connect Speaker (can be connected to amplifier circuit if necessary) through which User can hear audio output. LN-L and LN-R used to connect Line in to GSM module.
  • 104. 330_09 104 Debugger (DBG-R and DBG-T) Connectors (J2): These connectors are 2-wire null modem interface DBG_TXD and DBG_RXD. These pins can be used for debugging and upgrading firmware. User generally no need to deal with these pins.
  • 105. 330_09 105 Inserting SIM card into SIM card Slot/Holder: Here is the process how to insert SIM card into SIM card slot. User just need to unlock SIM card cover by sliding back. Then user need to open this cover and insert SIM card according to slot. Put down cover on SIM card and then lock by sliding forward.
  • 106. 330_09 106 Power On/Off and Module On/Off process: Here is the process how User should make power supply on/off and module on/off. First of all User need to connect external power supply by using Battery / Adapter / Transformer. Now User needs to press Power On/Off switch (It is push-on push-off switch, thus User need to push it to make power on and push it again to make power supply off). Two LEDs will glow, one is Power On/Off indicator LED and another one is Network Status LED (which glows continuous to indicate no network or searching for network). After this User needs to press Module on switch (denoted as PWR) for at least 2 seconds. As soon as Module On/Off LED will glow User can release this switch, Network LED will blink to indicate signal strength.
  • 107. 330_09 107 Connecting GSM module with RS232 (SB9-DB9) Serial Cable: User can connect GSM interfacing board either through Serial port or through Serial to USB converter. Here is process to connect RS232 cable to GSM interfacing board.
  • 108. 330_09 108 Connecting GSM Module with Serial to USB converter through RXD, TXD and GND: This module is designed in a way so that User can connect this module without Serial cable, this module can be connected to any of Serial to USB converter module or cable. Here we have shown demo how to connect this interfacing board with CP2102 Serial to USB converter Module through RXD, TXD and GND. Connect CP2102 Serial to USB converter module to PC through USB cable, connect one end of USB cable to PC’s USB connector and connect another end of USB to CP2102 module’s USB connector.
  • 109. 330_09 109 Connect three Single Berg Wires to CP2102 modules’s RXD, TXD and GND pin. Then connect RXD wire to TXD of GSM module and TXD wire to RXD of GSM module. Make GND common by connecting GND wire to GND pin of GSM module.
  • 110. 330_09 110 Various AT commands for GSM modem Call command:- •For dialing number Step 1 – ATD (enter the number) Step 2 - ; Step 3 - < Press Enter > •For answering the call when the RING text appear continuously on hyper terminal Step 1 – ATA Step 2 - <Press Enter>
  • 111. 330_09 111 •For terminating call Step 1 – ATH Step 2 - <Press Enter> •For enables caller number Step 1 – AT + CLIP = 1 Step 2 - <Press Enter> CLIP- Calling Line Identification Presentation
  • 112. 330_09 112 SMS Command:- 1. To read SMS automatic to terminal Step 1 – AT + CMGF = 1 // for text mode operator Step 2 – AT + CNMI = 1 // automatic sensing CMGF –Message Format CNMI - New Message Indication to Terminal Equipment 2. To send SMS Step 1 – AT + CMGS = Enter mobile number Step 2 - <Press Enter> Step 3 – Enter Text Step 4 – Press ctrl + Z CMGS – Send Message 3. For acknowledge SMS (if not acknowledge the SMS, SMS server will resend SMS) Step 1 – AT + CNMA CNMA – Message Acknowledge
  • 113. 330_09 113 COM 1 DB9- Female data 2 GND-3 GPIO (CN/4) 2-9, 49, 50 (With CNB) 13-22, 47 GND (with (N/4) CN 13, 1-, 14 7,8,19,20 CN 13, 1-, 10 19,20 Keypad (4 × 4) LCD DISPLAY GSM RS – 238 Cable Null male-male connector FRC Cable GSM antenna Power supply ARM PROCESSOR /BOARD Interfacing GSM with ARM Board
  • 114. GSM Applications  Mobile telephony  GSM-R  Telemetry System - Fleet management - Automatic meter reading - Toll Collection - Remote control and fault reporting of DG sets  Value Added Services
  • 115. 330_09 115 Interfacing FIM (BIOMETRICS) with ARM / ARM Board
  • 116. 330_09 116 FIM:- Fingerprint Identification Module FIM is a stand – alone Fingerprint Identification Device with many excellent features. It provides benefits such as high identification performance, low power consumption and RS – 232 serial interface with the various commands for easy integration a wide range of applications. It is a durable and compact device with fingerprint identification module containing NITGEN® optics – based fingerprint sensor inside.
  • 117. 117  Interface: FBI-compliant scanners often have analogue output and a frame grabber is necessary to digitize the images. This introduces an extra cost and usually requires an internal board to be mounted in the host. In non-AFIS devices, the analogue-to-digital conversion is performed by the scanner itself and the interface to the host is usually through a simple Parallel Port or USB connection.  Frames per second: This is the number of images the scanner is able to acquire and send to the host in a second.  Automatic finger detection: Some scanners automatically detect the presence of a finger on the acquisition surface, without requiring the host to continually grab and process frames; this allows the acquisition process to be automatically initiated as soon as the user’s finger touches the sensor.  Encryption: This is the securing of the communication channel between the scanner and the host.  Supported operating systems: Compatibility with more operating systems is an important requirement. Fingerprint Scanners and their Features
  • 118. 118  Resolution: This indicates the number of dots or pixels per inch (dpi).  Area: The size of the rectangular area sensed by a fingerprint scanner is a fundamental parameter. The larger the area, the more ridges and valleys are captured and the more distinctive the fingerprint becomes.  Number of Pixels: This can be derived from the resolution and the fingerprint area. A scanner working at r dpi over an area of height (h) X width (w) inch2 has rh X rw pixels.  Dynamic range (or depth): This denotes the number of bits used to encode the intensity value of each pixel.  Geometric accuracy: This is specified by the maximum geometric distortion introduced by the acquisition device, and expressed as a percentage with respect to x and y directions.  Image quality: The image quality depends on the quality of scanner and also on the intrinsic finger status. When the ridge prominence is very low (for manual workers, elderly people), or fingers are too moist or too dry, most scanners produce poor quality images. Characteristics of Fingerprint Images
  • 119. 119 The general structure of fingerprint scanner is shown in figure
  • 121. 330_09 121 COM 1 DB9- Female data 2 GND-3 GPIO (CN/4) 2-9, 49, 50 (With CNB) 13-22, 47 GND (with (N/4) CN 13, 1-, 14 7,8,19,20 CN 13, 1-, 10 19,20 Keypad (4 × 4) LCD DISPLAY FIM RS – 323 Cable Null male-male connector FRC Cable Power supply ARM PROCESSOR /BOARD
  • 122. 330_09 122 Communication:- FIM has RS – serial communication port through that FIM communicates at the same time. These ports support 6 baud rate modes such as 9600, 14400, 19200, 38400, 57600 and 115200 bps. User Data Area:- FIM provides 64 bytes flash memory. Using this memory, host can save private data for specific usage. The caution is needed because the responsibility for reading, writing and erasing user data area is given to the best. Key Function:- FIM supports 3 function key input such as Enroll _ Key, Delete _ Key, and Identify _ Key. Using these keys without serial communication, enrollment, deletion, all deletion and identification operating can be executed.
  • 123. 123 Applications •Print on scale device •Ticket generation •Bill printing •ATM machines
  • 124. 124 Fingerprint sensing  Based on the mode of acquisition, a fingerprint image is classified as Off line image Live-scan image  There are a number of live-scan sensing mechanisms that can detect the ridges and valleys present in the fingertip Examples are Optical FTIR Capacitive Pressure-based Ultrasound
  • 126. 126 Fingerprint images Optical scanner Capacitive scanner Piezoelectric scanner Thermal scanner Inked impression Latent fingerprint
  • 127. 127  Interface: FBI-compliant scanners often have analogue output and a frame grabber is necessary to digitize the images. This introduces an extra cost and usually requires an internal board to be mounted in the host. In non-AFIS devices, the analogue-to-digital conversion is performed by the scanner itself and the interface to the host is usually through a simple Parallel Port or USB connection.  Frames per second: This is the number of images the scanner is able to acquire and send to the host in a second.  Automatic finger detection: Some scanners automatically detect the presence of a finger on the acquisition surface, without requiring the host to continually grab and process frames; this allows the acquisition process to be automatically initiated as soon as the user’s finger touches the sensor.  Encryption: This is the securing of the communication channel between the scanner and the host.  Supported operating systems: Compatibility with more operating systems is an important requirement. Fingerprint Scanners and their Features
  • 128. 128 The most important part of a fingerprint scanner is the sensor. Sensors belong to one of the three families:  Optical sensors • Frustrated Total Internal Reflection (FTIR) • FTIR with a sheet prism • Optical fibers • Electro-Optical  Solid-state sensors • Thermal • Electric field • Piezoelectric  Ultrasound sensors Fingerprint Sensing
  • 129. 129 Frustered Total Internal Reflection (FTIR): The oldest and most used livescan technique. The finger touches the top side of a glass prism, but while the ridges enter in contact with the prism surface, the valleys remain at a certain distance. The left side of the prism is illuminated through a diffused light which is reflected at the valleys and randomly scattered (absorbed) at the ridges. The lack of reflection allows the ridges (appear dark) to be discriminated from the valleys (appear bright). The light rays exit from the right side of the prism and are focused through a lens onto a CCD or CMOS image sensor. Because FTIR devises sense a 3D surface, they cannot be easily deceived by a photograph or printed image of a fingerprint. Fingerprint Sensing: optical FTIR
  • 130. 130 FTIR with a sheet prism: Using a sheet prism made of a number of “prismlets” adjacent to each other, instead of a single large prism, allows the size of the mechanical assembly to be reduced to some extent. However, the quality of the acquired images is generally lower than the traditional FTIR techniques using glass prisms. Fingerprint Sensing: FTIR with a sheet prism
  • 131. 131 A significant reduction of the packaging size can be achieved by substituting prism and lens with a fiber-optic platen. The finger is in direct contact with the upper side of the platen; on the opposite side, a CCD or CMOS, tightly coupled with the platen, receives the finger residual light conveyed through the glass fibers. Unlike the FTIR devices, the CCD/CMOS is in direct contact with the platen and therefore its size has to cover the whole sensing area. This may result in a high cost for producing large area sensors. Optical Fibers
  • 132. 132 Electro-Optical  Electro-optical sensors contain light-emitting polymer instead of a prism that activates the photodiode array embedded in glass to obtain fingerprint image.
  • 134. 134 Thermal: These sensors are made of pyro-electric material that generates current based on temperature differentials. The fingerprint ridges, being in contact with the sensor surface, produce a different temperature differential than the valleys, which are away from the sensor surface. The sensors are typically maintained at a high temperatures. Electric Field: The sensor consists of a drive ring that generates a sinusoidal signal and a matrix of active antennas that receives a very small amplitude signal transmitted by the drive ring and modulated by the derma structure (subsurface of the finger skin). The finger must be simultaneously in contact with the sensor and the drive ring. To image a fingerprint, the analogue response of each element in the sensor matrix is amplified and digitized. Piezoelectric: Pressure-sensitive sensors produce an electrical signal when mechanical stress is applied to them. The sensor surface is made of a non-conducting dielectric material which generates a small amount of current. Since ridges and valleys are present at different distances from the sensor surface, result in different currents. Solid State Sensing
  • 135. 135 Ultrasound sensing is based on sending acoustic signals toward the fingertip and capturing the echo signal. The echo signal is used to compute the range image of the fingerprint and subsequently, the ridge structure itself. This method images the subsurface of the finger skin (even through thin gloves). Therefore, it is resilient to dirt and oil accumulations that may visually mar the fingerprint. However, the scanner is large with mechanical parts and quite expensive. Moreover, it takes a few seconds to acquire an image. Ultrasound sensors
  • 136. 136 Fingerprint Sensing: sweep systems  Sweep systems  Touch systems
  • 137. 137 The touch method is most commonly used with sensors wherein the finger is simply put on the scanner, without moving it. To reduce costs, especially in silicon sensors, another sensing method has been proposed: to sweep the finger over the sensor. Since the sweeping consists of a vertical movement only, the chip must be as wide as a finger; on the other hand, in principle, the height could be as low as one pixel. At the end of the sweep, a single fingerprint image is reconstructed from the slices. Image reconstruction from slices
  • 138. 138 The sweep method allows the cost of a sensor to be significantly reduced, but requires reliable reconstruction to be performed. The main stages of the reconstruction are:  Slice quality computation: For each slice, a single global quality measure and several local measures are compared by using an image contrast estimator.  Slice pair registration: For each pair of consecutive slices, the only possible transformation is assumed to be a global translation [∆x, ∆y], where the ∆y component is dominant, but a limited ∆x is also allowed to cope with lateral movements of the finger during sweeping.  Relaxation: When the quality of slices is low, the registration may fail and give incorrect translation vectors. Assuming a certain continuity of the finger speed during sweeping allows analogous hypotheses to be generated on the continuity of the translation vectors. The translation vectors’ continuity may be obtained through a method called relaxation which has the nice property of smoothing the samples without affecting the correct measurements too much.  Mosaicking: The enhanced translation vectors produced by the relaxation stage are used to register and superimpose the slices. Finally, each pixel of the reconstructed output image is generated by performing a weighted sum of the intensities of the corresponding pixels in the slices. Image reconstruction from slices
  • 140. 140 The cost of a sensor increases with increase in size of sensing area. With smaller areas, the identification accuracy may deteriorate. Sensing Area vs. Accuracy
  • 141. 141 Quality of images Good quality fingerprint Dry finger Wet finger Intrinsically bad fingerprint
  • 142. 142 Different scanners – ideal conditions
  • 143. 143 Different scanners – bad conditions
  • 144. 144 The Wavelet Scalar Quantization (WSQ) is an effective compression technique (achieves compression ratio of 10 to 25). The WSQ encoder performs the following steps: 1. The fingerprint image is decomposed into a number of spatial frequency sub-bands (typically 64) using a Discrete Wavelet Transform (DWT). 2. The resulting DWT coefficients are quantized into discrete values; results in some loss of information. 3. The quantized sub-bands are concatenated into several blocks (typically three to eight) and compressed using an adaptive Huffman run-length encoding. Compressing Fingerprint Images
  • 145. 330_09 145 Interfacing Graphics LCD (320 X 240) with ARM board 
  • 151. 330_09 151 #include <LPC214x.H> #include "GLCD.H" #include "GLCDBMP.H" #define RST 7 void main() { PINSEL0 = 0; PINSEL1 = 0; IODIR0 = 0x0000FFFF; GLCD_Init (&IO0PIN, 8); while(1) { Delay(); Delay(); Delay(); Delay();
  • 152. 330_09 152 GLCD_Draw (&IO0PIN, 8, PAN_LOGO); Delay(); Delay(); Delay(); Delay(); GLCD_Draw(&IO0PIN, 8, BMP_IMG); } } void Delay() { unsigned int i,j; for(i=0;i<25;i++) for(j=0;j<300;j++); }