RTOS Program Models Used in Embedded Systems
|
|
|
- Edwin Simpson
- 9 years ago
- Views:
Transcription
1 RTOS Program Models Used in Embedded Systems József Kopják, Dr. János Kovács Kandó Kálmán Faculty of Electrical Engineering Óbuda University, Budapest, Hungary Faculty of Engineering Sciences Széchenyi István University, Győr, Hungary Abstract: The paper present and compare some real-time control program models used by programmers programming in embedded systems. The paper do not demonstrate all programming models, only the most important variations based on writer's opinion. The writer tried to show the advantages and disadvantages of each programming models discussed in article. The paper begins with traditional models like sequential model, cooperative multitasking and continues with timed cooperative model and finish with event-driven model. Keywords: cooperative multitasking; timed cooperative model keyword1; event-driven model; real-time 1 Introduction The improvement of microcontrollers using in embedded systems is very strong. Some performances of microcontrollers are on same level like in personal computers. The tasks of microcontrollers do not stop on control functions. With higher computing speed is possible to satiate user demands like to have a graphical user interface on LCD with touch panel (intelligent dish washer) or to create a connection with server (intelligent power meter). To resolve these new problems programmers needs to have new program modeling knowledge. 161
2 J. Kopják et al. RTOS Program Models Used in Embedded Systems 2 Real-Time Systems Non real-time system are usually using in office technologies. In non real-time systems incoming events followed each other in time in a same priority level are not served in a queue followed each other. In these systems are known the average of processing time of events, but we do not know the maximum time of answer of occurred event.[1] Real-time control is very important in solutions using in industrial and medical environment. Every event has own priority in real-time system. Consecutively becoming events in a same priority level are served in one after the other. The maximum of answer time of incoming event is known and defined. A critical aspect of real-time systems is how time itself is handled. The design of a real-time system must identify the timing requirements of the system and ensure that the system performance is both correct and timely. The three types of time constraints on computation are: hard, soft, firm [2]. 3 Sequential Programming Model Sequential programming models are used in industrial solutions usually. Sequential programming model is named linear programming model too. These programs are composed from four software component: initialization, reading status of the inputs, calculation or processing, refreshing values of the outputs. Figure 1 illustrates the simplified flow chart of program based on sequential programming model. Figure 1 Simplified flow chart of program based on sequential programing model The advantage of sequential programming model is the design of program is very similar to classical logical circuit design method. Simultaneously (in time) reading of all inputs and writing of all outputs exclude the hazard known in logical circuits. 162
3 The disadvantage of the model is in case of writing of complex programs the source code will contain lots of if-else control structures and therefore will be incomprehensible. Other disadvantage of the model is the poor utilization of processor. The program permanently recalculate the values of outputs, regardless of there is any change on inputs. The program based on such a model is still running, therefore uses up the entire CPU time. The reaction time of program increases with the program complexity due to constant recalculations. 4 Cooperative Multitasking In cooperative multitask tasks are working together with each other. The tasks are simple functions without input parameters and return value. The main program first initializes the peripheral devices, after the initialization the program calls the task functions in loop. Figure 2 illustrate the simplified flow chart of program based on multitask programming model. Figure 2 Simplified flow chart of program based on multitask programing model Source code written in cooperative multitask model is more transparent than the codes written in sequential method. The tasks can be easily separated, each task have different job. These tasks are in different functions, and these functions are located in different source files usually. In case the task-functions are located in different source files the program developers can be work together easily, because they don't interfere with each others work. Each developer has to modify only their own files, and don't need to change content of files created by other developers. Following piece of C-language source code represents the main loop responsible for calling the task functions. 163
4 J. Kopják et al. RTOS Program Models Used in Embedded Systems int main ( void ) vinitsystem();// Initialization of peripherals while(1) // Infinitive function calling loop vtask1(); // Calling task function named vtask1 vtask2(); // Calling task function named vtask2 vtask3(); // Calling task function named vtask3 Developing source code in cooperative multitask model required more preparatory planning time than sequential solution. The designer has to divide the whole program-task to small individual working tasks in a first phase of development. Each individual working task is communicating with each other on global variables or with another name: via mailboxes. The cooperating task functions usually read its inputs values at the beginning and writing they output values at end of each running sequence. The program scans its inputs and updates its outputs values several times during a one circle in the main loop. The task should complete them running sequence as soon as possible to got short program response time. The task should not use blocking or waiting loops. Using blocking loops would drastic incise the response time of running system. Some blocking loops examples: Waiting for releasing a push button or waiting for an UART peripheral register flag. The tasks have to remember the current state of running and return back to the calling function in case when a resource is not available. The task functions should be structured based on state machine model due to lack of a blocking waits. In state machine model the functions are using static local variables to store them next states. The backbone of each task function is a switchcase structure. The task first examines the value of the state description variable, and then jumps to the program code of the state. Following piece of C-language source code illustrates the body of task function based on state machine model. void vtask( void ) /* State description variable. Initial state is: INIT_STATE */ static enum INIT_STATE, STATE1, STATE2, STATE3 xstate = INIT_STATE; /* Selection of sub-task based on the value of state variable */ switch ( xstate ) case INIT_STATE: // Initialization tasks /*... */ xstate = STATE1; // Selection of next state break; // End of actual running case STATE1: // First task /*... */ xstate = STATE2; // Selection of next state break; // End of actual running /*... */ default: // Protection state: 164
5 // Normally the program never gets here. xstate = INIT_STATE; // Reinitialization of // task-function The advantage of cooperative multitask model is the possibility of creation quasiparallel multitask system without using preemptive multitask operation system. The disadvantage of cooperative multitask model is the pretension of good developer programming skills. The response time of program is depends on the tasks execution time. The execution time of task is not a constant value, because every task state has other execution time. The response time of program will be swinging, but is possible to calculate the fastest and slowest reaction time of system. The shortest reaction time of system is the sum of fastest running time of tasks, and the longest response is the sum of slowest running time of tasks. Another disadvantage of the cooperative multitask is that the program is not able to manage energy consumption of the processor. The processor runs the code permanently, it cannot go to energy-efficient mode (sleep or idle), this means the processor will be have maximum energy consumption. 5 Timed Cooperative Multitasking The basic cooperative multitask model do not deal with time, it means if somebody would like to create timed functions or events then the programer must to create own timer to measure the elapsed time. In timed cooperative multitask model the tasks do not run always like in classical cooperative multitask model, only when they blocking or waiting time has expired. If somebody would like to implement time cooperative multitask model, then he must create own lightweight kernel to manage the task functions. There is some known implementation of cooperative multitasking, with other name co-rutins, like FreeRTOS. FreeRTOS is an open source operating system for embedded systems written in C language[3]. The kernels, what we found, working with time, but the time is not the basic element of they kernel model, therefore we design a own lightweight cooperative multitask kernel. To demonstrate the difference between classical cooperative multitasking an the timed cooperative multitasking we made an example program. In our program are two tasks. The task are running quasi-parallel. The mission of each task is very simple: Invert one output pin. Next code example written is C language shows the implementation of these tasks. /* Task function of task #1*/ void vtask1 ( void ) mturnonled( 3 ); // Turn On LED #3 (The task starts his running) mtoogleled( 1 ); // Toogle LED #1 (The mission of the task) mturnoffled( 3 ); // Turn Off LED #3 (The task stops his running) 165
6 J. Kopják et al. RTOS Program Models Used in Embedded Systems /* Task function of task #2*/ void vtask2 ( void ) mturnonled( 0 ); // Turn On LED #0 (The task starts his running) mtoogleled( 2 ); // Toggle LED #2 (The mission of the task) mturnoffled( 0 ); // Turn Off LED #0 (The task stops his running) Our initial kernel is very simple. Next code example shows our initial, not timed, kernel. /* endless loop */ while (1) vtask1(); vtask2(); // Call Task1 function // Call Task2 function The Figure 3 illustrate the result of program running is simulator. In picture you can find 4 lines. The line with label Task #1 is in high level when the task #1 is running, and is in low level when the task is no running state. The line with label Task #2 is demonstrate the actual state of the task #2 (the conditions of high and low level is similar like in previously described line). Line with label PIN #1 and line with label PIN #2 shows the output of Task #1 and Task #2 (toggle LEDs on output pins).you can see in the figure, that the both tasks are running always in circa half of the processors time. Figure 3 Result of running program write in traditional cooperative multitask model To create a timed task calling we need a one timer global timer, who create for as an continues global time in tick. Operating system usually measure the time in tick. The tick counter is 16 or 32 bit long unsigned variable, but it can be an 8 bit counter in very small systems. We used 16 bit wide architecture to test our kernel, therefor our tick counter is 16 wide too. In this example the timer increase the value of tick counter in every one millisecond. We need an array list too, where are the task descriptors. One element of array is a structure, which represents one task. The descriptor structure has three fields, the 166
7 pointer of task function, the recall interval in tick and the time stamp of last call. Next code example shows the declaration of task descriptor structure. /* Type define: Task Entry structure */ typedef struct void (*pvtaskpointer) ( void ); TICK_TYPE tickrecallinterval; TICK_TYPE ticklasttimestamp; TASK_ENTRY; // Poniter of taskfunction // Recall intervall in tick // Time stamp of last call Next piece of code shows the list of tasks. The list must be closed with predefined closing entry where the value of function pointer is NULL. In case when the array is closed with closing entry the programer do not need to predefine the size of array list, because the parser part of the program could determinate the size of given array. static TASK_ENTRY xtasklist[] = vtask1, 3, 0, vtask2, 6, 0, NULL, 0, 0 // End of Task List (closing entry) ; The kernel first calculates the difference of current time and the time stamp of last call, and when this value is greater than or equal to tasks recall time then calls the task function. Next piece of code shows the implementation of kernel. /* Local variables */ TICK_TYPE tickcurrenttime; HTASK_ENTRY htask; UBASE_TYPE uxtaskindex = 0; /* endless loop*/ while (1) htask = &xtasklist[uxtaskindex++]; // Get handle of task from task list if( htask->pvtaskpointer!= NULL ) /* If task entry is not closing entry: */ tickcurrenttime = tickgetcurrenttime(); // Get current time in tick if ( (tickcurrenttime - htask->ticklasttimestamp) >= htask->tickrecallinterval ) /* If task time was expired, then task must be called: */ htask->pvtaskpointer(); // Call task function htask->ticklasttimestamp = tickcurrenttime; // Write time stamp of last call else uxtaskindex = 0; // Restart loop counter The Figure 4 illustrate the result of program running is simulator. In picture you can find 4 lines. The meaning of the lines are same like in Figure 3.You can see in the figure, that the both tasks are running only when they blocking time is expired. 167
8 J. Kopják et al. RTOS Program Models Used in Embedded Systems Figure 4 Result of timed cooperated multitasking 6 Event-driven Programming Model Before analyzing the event-driven programming model let's look at the concept of the event. The event is an occurrence (incidence), which may change the status an object [4].The events are signals from the outside of world in generally. Events are describing dynamic changes of inputs. Events can be external -hardware- events such as a button press or a tank becomes full or internal -software- events such as queue is full or semaphore was taken. The objects being informed about events through messages. The message in complex, distributed system can be objects too, such as a communications packet (MODBUS message or TCP / IP packet). In single-processor systems we are using a simple function calls to transmit the messages. In traditional event-driven model based programs are only passive objects. The objects recalculates they output values do the effect of change they input values. The event-driven program runs only when the input values are changing. The response time of program depend on the number of changing input values in same time, and do not depend on the controlled network complexity. The traditional event-driven system consists the following actors: Interrupt service routines (ISR) - The processors interrupt periphery calls the interrupt service routines in case of external or internal interrupt event. Hardware interrupt can be a change of the value of input pin (Interrupt On Change), incoming data on communication port or end of data transmission. Internal hardware event can be a timer overflow or end of analog-digital conversion. The interrupt service routines create event-telegrams, which are posted to event queues by ISRs. 168
9 Event-telegraphs - The event-data structures consist of a minimum of two parts: The signal of the event conveys the type of the occurrence, and event parameters convey the quantitative information about the occurrence [5]. Following piece of C-language source code illustrates example for event-telegraph structure. typedef struct EventTag unsigned int uieventid; // Event ID unsigned int uiparam; // Event parameter Event; Event queue - Event queue is a list (first in first out type list) of event telegraphs. The interrupt service routines put the event telegraphs to the end of queue and the event handler loop gets events from queue. Care should be taken when implementing the event queue because is shared resource. The event telegraphs arrive to the queue asynchronously. All operation with event queue should be made in critical section; exclude multiple writes, or read and write, in queue in same time. Event message processing loop - The event message processing loop located in the main program. The event message processing loop is an infinite loop. The loop first tries to get message for event queue. If there is a waiting message in the queue, then the loop process it based on message ID and message parameters. If there is no message waiting to be processed, then the loop puts the processor to the power saving mode. The interrupts will be wake up the processor from powersaving mode. Not only the interrupt service routines can put events to the queue, but the event processing loop too. It can be happens the actual event processing ends with generation of new event. In such cases, the generated event is added to the end of the queue of events. Figure 5 illustrates the traditional event-driven program structure. Figure 5 Traditional event-driven program structure Event-driven systems require a distinctly different way of thinking than traditional sequential programs [5]. The event-driver program do not wait for an external event, the program react to events [6]. The program must be designed in if-then conditions, for example: if the set pin of set-reset flip-flop change to true, then the 169
10 J. Kopják et al. RTOS Program Models Used in Embedded Systems output of flip-flop must be set to true; if the reset pin of set-reset flip-flop change to true, then the output of flip-flop must be set to false. The structure of event processing loop is similar to the functions developed basis on state-machine model. The core of loop is an switch-case structure. The switch tag jumps to the selected function description based on incoming event ID. Following piece of C-language sample code illustrates the body of event processing loop. while(1) /* Getting event from event queue */ if( xqueuereceive( xeventqueue, &xreceivedevent, 0 ) == pdpass ) // On successful reception: /* Jump to selected task based on message ID */ switch ( xreceivedevent.uieventid ) case BUTTON: // The button has bean sent /*... */ // the message break; // End of message processing case TIMER: // The timer has bean sent /*... */ // the message break; // End of message processing else // There is no event waiting to be processed: Idle(); // The processor goes to power saving mode The advantage of program based on traditional event-driven model is that the model includes the automatic control of processor power consumption. If the message comes when the event queue is empty the response time of program is the message processing plus the answer generation time. The disadvantage is that the program can not rank events based on their importance and is not suitable to create modular program. Conclusions All programming models presented here have their own reason for existence. For smaller tasks may be useful to use design models presented at the beginning of the article, for complex systems are better solutions described in the second half of the article. Complex models are using more processor for administrative tasks instead of real problem, thereby reducing the effectiveness of the processor. On battery powered solutions should be used solution where the models automatically manage the processors energy consumption. References [1] József Kopják Dr. János Kovács, Event-driven control program models running on embedded systems, 2011 [2] Bruce Powel Douglass, Real-Time UML: developing efficient objects for embedded systems, 1998 [3] Richard Barry, Using The FreeRTOS Real Time Kernel,
11 [4] Angster Erzsébet, Az Objektumorientált tervezés és programozás alapjai, 1997 [5] Miro Samek, Practical UML Statecharts in C/C++, Second Edition, 2009 [6] Dr. Kondorosi Károly, Dr. László Zoltán, Dr. Szirmay-Kalos László, Objektum-Orientált Szoftverfejlesztés,
Keil C51 Cross Compiler
Keil C51 Cross Compiler ANSI C Compiler Generates fast compact code for the 8051 and it s derivatives Advantages of C over Assembler Do not need to know the microcontroller instruction set Register allocation
LADDER LOGIC/ FLOWCHART PROGRAMMING DIFFERENCES AND EXAMPLES
page 1/10 This document is designed as a quick-start primer to assist industrial automation programmers who are familiar with PLCs and Relay Ladder Logic programming to better understand the corresponding
Embedded Programming in C/C++: Lesson-1: Programming Elements and Programming in C
Embedded Programming in C/C++: Lesson-1: Programming Elements and Programming in C 1 An essential part of any embedded system design Programming 2 Programming in Assembly or HLL Processor and memory-sensitive
How to design and implement firmware for embedded systems
How to design and implement firmware for embedded systems Last changes: 17.06.2010 Author: Rico Möckel The very beginning: What should I avoid when implementing firmware for embedded systems? Writing code
Exception and Interrupt Handling in ARM
Exception and Interrupt Handling in ARM Architectures and Design Methods for Embedded Systems Summer Semester 2006 Author: Ahmed Fathy Mohammed Abdelrazek Advisor: Dominik Lücke Abstract We discuss exceptions
LAB 5: Scheduling Algorithms for Embedded Systems
LAB 5: Scheduling Algorithms for Embedded Systems Say you have a robot that is exploring an area. The computer controlling the robot has a number of tasks to do: getting sensor input, driving the wheels,
The Real-Time Operating System ucos-ii
The Real-Time Operating System ucos-ii Enric Pastor Dept. Arquitectura de Computadors µc/os-ii Overview µc/os-ii Task Management Rate Monotonic Scheduling Memory Management µc/gui µc/fs Books and Resources
Chapter 6, The Operating System Machine Level
Chapter 6, The Operating System Machine Level 6.1 Virtual Memory 6.2 Virtual I/O Instructions 6.3 Virtual Instructions For Parallel Processing 6.4 Example Operating Systems 6.5 Summary Virtual Memory General
8051 MICROCONTROLLER COURSE
8051 MICROCONTROLLER COURSE Objective: 1. Familiarization with different types of Microcontroller 2. To know 8051 microcontroller in detail 3. Programming and Interfacing 8051 microcontroller Prerequisites:
Jorix kernel: real-time scheduling
Jorix kernel: real-time scheduling Joris Huizer Kwie Min Wong May 16, 2007 1 Introduction As a specialized part of the kernel, we implemented two real-time scheduling algorithms: RM (rate monotonic) and
150127-Microprocessor & Assembly Language
Chapter 3 Z80 Microprocessor Architecture The Z 80 is one of the most talented 8 bit microprocessors, and many microprocessor-based systems are designed around the Z80. The Z80 microprocessor needs an
PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 OUTCOME 3 PART 1
UNIT 22: PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 OUTCOME 3 PART 1 This work covers part of outcome 3 of the Edexcel standard module: Outcome 3 is the most demanding
Operating System Manual. Realtime Communication System for netx. Kernel API Function Reference. www.hilscher.com.
Operating System Manual Realtime Communication System for netx Kernel API Function Reference Language: English www.hilscher.com rcx - Kernel API Function Reference 2 Copyright Information Copyright 2005-2007
Linux Process Scheduling Policy
Lecture Overview Introduction to Linux process scheduling Policy versus algorithm Linux overall process scheduling objectives Timesharing Dynamic priority Favor I/O-bound process Linux scheduling algorithm
Linux Scheduler. Linux Scheduler
or or Affinity Basic Interactive es 1 / 40 Reality... or or Affinity Basic Interactive es The Linux scheduler tries to be very efficient To do that, it uses some complex data structures Some of what it
ARM Thumb Microcontrollers. Application Note. Software ISO 7816 I/O Line Implementation. Features. Introduction
Software ISO 7816 I/O Line Implementation Features ISO 7816-3 compliant (direct convention) Byte reception and transmission with parity check Retransmission on error detection Automatic reception at the
Comparing RTOS to Infinite Loop Designs
Comparing RTOS to Infinite Loop Designs If you compare the way software is developed for a small to medium sized embedded project using a Real Time Operating System (RTOS) versus a traditional infinite
Real Time Programming: Concepts
Real Time Programming: Concepts Radek Pelánek Plan at first we will study basic concepts related to real time programming then we will have a look at specific programming languages and study how they realize
RIOS: A Lightweight Task Scheduler for Embedded Systems
RIOS: A Lightweight Task Scheduler for Embedded Systems Bailey Miller*, Frank Vahid*, Tony Givargis *Dept. Computer Science & Engineering University of California, Riverside {chuang,bmiller,[email protected]
8-bit Microcontroller. Application Note. AVR134: Real-Time Clock (RTC) using the Asynchronous Timer. Features. Theory of Operation.
AVR134: Real-Time Clock (RTC) using the Asynchronous Timer Features Real-Time Clock with Very Low Power Consumption (4µA @ 3.3V) Very Low Cost Solution Adjustable Prescaler to Adjust Precision Counts Time,
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC6504 - Microprocessor & Microcontroller Year/Sem : II/IV
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC6504 - Microprocessor & Microcontroller Year/Sem : II/IV UNIT I THE 8086 MICROPROCESSOR 1. What is the purpose of segment registers
ABB i-bus EIB Logic Module LM/S 1.1
Product Manual ABB i-bus EIB Logic Module LM/S 1.1 Intelligent Installation System Contents page 1 General... 3 1.1 About this manual... 3 1.2 Product and functional overview... 3 2 Device technology...
Software based Finite State Machine (FSM) with general purpose processors
Software based Finite State Machine (FSM) with general purpose processors White paper Joseph Yiu January 2013 Overview Finite state machines (FSM) are commonly used in electronic designs. FSM can be used
Help on the Embedded Software Block
Help on the Embedded Software Block Powersim Inc. 1. Introduction The Embedded Software Block is a block that allows users to model embedded devices such as microcontrollers, DSP, or other devices. It
Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester
Leonardo Journal of Sciences ISSN 1583-0233 Issue 20, January-June 2012 p. 31-36 Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester Ganesh Sunil NHIVEKAR *, and Ravidra Ramchandra MUDHOLKAR
Chapter 2: OS Overview
Chapter 2: OS Overview CmSc 335 Operating Systems 1. Operating system objectives and functions Operating systems control and support the usage of computer systems. a. usage users of a computer system:
Programming A PLC. Standard Instructions
Programming A PLC STEP 7-Micro/WIN32 is the program software used with the S7-2 PLC to create the PLC operating program. STEP 7 consists of a number of instructions that must be arranged in a logical order
Application Note: AN00121 Using XMOS TCP/IP Library for UDP-based Networking
Application Note: AN00121 Using XMOS TCP/IP Library for UDP-based Networking This application note demonstrates the use of XMOS TCP/IP stack on an XMOS multicore micro controller to communicate on an ethernet-based
Scheduling. Scheduling. Scheduling levels. Decision to switch the running process can take place under the following circumstances:
Scheduling Scheduling Scheduling levels Long-term scheduling. Selects which jobs shall be allowed to enter the system. Only used in batch systems. Medium-term scheduling. Performs swapin-swapout operations
STORM. Simulation TOol for Real-time Multiprocessor scheduling. Designer Guide V3.3.1 September 2009
STORM Simulation TOol for Real-time Multiprocessor scheduling Designer Guide V3.3.1 September 2009 Richard Urunuela, Anne-Marie Déplanche, Yvon Trinquet This work is part of the project PHERMA supported
Design and Implementation of Home Monitoring System Using RF Technology
International Journal of Advances in Electrical and Electronics Engineering 59 Available online at www.ijaeee.com & www.sestindia.org/volume-ijaeee/ ISSN: 2319-1112 Design and Implementation of Home Monitoring
Linux Driver Devices. Why, When, Which, How?
Bertrand Mermet Sylvain Ract Linux Driver Devices. Why, When, Which, How? Since its creation in the early 1990 s Linux has been installed on millions of computers or embedded systems. These systems may
EE8205: Embedded Computer System Electrical and Computer Engineering, Ryerson University. Multitasking ARM-Applications with uvision and RTX
EE8205: Embedded Computer System Electrical and Computer Engineering, Ryerson University Multitasking ARM-Applications with uvision and RTX 1. Objectives The purpose of this lab is to lab is to introduce
SYSTEM ecos Embedded Configurable Operating System
BELONGS TO THE CYGNUS SOLUTIONS founded about 1989 initiative connected with an idea of free software ( commercial support for the free software ). Recently merged with RedHat. CYGNUS was also the original
Timer Value IRQ IACK
Real Time Clocks & s Programming with Real-time clocks Real-time clock is just another source of interrupts. Should have high priority in real-time systems Timing jitter must be accommodated or tolerated
Linux scheduler history. We will be talking about the O(1) scheduler
CPU Scheduling Linux scheduler history We will be talking about the O(1) scheduler SMP Support in 2.4 and 2.6 versions 2.4 Kernel 2.6 Kernel CPU1 CPU2 CPU3 CPU1 CPU2 CPU3 Linux Scheduling 3 scheduling
Transport Layer Protocols
Transport Layer Protocols Version. Transport layer performs two main tasks for the application layer by using the network layer. It provides end to end communication between two applications, and implements
Microcontroller Code Example Explanation and Words of Wisdom For Senior Design
Microcontroller Code Example Explanation and Words of Wisdom For Senior Design For use with the following equipment: PIC16F877 QikStart Development Board ICD2 Debugger MPLAB Environment examplemain.c and
The Secrets of RS-485 Half-duplex Communication
Communication Casper Yang, Senior Product Manager [email protected] RS-485 is a good choice for long distance serial communication since using differential transmission cancels out the vast majority of
An Introduction To Simple Scheduling (Primarily targeted at Arduino Platform)
An Introduction To Simple Scheduling (Primarily targeted at Arduino Platform) I'm late I'm late For a very important date. No time to say "Hello, Goodbye". I'm late, I'm late, I'm late. (White Rabbit in
Designing a Home Alarm using the UML. And implementing it using C++ and VxWorks
Designing a Home Alarm using the UML And implementing it using C++ and VxWorks M.W.Richardson I-Logix UK Ltd. [email protected] This article describes how a simple home alarm can be designed using the UML
EZ-ZONE RMA & EtherNet/IP Configuration & Startup Using an Allen-Bradley CompactLogix PLC EtherNet/IP Fundamentals
EtherNet/IP Fundamentals EtherNet/IP is built on the Common Industrial Protocol (CIP) at a foundational level. When communicating using CIP there are two ways to communicate to/from the Master and Slave
REAL TIME OPERATING SYSTEMS. Lesson-10:
REAL TIME OPERATING SYSTEMS Lesson-10: Real Time Operating System 1 1. Real Time Operating System Definition 2 Real Time A real time is the time which continuously increments at regular intervals after
An Introduction to the ARM 7 Architecture
An Introduction to the ARM 7 Architecture Trevor Martin CEng, MIEE Technical Director This article gives an overview of the ARM 7 architecture and a description of its major features for a developer new
Introduction to LogixPro - Lab
Programmable Logic and Automation Controllers Industrial Control Systems I Introduction to LogixPro - Lab Purpose This is a self-paced lab that will introduce the student to the LogixPro PLC Simulator
Project 11: FreeRTOS TM Real-Time Control of a Stepper Motor
Implementation on a chipkit Pro MX7 Revision: September 23, 2014 Author: Professor Richard Wall, University of Idaho, [email protected] 1300 NE Henley Court, Suite 3 Pullman, WA 99163 (509) 334 6306 Voice
EE 472 Lab 2 (Group) Scheduling, Digital I/O, Analog Input, and Pulse Generation University of Washington - Department of Electrical Engineering
EE 472 Lab 2 (Group) Scheduling, Digital I/O, Analog Input, and Pulse Generation University of Washington - Department of Electrical Engineering Introduction: In this lab, you will develop a simple kernel
CHAPTER 11 LATCHES AND FLIP-FLOPS
CHAPTER 11 LATCHES AND FLIP-FLOPS This chapter in the book includes: Objectives Study Guide 11.1 Introduction 11.2 Set-Reset Latch 11.3 Gated D Latch 11.4 Edge-Triggered D Flip-Flop 11.5 S-R Flip-Flop
Introduction. What is an Operating System?
Introduction What is an Operating System? 1 What is an Operating System? 2 Why is an Operating System Needed? 3 How Did They Develop? Historical Approach Affect of Architecture 4 Efficient Utilization
Chapter 1 Computer System Overview
Operating Systems: Internals and Design Principles Chapter 1 Computer System Overview Eighth Edition By William Stallings Operating System Exploits the hardware resources of one or more processors Provides
EECE 276 Embedded Systems
EECE 276 Embedded Systems Embedded SW Architectures Round-robin Function-queue scheduling EECE 276 Embedded Systems Embedded Software Architectures 1 Software Architecture How to do things how to arrange
Cyclic Architectures in UML
Cyclic Architectures in UML Techletter Nr. 2 What is a Techletter? Well actually nothing more than a newsletter, just that the content mainly focusses on technical items in the UML and in embedded systems
RS-485 Protocol Manual
RS-485 Protocol Manual Revision: 1.0 January 11, 2000 RS-485 Protocol Guidelines and Description Page i Table of Contents 1.0 COMMUNICATIONS BUS OVERVIEW... 1 2.0 DESIGN GUIDELINES... 1 2.1 Hardware Design
Operating Systems Concepts: Chapter 7: Scheduling Strategies
Operating Systems Concepts: Chapter 7: Scheduling Strategies Olav Beckmann Huxley 449 http://www.doc.ic.ac.uk/~ob3 Acknowledgements: There are lots. See end of Chapter 1. Home Page for the course: http://www.doc.ic.ac.uk/~ob3/teaching/operatingsystemsconcepts/
APPLICATION NOTE. Atmel AVR134: Real Time Clock (RTC) Using the Asynchronous Timer. Atmel AVR 8-bit Microcontroller. Introduction.
APPLICATION NOTE Atmel AVR134: Real Time Clock (RTC) Using the Asynchronous Timer Introduction Atmel AVR 8-bit Microcontroller This application note describes how to implement a real time counter (RTC)
Real-Time Clock. * Real-Time Computing, edited by Duncan A. Mellichamp, Van Nostrand Reinhold
REAL-TIME CLOCK Real-Time Clock The device is not a clock! It does not tell time! It has nothing to do with actual or real-time! The Real-Time Clock is no more than an interval timer connected to the computer
4310/4320 Wireless Position Monitor Burst Configuration and Diagnostics
Instruction Manual Supplement 4310/4320 Wireless Position Monitor 4310/4320 Wireless Position Monitor Burst Configuration and Diagnostics This document applies to: Fisher 4320 Device Type 1308 (hex) 4872
HANDLING SUSPEND MODE ON A USB MOUSE
APPLICATION NOTE HANDLING SUSPEND MODE ON A USB MOUSE by Microcontroller Division Application Team INTRODUCTION All USB devices must support Suspend mode. Suspend mode enables the devices to enter low-power
Serial Communications
April 2014 7 Serial Communications Objectives - To be familiar with the USART (RS-232) protocol. - To be able to transfer data from PIC-PC, PC-PIC and PIC-PIC. - To test serial communications with virtual
Computer-System Architecture
Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection General System Architecture 2.1 Computer-System Architecture 2.2 Computer-System
MICROPROCESSOR. Exclusive for IACE Students www.iace.co.in iacehyd.blogspot.in Ph: 9700077455/422 Page 1
MICROPROCESSOR A microprocessor incorporates the functions of a computer s central processing unit (CPU) on a single Integrated (IC), or at most a few integrated circuit. It is a multipurpose, programmable
Data Transfer between Serial Link and TCP/IP Link Using ez80f91 MCU
Application Note Data Transfer between Serial Link and TCP/IP Link Using ez80f91 MCU AN021904 0808 Abstract This application note describes Zilog s ez80 - based Serial-to-TCP and TCP-to-Serial communicator
Using the CoreSight ITM for debug and testing in RTX applications
Using the CoreSight ITM for debug and testing in RTX applications Outline This document outlines a basic scheme for detecting runtime errors during development of an RTX application and an approach to
MPLAB Harmony System Service Libraries Help
MPLAB Harmony System Service Libraries Help MPLAB Harmony Integrated Software Framework v1.08 All rights reserved. This section provides descriptions of the System Service libraries that are available
An Introduction to MPLAB Integrated Development Environment
An Introduction to MPLAB Integrated Development Environment 2004 Microchip Technology Incorporated An introduction to MPLAB Integrated Development Environment Slide 1 This seminar is an introduction to
White Paper. Real-time Capabilities for Linux SGI REACT Real-Time for Linux
White Paper Real-time Capabilities for Linux SGI REACT Real-Time for Linux Abstract This white paper describes the real-time capabilities provided by SGI REACT Real-Time for Linux. software. REACT enables
USING THE FREERTOS REAL TIME KERNEL
USING THE FREERTOS REAL TIME KERNEL A Practical Guide Richard Barry This page intentionally left blank 2009 Richard Barry All text, source code and diagrams are the exclusive property of Richard Barry.
Freescale Semiconductor, I
nc. Application Note 6/2002 8-Bit Software Development Kit By Jiri Ryba Introduction 8-Bit SDK Overview This application note describes the features and advantages of the 8-bit SDK (software development
Hello, and welcome to this presentation of the STM32 SDMMC controller module. It covers the main features of the controller which is used to connect
Hello, and welcome to this presentation of the STM32 SDMMC controller module. It covers the main features of the controller which is used to connect the CPU to an SD card, MMC card, or an SDIO device.
Exceptions in MIPS. know the exception mechanism in MIPS be able to write a simple exception handler for a MIPS machine
7 Objectives After completing this lab you will: know the exception mechanism in MIPS be able to write a simple exception handler for a MIPS machine Introduction Branches and jumps provide ways to change
UML for the C programming language.
Functional-based modeling White paper June 2009 UML for the C programming language. Bruce Powel Douglass, PhD, IBM Page 2 Contents 2 Executive summary 3 FunctionalC UML profile 4 Functional development
Debouncing Switches. Mechanical switches are one of the most common interfaces to a uc.
Mechanical switches are one of the most common interfaces to a uc. Switch inputs are asynchronous to the uc and are not electrically clean. Asynchronous inputs can be handled with a synchronizer (2 FF's).
2.0 System Description
2.0 System Description The wireless alarm system consists of two or more alarm units within a specified range of one another. Each alarm unit employs a radio transceiver, allowing it to communicate with
Real-Time Component Software. slide credits: H. Kopetz, P. Puschner
Real-Time Component Software slide credits: H. Kopetz, P. Puschner Overview OS services Task Structure Task Interaction Input/Output Error Detection 2 Operating System and Middleware Applica3on So5ware
Multiprocessor Scheduling and Scheduling in Linux Kernel 2.6
Multiprocessor Scheduling and Scheduling in Linux Kernel 2.6 Winter Term 2008 / 2009 Jun.-Prof. Dr. André Brinkmann [email protected] Universität Paderborn PC² Agenda Multiprocessor and
UNIT 4 Software Development Flow
DESIGN OF SYSTEM ON CHIP UNIT 4 Software Development Flow Interrupts OFFICIAL MASTER IN ADVANCED ELECTRONIC SYSTEMS. INTELLIGENT SYSTEMS Outline Introduction Interrupts in Cortex-A9 Processor Interrupt
(Refer Slide Time: 00:01:16 min)
Digital Computer Organization Prof. P. K. Biswas Department of Electronic & Electrical Communication Engineering Indian Institute of Technology, Kharagpur Lecture No. # 04 CPU Design: Tirning & Control
Performance Comparison of RTOS
Performance Comparison of RTOS Shahmil Merchant, Kalpen Dedhia Dept Of Computer Science. Columbia University Abstract: Embedded systems are becoming an integral part of commercial products today. Mobile
STANDPOINT FOR QUALITY-OF-SERVICE MEASUREMENT
STANDPOINT FOR QUALITY-OF-SERVICE MEASUREMENT 1. TIMING ACCURACY The accurate multi-point measurements require accurate synchronization of clocks of the measurement devices. If for example time stamps
Using XGATE to Implement LIN Communication on HCS12X Daniel Malik 8/16-Bit Products Division East Kilbride, Scotland
Freescale Semiconductor Application Note Document Number: AN2732 Rev. 0, 05/2004 Using XGATE to Implement LIN Communication on HCS12X By Daniel Malik 8/16-Bit Products Division East Kilbride, Scotland
Advanced User s Guide
Advanced User s Guide FAX-2840 FAX-2845 FAX-2940 Not all models are available in all countries. Version 0 UK/IRE User s Guides and where do I find them? Which Guide? What s in it? Where is it? Product
Lesson-16: Real time clock DEVICES AND COMMUNICATION BUSES FOR DEVICES NETWORK
DEVICES AND COMMUNICATION BUSES FOR DEVICES NETWORK Lesson-16: Real time clock 1 Real Time Clock (RTC) A clock, which is based on the interrupts at preset intervals. An interrupt service routine executes
PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15
UNIT 22: PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 ASSIGNMENT 3 DESIGN AND OPERATIONAL CHARACTERISTICS NAME: I agree to the assessment as contained in this assignment.
(Cat. No. 6008-SI) Product Data
(Cat. No. 6008-SI) Product Data 1 Because of the variety of uses for this product and because of the differences between solid state products and electromechanical products, those responsible for applying
Section 29. Real-Time Clock and Calendar (RTCC)
Section 29. Real-Time Clock and Calendar (RTCC) HIGHLIGHTS This section of the manual contains the following topics: 29.1 Introduction... 29-2 29.2 Status and Control Registers... 29-3 29.3 Modes of Operation...
Computer Organization and Components
Computer Organization and Components IS1500, fall 2015 Lecture 5: I/O Systems, part I Associate Professor, KTH Royal Institute of Technology Assistant Research Engineer, University of California, Berkeley
AN141 SMBUS COMMUNICATION FOR SMALL FORM FACTOR DEVICE FAMILIES. 1. Introduction. 2. Overview of the SMBus Specification. 2.1.
SMBUS COMMUNICATION FOR SMALL FORM FACTOR DEVICE FAMILIES 1. Introduction C8051F3xx and C8051F41x devices are equipped with an SMBus serial I/O peripheral that is compliant with both the System Management
Introduction to Operating Systems. Perspective of the Computer. System Software. Indiana University Chen Yu
Introduction to Operating Systems Indiana University Chen Yu Perspective of the Computer System Software A general piece of software with common functionalities that support many applications. Example:
Applying Use Cases to Microcontroller Code Development. Chris Gilbert Cypress Semiconductor
Applying Use Cases to Microcontroller Code Development Chris Gilbert Cypress Semiconductor Agenda Why Use Cases Microcontroller Project Development Use Cases Defined Use Cases Composition General Example
Kepware Technologies Optimizing KEPServerEX V5 Projects
Kepware Technologies Optimizing KEPServerEX V5 Projects September, 2010 Ref. 50.16 Kepware Technologies Table of Contents 1. Overview... 1 2. Factors that Affect Communication Speed... 1 2.1 Defining Bandwidth...
2.0 Command and Data Handling Subsystem
2.0 Command and Data Handling Subsystem The Command and Data Handling Subsystem is the brain of the whole autonomous CubeSat. The C&DH system consists of an Onboard Computer, OBC, which controls the operation
CSC 2405: Computer Systems II
CSC 2405: Computer Systems II Spring 2013 (TR 8:30-9:45 in G86) Mirela Damian http://www.csc.villanova.edu/~mdamian/csc2405/ Introductions Mirela Damian Room 167A in the Mendel Science Building [email protected]
Programing the Microprocessor in C Microprocessor System Design and Interfacing ECE 362
PURDUE UNIVERSITY Programing the Microprocessor in C Microprocessor System Design and Interfacing ECE 362 Course Staff 1/31/2012 1 Introduction This tutorial is made to help the student use C language
SYMETRIX SOLUTIONS: TECH TIP February 2014
Crestron Symetrix Dialer Example Introduction This tech-tip describes how to control a Symetrix Radius AEC and telephony interface using a Crestron Pro2-style controller. A complete Symetrix Radius configuration
C Programming. for Embedded Microcontrollers. Warwick A. Smith. Postbus 11. Elektor International Media BV. 6114ZG Susteren The Netherlands
C Programming for Embedded Microcontrollers Warwick A. Smith Elektor International Media BV Postbus 11 6114ZG Susteren The Netherlands 3 the Table of Contents Introduction 11 Target Audience 11 What is
MQX Lite Real-Time Operating System User Guide
MQX Lite Real-Time Operating System User Guide Document Number: MQXLITEUG Rev 1.1, 02/2014 2 Freescale Semiconductor, Inc. Contents Section number Title Page Chapter 1 Introduction 1.1 Overview of MQX
