Академический Документы
Профессиональный Документы
Культура Документы
1. INTRODUCTION
INTRODUCTION
What is Embedded System Characteristics
Application Specific
Tightly Constrained Reactive Real Time
Memory
An Embedded System needs memory for two purposes to store its program, and to store its data. The software is usually programmed into the Read-Only Memory (ROM) or Electrically Erasable Programmable ROM (EPROM) and therefore fixed according to the specific task. Additional Additional requirement in an Embedded System depend on the equipment it is controlling. EMBEDDED SOFTWARE Most of the Embedded Software is written in C mainly to have transportation abilities and good hardware control. Though understanding of assembly language is also needed because it is vital when debugging, writing interrupt handlers, calculating real time events, and considering reentrancy.
AREAS OF APPLICATION
Consumer Washing machines Exercise equipment Remote controls Clock and watches Games and toys Audio/Video Communication Telephone answering m/c Telephone System Cellular phones ATM machines Automotive Automotive braking Noise cancellation Theft deterrent devices Electronic ignition Function Performed by the Microcomputer Control the water and spin cycles Measures speed, distance, calories, workloads. Accept key touches and sends IR pulses to system Maintains the time, alarm, and display Joystick input, video output Interacts with the operator
Plays outgoing messages, saves messages Interactive switching and information retrieval Key pad inputs, sound I/O, communication to station Security and banking convenience Optimizes stopping on slippery surfaces. Improves sound quality by removing background noise Alarm system, Keyless entry Controls sparks and fuel injection contd
Detects breathing Measures heart Functions. Measures kidney functions. Administers proper delivery Controls doses of radiation, drugs or heat Helps the heart beat regularly
3. Design Technology
Compilation/Synthesis
Libraries/IP Test/Verification
EMBEDDED HARDWARE
1) MICROCONTROLLER 2)MEMORY 3)ADDITIONAL DEVICES
EMBEDDED SOFTWARE
Port
Input Pins
Output Pins
Bidirectional Pins
Shared Functions
Port A
Timer
Port B
High-order Address
Port C
Low-order Address
Port D
Port E
ADC
PORT DESCRIPTION
Address (hex)
Size
Device
Contents
0000 to 00FF
256
RAM
1000 to 103F
64
I/O
B600 to B7FF
512
EEPROM
E000 to FFFF
8192
ROM
MEMORY CHART
SOFTWARE DEVLOPMENT
1) INITIALIZING AND ACCESSING I/O PORTS
PORTA PACTL PORTB PORTC DDRC PORTD DDRD PORTE PIOC equ equ equ equ equ equ equ equ equ $1000 $1026 $1004 $1003 $1007 $1008 $1009 $100A $1002 PA7 I/O, PA6-PA3 outputs, PA2-PA0 inputs Bit 7 (DDRA7) specifies whether PA7 is I/P or O/P PB7-PB0 are all readable outputs PC7-PC0 can be input or output Direction register for Port C PD5-PD0 can be input or output Direction register for Port D PE0-PE7 are all inputs Parallel I/O control register
ASSEMBLY DEFINITION
#define #define #define #define #define #define #define #define #define #define
PORTA PACTL PORTB PORTC DDRC PORTD DDRD PORTE PIOC TCNT
*(unsigned char volatile *)(0x1000) *(unsigned char volatile *)(0x1026) *(unsigned char volatile *)(0x1004) *(unsigned char volatile *)(0x1003) *(unsigned char volatile *)(0x1007) *(unsigned char volatile *)(0x1008) *(unsigned char volatile *)(0x1009) *(unsigned char volatile *)(0x100A) *(unsigned char volatile *)(0x1002) *(unsigned short volatile *)(0x100E)
C DEFINITIONS
MC68HC11A8 org $ E000 ;ROM main lds #$00FF ;SP=$00FF bsr init ;ritual loop ldaa PORTC ;input coma ;logical NOT lsla ;shift lsla lsla lsla staa PORTC ;output bra loop ;repeat org $FFFE fdb main ;reset vector We could implement these operations in C. The C listing will appear like given below : // HC11A8 void init(void){ DDRC=0xf0; } //PC7-PC4 are outputs, PC3-PC0 are inputs. void main(void){ unsigned char data; init(); //call ritual once. while(1){ data=PORTC; // inputs data=(~data)<<4 //complement and shift PORTC=data ; }} // outputs.
SOFTWARE DEVELOPMENT
Here comes the most important phase in EMS development process. During the software development process every emphasis is given on the quality programming. The programs written are much smaller in size and are specifically oriented to the dedicated task. All by concept of good programming are kept in mind. There are a number of theoretical aspects of software development which are central to discussion.
We allocate memory on our embedded system in a fashion similar to segmentation, since memory on an embedded system behave in a different fashion, it makes to group together in memory information that has similar properties or usage.
Abstraction Software abstraction is to define a complex problem with a set of basic abstract principles & the software system can be constructed using these building blocks thus giving better understanding of problem since we can separate what we are doing from the details of how we are getting it done. Modular approach All aspect of software maintenance is simplified by organizing the software system into modules. A program module is a self-contained software task with clear entry and exit points. Developing and Debugging tools Simulator The programs developed here edited, assembled / compiled, executed and debugged using the simulator. Since the EMS may not have tools for programming thus most of the programming for embedded system is done on a host, which is computer system with all the programming tools. A simulator is a completely host- based program that simulates the functionality & instruction set of target processor. The simulator is quite useful in the early stages of the project when there isnt as yet any actual hardware for the programmers to experiment with.
Remote debugger Remote debugger is helpful in monitoring and controlling the state of Embedded software. In-Circuit Emulators (ICES): They allow examining the state of the processor on which that program is running. Logic Analyzer: Logic Analyzer is used to find whether the electrical signal is it is attached to is currently at logic 1 or 0. Oscilloscope: It is another piece of equipment for hardware debugging and is used to examine any electrical signal, analogue signal or digital signal on the hardware.
INTERFACING One factor that makes the embedded system different from the regular computer is special I/O and external devices we attach to our embedded system. Interfacing includes both the physical connections of the hardware devices and the software routines that effect the information exchange. As engineers, we are not asked simply to design and build devices, but we are also required to evaluate our products. The performance depends on the Latency, Bandwidth and Priority. Latency is the time between when the I/O devices need service and when service is initiated. Latency includes hardware and software delays. For input device software latency is the time between new data ready and software reading the data. Since EMS are developed in RTOS environment, a real time system is one which guarantee the worst case latency. Throughput or Bandwidth is the maximum data flow (bytes per second) that can be processed by the system. Sometimes, the bandwidth is limited by the I/O device, while other times, it is limited by the computer software. Priority determines the order of service when two or more request are made simultaneously. Priority also determines if a high priority request should be allowed to suspend a low priority request that is currently being processed.
Interrupt Synchronization There are many reasons to consider interrupt synchronization. The first consideration is that a software in real time system must respond to hardware events within a prescribed time. Interrupt are important for these real time systems because they provide a mechanism to guarantee an upper bound on the software response time. Interrupts also give us a way to respond to infrequent but important events.. Interrupts provide a way to buffer the data so that the hardware and software spend less time waiting. Timing Generation and MEASUREMENTS By far, the inexpensive yet powerful embedded systems have been made possible by the capabilities of the timer system incorporated in the microcomputer chip. A clear understanding of the timer function is needed in designing of the embedded systems. The timer is responsible for periodic interrupts and polling. Even the instructions are executed at the clock cycle generated by the timer system. While developing the software for the EMS, various timing generation and measurement is solely dependent on the timer functions. The main objective during timing generation and measurement in an embedded system is to have : 1. Input capture to generate interrupts and measure period or pulse width. 2. Output compare to create periodic interrupts, generate square waves and measure frequency. Both input capture and output compare to make flexible and robust measurement systems.
THAT MEANS IF THE FUTURE TILL NOW WAS BRIGHT THEN TOMMOROW IT WILL BE BRIGHTER.