Arm Show
Arm Show
Arm Show
M.SELVAM, M.Sc.,D.IT.,M.Phil.,(M.E.)
LECTURER, DEPT. OF ELECTRONICS & COMMUNICATION SYSTEMS KARPAGAM UNIVERSITY COIMBATORE 641 021
SELVAM 4 April 2013
System : is a way of working, organizing or doing one or many tasks according to a fixed plan, program, or set of rules.
An Embedded System is one that has computer hardware with software embedded in it as one of its most important component. It is a dedicated computer based system for an application or product. It may be either an independent system or a part of a larger system.
SELVAM 4 April 2013
Software : The application software may perform concurrently the series of tasks or multiple tasks.
RTOS : The Real Time Operating System that supervises the application software and provides a mechanism to let the processor run a process as per scheduling and do the context switch between the various tasks.
SELVAM
4 April 2013
Processor
Parallel Ports
Abacus : first mechanical calculator Babylonians 500 B.C used up to 1642 (Pascal invented gear teeth) Electrical age : 1800 electric motors (Faraday) used to drive gears of mechanical computers up to 1970 Vacuum tubes (1930) replaced mechanical parts. ENIAC : first general purpose computer (1946) 17000 vacuum tubes, 500 miles of wires, 30 ton weight. Programmable by rewiring. Transistor : 1948 Bell labs semiconductor Advent. IC : 1958 Jack Kilby Texas Instruments RTL : 1960 100s 1000s of transistor in a single chip. Mini computer were placed for automation expensive & bulky the basic hardwire was logic gates, flip flops, counters, multiplexers etc.,
SELVAM
4 April 2013
system designers. The advantages are : 1. Cheaper and smaller( Number of ICs are replaced by single chip) 2. Minimum development time ( Drawings are reduced) 3. Increased flexibility ( expansions, modifications, improvements can be achieved by changing program or ROM ) 4. Reliability ( single chip replaces large number of logic devices since interconnections are reduced maintenance also minimum )
SELVAM
4 April 2013
Microprocessor Evolution : Intel 4004 : First MP 4 bit 4090 x 4 memory 45 instructions 50KIPS- requires additional circuits. Three separate buses- 72 instructions- 500 KIPS 64 KB
Intel 8080 :
Intel 8085 :
Zilog Z80 :
types.
More registers additional non mask able interrupts 2 independent flags 158 instructions
SELVAM
4 April 2013
* Intel 8086
bit
Motorola 68000 : First MP having 32 bit Regs. two 16 bit ALU
to 8MHz 16MB 8 external interrupts 6 data types : improved version of 8086 on chip PPI
Intel 80186
Intel 80286
Intel 80386
: 1986 first 32 bit MP 4GB - UNIX & multitasking applications - requires co- processor
SELVAM
4 April 2013
Intel 80486
: 32 bit RISC MP DSP extensions MMX supporting - consumer devices includes 2.5G & 3G mobile phones PDAs Digital camera IP and broadband modem etc., - 400 to 1200 MIPS
IBM Power PC 750 : 32bit RISC core 64 bit data bus 32 bit address
SELVAM
4 April 2013
MC : is a integrated chip that has the processor, memory and several other hardware units. These form the micro computer part of the embedded system. Criteria for choosing a Microcontroller :
1. It must meet the computing needs of the task. 8bit/16bit/ 32bit speed packaging power consumption amount of RAM ROM number of IO pins cost etc.,
2. Availability of software development tools such as assemblers, compilers, debuggers, simulators, emulators etc., This will reduce the product development time. 3. Wide availability and reliable sources in needed quantities both now and in the future.
10 SELVAM 4 April 2013
* Intel 8051 : 1981 8bit 128 RAM -4KB ROM two timers 1 serial port four parallel ports six interrupts etc,.
Intel 8052 : 256 RAM 8K ROM 3 timers 8 interrupts etc., Intel 8031 : ROM less version of 8051 Intel 8751 : UV EPROM version of 8051 Atmel AT89C51 : the flash ROM version of 8051 Dallas Semiconductor DS5000 : the NV RAM version of 8051 Philips P89C51 : 6clock/12clock mode extended features such as
11
4 April 2013
RISC core versatile choice for specific need - 8 to 64 pin count 62 MCs in 16Fxxx series - world number II bestseller IDE user friendly PIC 12CXXX : 12 bit instructions 512 / 1024 x 12 flash memory 25 / 41B RAM 6 IO pins one 8 bit timer 4MHz speed PIC16F84a : 4024 x 14 flash memory 68 B RAM 64 B EEPROM RAM 13 IO one 8 bit timer max. 20 MHz PIC 16F873 : 4096 X 14 flash 128 EEPROM RAM 192B RAM 22 IO- 28 pin 5 ch 10 bit ADC 2 PWM one 16 bit timer two 8bit timer USART I2C CCP etc.,
12
SELVAM
4 April 2013
13
SELVAM
4 April 2013
The software is the most important aspect, the brain of the Embedded Systems. It may be classified as follows,
* Software design for scheduling multiple tasks and devices using an RTOS
14
SELVAM
4 April 2013
Extremely useful for configuring physical devices like ports, display interface, ADC, DAC, device driver codes etc.,
Provides optimal coding solution Time consuming but suitable for simple and small scale system
15
SELVAM
4 April 2013
The detailed operation of the target processor is mostly hidden Permits code portability between different devices Reduces software development time C , C++ or JAVA are preferred languages Most of the time C is the preferred language because : C is not designed for any one particular area of application is a general purpose programming language provides code efficiency elements of structured programming - rich set of operators, making C a convenient and effective programming solution
16 SELVAM 4 April 2013
In ES exemplary physical devices are keyboard, display, disk, parallel port and network card DEVICE : The control registers, input data buffers, output data buffers and status registers form part of the device hardware DEVICE DRIVER : is a software for controlling, receiving, and sending a byte or a stream of bytes from or to a device. It controls three function : 1. Initialization by placing CW into CR 2. Calling an interrupt handler routine 3. Resetting status flag after ISR service
Device driver accesses parallel port, serial port, keyboard, mouse, disk, network, display, file and pipe at specific addresses
17
SELVAM
4 April 2013
OS : may provide device driver codes for system port addresses and for the access mechanism for the device hardware
Using OS functions, device driver coding can be made such that the underlying hardware is hidden as much as possible an API defines the hardware separately
Device Management software modules provides codes for detecting the presence of devices, for initialization and for testing the devices that are present
18
SELVAM
4 April 2013
RTOS: Embedded software is most often designed for performing multiple actions and controlling multiple devices and their ISRs. Multitasking software is therefore essential. For scheduling multiple tasks RTOS are most often used In a multitasking OS, each task has a distinct memory allocation of its own and a task has one or more functions or procedures for a specific job. A task may share the data/memory with other task The kernels important function is to schedule the transition of a task from a ready state to running state. It also controls IPCs, messaging and sharing of variables, queues and pipes
19
SELVAM
4 April 2013
Editor
: for writing C / Assembly codes using the keyboard of the PC for entering the program. Allows the entry, addition, deletion, insert etc., : translates ALP into binary file. Also creates list file which has address, source code and hex code
Assembler
: Uses the complete sets of the codes, may also include codes, functions and expressions from the library routines and creates object file
SELVAM 4 April 2013
20
Simulator
: To simulate all functions of an ES circuit including memory and peripherals : Software and hardware environment that consists of simulators with editors, compilers, assemblers, RTOS, debuggers, tracer, emulators, logic analyzers, EEPROM programmer for the integrated development of a system : summarizing the complete status of the final target system during the development time
IDE
Prototyper
21
SELVAM
4 April 2013
ARM CORE
22 SELVAM 4 April 2013
Designs the ARM range of RISC processor cores Licenses ARM core designs to semiconductor
23
SELVAM
4 April 2013
Introduction
Leading provider of 32-bit embedded RISC
24
microprocessors, 75% of market High performance Low power consumption Low system cost Solutions for Embedded real-time systems for mass storage, automotive, industrial and networking applications Secure applications - smartcards and SIMs SELVAM Open platforms running complex operating 4 April 2013 systems
25
Version 3 First ARM processor designed by ARM Limited (1990) ARM6 (macro cell) ARM60 (stand-alone processor) ARM600 (an integrated CPU with on-chip cache, MMU, write buffer) ARM610 (used in Apple Newton) 32-bit addressing, separate CPSR and SPSRs Add the undefined and abort modes to allow coprocessor emulation and virtual memory support in supervisor mode Version 3M Introduce the signed and unsigned multiply and multiply accumulate instructions that generate the full 64-bit result
26 SELVAM 4 April 2013
27
Version 4 Add the signed, unsigned half-word and signed byte load and store instructions Reserve some of SWI space for architecturally defined operation System mode is introduced Version 4T 16-bit Thumb compressed form of the instruction set is introduced Version 5T Introduced recently, a superset of version 4T adding the BLX, CLZ and BRK instructions Version 5TE SELVAM 4 April 2013 Add the signal processing instruction set extension
28
Version 6 Media processing extensions (SIMD) 2x faster MPEG4 encode/decode 2x faster audio DSP Improved cache architecture Physically addressed caches Reduction in cache flush/refill Reduced overhead in context switches Improved exception and interrupt handling Important for improving performance in real-time tasks Unaligned and mixed-endian data support Simpler data sharing, application porting and saves memory SELVAM 4 April 2013
29
SELVAM
4 April 2013
to halt in response to a debug request M: enhanced Multiplier, yield a full 64-bit result, high performance I: EmbeddedICE hardware
Von Neumann architecture
3-stage pipeline
31 SELVAM 4 April 2013
32
SELVAM
4 April 2013
The Registers
The current processor mode governs which of several banks is accessible. Each mode can access
a particular set of r0-r12 registers a particular r13 (the stack pointer, sp) and r14 (the link
register) the program counter, r15 (pc) the current program status register, cpsr
Privileged modes (except System) can also access
DIFFERENT STATES
When the processor is executing in ARM state:
All instructions are 32 bits wide All instructions must be word aligned
When the processor is executing in Thumb state:
All instructions are 16 bits wide All instructions must be halfword aligned
When the processor is executing in Jazelle state:
All instructions are 8 bits wide Processor performs a word access to read 4
instructions at once
34 SELVAM 4 April 2013
Thumb
Thumb is a 16-bit instruction set
size) Improved performance from narrow memory Subset of the functionality of the ARM instruction set
Core has additional execution state - Thumb
Conditional execution is not used Source and destination registers identical Only Low registers used Constants are of limited size Inline barrel shifter not used
4 April 2013
1 5
ADD r2,#1
35
SAMPLE CODE
#include <LPC214X.h>
36
SELVAM
4 April 2013
int main() { PINSEL0 = 0; PINSEL1 = 0; PINSEL2 = 0; IODIR0 = 0XFFFFFFFF; IODIR1 = 0XFFFFFFFF; IOCLR1 = 0XFFFFFFFF; IOCLR0 = 0XFFFFFFFF; while(1) { IOSET0 = 0XFFFFFFFF;IOSET1 = 0XFFFFFFFF; wait(50000); IOCLR0 = 0XFFFFFFFF;IOCLR1 = 0XFFFFFFFF; wait(50000); } }
37
SELVAM
4 April 2013
Thank You
A hundred times every day I remained myself that my inner and outer lives are based on the labors of other men, living and dead, and that I must exert myself in order to give in the same measure a I have received and am still receiving ALBERT EINSTEIN
38
SELVAM
4 April 2013