Introduction to Wireless Sensor Networks Tiny OS Overview

  • Slides: 13
Download presentation
Introduction to Wireless Sensor Networks Tiny. OS Overview 10 February 2005 The University of

Introduction to Wireless Sensor Networks Tiny. OS Overview 10 February 2005 The University of Iowa. Copyright© 2005 1 A. Kruger

Organizational Class Website www. engineering. uiowa. edu/~ece 195/2005/ Class Time Monday 4: 30 -5:

Organizational Class Website www. engineering. uiowa. edu/~ece 195/2005/ Class Time Monday 4: 30 -5: 20 Room 4511 SC Thursday 12: 30 -1: 20 Room 3220 SC Please note that the room numbers are different for Mondays and Thursdays. Office Hours Monday 5: 20 -6: 20 Room 1126 SC Thursday 1: 30 -2: 30 Room 1126 SC Other By appointment Room 523 C SHL The University of Iowa. Copyright© 2005 2 A. Kruger

Think Back – Mote Subsystems The University of Iowa. Copyright© 2005 3 A. Kruger

Think Back – Mote Subsystems The University of Iowa. Copyright© 2005 3 A. Kruger

MCU Components Flash RAM Power Management I/O ALU The University of Iowa. Copyright© 2005

MCU Components Flash RAM Power Management I/O ALU The University of Iowa. Copyright© 2005 4 A. Kruger

Memory registers Flash RAM scratch stack The University of Iowa. Copyright© 2005 5 A.

Memory registers Flash RAM scratch stack The University of Iowa. Copyright© 2005 5 A. Kruger

Compile-Link Cycle • Compilation - translate high-level language to assembly language LOOP: MOV AX,

Compile-Link Cycle • Compilation - translate high-level language to assembly language LOOP: MOV AX, 0 x 02 LJMP _printf DEC AX JNZ LOOP for (i=0; i<=2 -1; i++) printf(“%dn”, i); • Assembly – translate assembler into machine language LOOP: MOV AX, 0 x 02 LJMP _printf DEC AX JNZ LOOP The University of Iowa. Copyright© 2005 00101001 01000101 LJMP _printf 11100101 10001001 … 6 A. Kruger

Linking Our code 00101001 01000101 11100101 10001001 … Image LJMP _printf Libraries 00101011 01000111

Linking Our code 00101001 01000101 11100101 10001001 … Image LJMP _printf Libraries 00101011 01000111 11100101 10101001 … Linker 00101001 01000101 11100101 10001001 … 00101011 01000111 11100101 10101001 … _printf OS services 00101011 01000111 11100101 10101001 The University of Iowa. Copyright© 2005 7 A. Kruger

Program Development Cycle Write Code (editor) Compile Assemble Link Program Mote (programmer, ISP, serial,

Program Development Cycle Write Code (editor) Compile Assemble Link Program Mote (programmer, ISP, serial, etc. ) Test Modify Code The University of Iowa. Copyright© 2005 8 A. Kruger

Programming Mote • Downloading binary image into device • Connect to programmer • Run

Programming Mote • Downloading binary image into device • Connect to programmer • Run programming software The University of Iowa. Copyright© 2005 9 A. Kruger

Tiny. OS Tutorial • Website: – http: //www. tinyos. net/tinyos 1. x/doc/tutorial/lesson 1. html

Tiny. OS Tutorial • Website: – http: //www. tinyos. net/tinyos 1. x/doc/tutorial/lesson 1. html • Concept: nes. C – OS, Libraries, and Applications are written in nes. C – C-like language – Compiler: ncc • Concept: components The University of Iowa. Copyright© 2005 10 A. Kruger

Tiny. OS Tutorial • Concept concurrency model – Executes only one program – Two

Tiny. OS Tutorial • Concept concurrency model – Executes only one program – Two threads • Tasks • Hardware event handlers • Task – Functions. Once scheduled, runs to completion. No preemption. • Hardware event handlers – Run to completion, may preempt execution of functions or other event handlers • async keyword • nes. C code are susceptible to race conditions The University of Iowa. Copyright© 2005 11 A. Kruger

Application: Blink Think of as “bind to”. The left side binds an interface to

Application: Blink Think of as “bind to”. The left side binds an interface to an configuration Blink { implementation on the right } implementation { components Main, Blink. M, Single. Timer, Leds. C; Main. Std. Control -> Blink. M. Std. Control; Main. Std. Control -> Single. Timer. Std. Control; Blink. M. Timer -> Single. Timer; Blink. M. Leds -> Leds. C; } Components that uses interface The University of Iowa. Copyright© 2005 Components that provides interface 12 A. Kruger

Homework • Tiny OS Tutorial –http: //www. tinyos. net/tinyos 1. x/doc/tutorial/lesson 1. html •

Homework • Tiny OS Tutorial –http: //www. tinyos. net/tinyos 1. x/doc/tutorial/lesson 1. html • Monday – Demo in Sensors Lab in IIHR WTA – http: //www. uiowa. edu/~maps/h/hwta 1. htm – Will post signs The University of Iowa. Copyright© 2005 13 A. Kruger