Update cookies preferences

E-book: Designing Embedded Systems with PIC Microcontrollers: Principles and Applications

4.03/5 (39 ratings by Goodreads)
(Head of Electronics, University of Derby, UK)
  • Format: EPUB+DRM
  • Pub. Date: 24-Oct-2006
  • Publisher: Newnes (an imprint of Butterworth-Heinemann Ltd )
  • Language: eng
  • ISBN-13: 9780080468143
Other books in subject:
  • Format - EPUB+DRM
  • Price: 53,09 €*
  • * the price is final i.e. no additional discount will apply
  • Add to basket
  • Add to Wishlist
  • This ebook is for personal use only. E-Books are non-refundable.
  • Format: EPUB+DRM
  • Pub. Date: 24-Oct-2006
  • Publisher: Newnes (an imprint of Butterworth-Heinemann Ltd )
  • Language: eng
  • ISBN-13: 9780080468143
Other books in subject:

DRM restrictions

  • Copying (copy/paste):

    not allowed

  • Printing:

    not allowed

  • Usage:

    Digital Rights Management (DRM)
    The publisher has supplied this book in encrypted form, which means that you need to install free software in order to unlock and read it.  To read this e-book you have to create Adobe ID More info here. Ebook can be read and downloaded up to 6 devices (single user with the same Adobe ID).

    Required software
    To read this ebook on a mobile device (phone or tablet) you'll need to install this free app: PocketBook Reader (iOS / Android)

    To download and read this eBook on a PC or Mac you need Adobe Digital Editions (This is a free app specially developed for eBooks. It's not the same as Adobe Reader, which you probably already have on your computer.)

    You can't read this ebook with Amazon Kindle

This book is aimed primarily at second or third year undergraduate engineering or technology students. It will also be of interest to the practicing professional, and the informed hobbyist. Readers are expected to have an introductory knowledge of electronics, mathematics, and microprocessor or computer systems

The main aim of the book is to take readers to a level whereby they are equipped to enter professional practice in the embedded world. For those already in professional practice, it increases their effectiveness, broadening and updating their range of skills. It achieves its aims by giving a clear understanding of the underlying knowledge and skills appropriate to today's embedded systems, including the use of C, and by engaging with key current issues, including networked systems, reliability, operating in the real-time environment, and use of real-time operating systems (RTOS).

The book is built around three example microcontrollers, the PIC 16F84, the 16F876, and the 18F452. It works through these in turn, using each to develop the complexity of the ideas introduced. To maintain breadth however it makes cross-reference to other devices, for example the Freescale (formerly Motorola) 68HC12. It uses the Microchip MPLAB Integrated Development Environment, the Microchip C-18 C compiler, and explores the capabilities of commercially available real time operating systems (e.g. Salvo or similar). The book is illustrated with several example projects, from the very simple (an electronic ping-pong game) to the more advanced (the Derbot Autonomous Guided Vehicle), all of which can be built by the reader. The book will be supported by the http://www.embedded-knowhow.co.uk web site. It is proposed that it is sold with a supporting CD, containing software and further build information for the projects used

* Combines embedded systems theory with practice
* Broad coverage of advanced topics
* Full support for the instructor and student
Introduction xxi
Acknowledgements xxv
Section 1 Getting Started with Embedded Systems
1(22)
Tiny computers, hidden control
3(20)
The main idea -- embedded systems in today's world
3(1)
What is an embedded system?
3(1)
Some example embedded systems
4(4)
The domestic refrigerator
4(1)
A car door mechanism
5(1)
The electronic `ping-pong'
6(1)
The Derbot Autonomous Guided Vehicle
7(1)
Some computer essentials
8(3)
Elements of a computer
9(1)
Instruction sets -- CISC and RISC
9(1)
Memory types
10(1)
Organising memory
10(1)
Microprocessors and microcontrollers
11(4)
Microprocessors
11(1)
Microcontrollers
12(1)
Microcontroller families
13(1)
Microcontroller packaging and appearance
14(1)
Microchip and the PIC microcontroller
15(2)
Background
15(1)
PIC microcontrollers today
15(2)
An introduction to PIC microcontrollers using the 12 Series
17(3)
The 12F508 architecture
18(2)
What others do -- a Freescale microcontroller
20(3)
Summary
22(1)
References
22(1)
Section 2 Minimum Systems and the PIC® 16F84A
23(120)
Introducing the PIC® 16 Series and the 16F84A
25(20)
The main idea -- the PIC 16 Series family
25(2)
A family overview
25(2)
The 16F84A
27(1)
A caution on upgrades
27(1)
An architecture overview of the 16F84A
27(2)
The Status register
29(1)
A review of memory technologies
29(3)
Static RAM (SRAM)
30(1)
EPROM (Erasable Programmable Read-Only Memory)
31(1)
EEPROM (Electrically Erasable Programmable Read-Only Memory)
31(1)
Flash
31(1)
The 16F84A memory
32(5)
The 16F84A program memory
32(1)
The 16F84A data and Special Function Register memory ('RAM')
33(2)
The Configuration Word
35(1)
EEPROM
35(2)
Some issues of timing
37(1)
Clock oscillator and instruction cycle
37(1)
Pipelining
38(1)
Power-up and Reset
38(2)
What others do -- the Atmel AT89C2051
40(1)
Taking things further -- the 16F84A on-chip reset circuit
41(4)
Summary
44(1)
References
44(1)
Parallel ports, power supply and the clock oscillator
45(20)
The main idea -- parallel input/output
46(1)
The technical challenge of parallel input/output
46(6)
Building a parallel interface
46(3)
Port electrical characteristics
49(1)
Some special cases
49(3)
Connecting to the parallel port
52(3)
Switches
52(1)
Light-emitting diodes
53(2)
The PIC 16F84A parallel ports
55(4)
The 16F84A Port B
55(1)
The 16F84A Port A
55(1)
Port output characteristics
56(3)
The clock oscillator
59(2)
Clock oscillator types
59(1)
Practical oscillator considerations
60(1)
The 16F84A clock oscillator
60(1)
Power supply
61(2)
The need for power, and its sources
61(1)
16F84A operating conditions
62(1)
The hardware design of the electronic ping-pong
63(2)
Summary
64(1)
References
64(1)
Starting to program -- an introduction to Assembler
65(24)
The main idea -- what programs do and how we develop them
66(3)
The problem of programming and the Assembler compromise
66(1)
The process of writing in Assembler
67(1)
The program development process
68(1)
The PIC 16 Series instruction set, with a little more on the ALU
69(2)
More on the PIC 16 Series ALU
69(1)
The PIC 16 Series instruction set -- an introduction
70(1)
Assemblers and Assembler format
71(2)
Introducing Assemblers and the Microchip MPASM™ Assembler
71(1)
Assembler format
71(1)
Assembler directives
72(1)
Number representation
72(1)
Creating simple programs
73(3)
A simple data transfer program
73(3)
Adopting a development environment
76(1)
Introducing MPLAB
76(1)
The elements of MPLAB
76(1)
The MPLAB file structure
77(1)
An introductory MPLAB tutorial
77(4)
Creating a project
77(2)
Entering source code
79(1)
Assembling the project
80(1)
An introduction to simulation
81(2)
Getting started
81(1)
Generating port inputs
81(1)
Viewing microcontroller features
82(1)
Resetting and running the program
82(1)
Downloading the program to a microcontroller
83(3)
What others do -- a brief comparison of CISC and RISC instruction sets
86(1)
Taking things further -- the 16 Series instruction set format
87(2)
Summary
88(1)
References
88(1)
Building Assembler programs
89(31)
The main idea -- building structured programs
89(3)
Flow diagrams
89(2)
State diagrams
91(1)
Flow control -- branching and subroutines
92(3)
Conditional branching and working with bits
92(2)
Subroutines and the Stack
94(1)
Generating time delays and intervals
95(2)
Dealing with data
97(4)
Indirect addressing and the File Select Register
97(1)
Look-up tables
98(1)
Example program with delays and look-up table
99(2)
Introducing logical instructions
101(1)
Introducing arithmetic instructions and the Carry flag
102(4)
Using add instructions
102(1)
Using subtract instructions
102(1)
An arithmetic program example
102(2)
Using indirect addressing to save the Fibonacci series
104(2)
Taming Assembler complexity
106(3)
Include Files
106(1)
Macros
107(1)
MPLAB special instructions
108(1)
More use of the MPLAB simulator
109(3)
Breakpoints
109(1)
Stopwatch
110(1)
Trace
110(2)
The ping-pong program
112(4)
A structure for the ping-pong program
112(3)
Exploring the ping-pong program code
115(1)
Simulating the ping-pong program -- tutorial
116(2)
Setting up input stimulus
116(1)
Setting up the Watch window
116(1)
Single stepping
116(1)
Animate
117(1)
Run
117(1)
Breakpoints
117(1)
Stopwatch
117(1)
Trace
117(1)
Debugging the full program
118(1)
What others do -- graphical simulators
118(2)
Summary
119(1)
References
119(1)
Working with time: interrupts, counters and timers
120(23)
The main idea -- interrupts
121(4)
Interrupt structures
121(1)
The 16F84A interrupt structure
122(2)
The CPU response to an interrupt
124(1)
Working with interrupts
125(6)
Programming with a single interrupt
125(1)
Moving to multiple interrupts -- identifying the source
126(1)
Stopping interrupts from wrecking your program 1 -- context saving
127(3)
Stopping interrupts from wrecking your program 2 -- critical regions and masking
130(1)
The main idea -- counters and timers
131(5)
The digital counter reviewed
131(1)
The counter as timer
132(2)
The 16F84A Timer 0 module
134(2)
Applying the 16F84A Timer 0, with examples using the electronic ping-pong
136(2)
Object or event counting
136(1)
Hardware-generated delays
137(1)
The Watchdog Timer
138(1)
Sleep mode
139(1)
What others do
140(1)
Taking things further -- interrupt latency
141(2)
Summary
142(1)
Section 3 Larger Systems and the PIC® 16F873A
143(190)
Larger systems and the PIC® 16F873A
145(39)
The main idea -- the PIC 16F87XA
146(1)
The 16F873A block diagram and CPU
146(4)
Overview of CPU and core
146(1)
Overview of memory
147(3)
Overview of peripherals
150(1)
16F873A memory and memory maps
150(5)
The 16F873A program memory
150(2)
The 16F873A data memory and Special Function Registers
152(2)
The Configuration Word
154(1)
`Special' memory operations
155(3)
Accessing EEPROM and program memory
155(1)
In-Circuit Serial Programming (ICSP™)
156(2)
The 16F873A interrupts
158(3)
The interrupt structure
158(1)
The interrupt registers
159(2)
Interrupt identification and context saving
161(1)
The 16F873A oscillator, reset and power supply
161(1)
The clock oscillator
161(1)
Reset and power supply
161(1)
The 16F873A parallel ports
161(4)
The 16F873A Port A
163(1)
The 16F873A Port B
164(1)
The 16F873A Port C
164(1)
Test, commission and diagnostic tools
165(6)
The challenge of testing an embedded system
165(2)
Oscilloscopes and logic analysers
167(3)
In-circuit emulators
170(1)
On-chip debuggers
170(1)
The Microchip in-circuit debugger (ICD 2)
171(1)
Applying the 16F873A: the Derbot AGV
172(4)
Power supply, oscillator and reset
172(1)
Use of the parallel ports
173(1)
Assembling the hardware
174(2)
Downloading, testing and running a simple program with ICD 2
176(4)
A first Derbot program
176(2)
Applying the ICD 2
178(1)
Setting the configuration bits within the program
179(1)
Taking things further -- the 16F874A/16F877A Ports D and E
180(4)
Summary
182(1)
References
183(1)
The human and physical interfaces
184(41)
The main idea -- the human interface
184(3)
From switches to keypads
187(6)
The keypad
187(1)
Design example: use of keypad in Derbot hand controller
188(5)
LED displays
193(6)
LED arrays: seven-segment displays
193(1)
Design example: the Derbot hand controller seven-segment display
194(5)
Liquid crystal displays
199(4)
The HD44780 LCD driver and its derivatives
199(1)
Design example: use of LCD display in Derbot hand controller
200(3)
The main idea -- interfacing to the physical world
203(1)
Some simple sensors
203(4)
The microswitch
204(1)
Light-dependent resistors
204(1)
Optical object sensing
205(1)
The opto-sensor applied as a shaft encoder
205(2)
Ultrasonic object sensor
207(1)
More on digital input
207(5)
16F873A input characteristics
207(1)
Ensuring legal logic levels, and input protection
208(4)
Switch debouncing
212(1)
Actuators: motors and servos
212(3)
DC and stepper motors
212(2)
Angular positioning: the `servo'
214(1)
Interfacing to actuators
215(5)
Simple DC switching
215(2)
Simple switching on the Derbot
217(1)
Reversible switching: the H-bridge
218(2)
Motor switching on the Derbot
220(1)
Building up the Derbot
220(2)
Applying sensors and actuators -- a `blind' navigation Derbot program
222(3)
Summary
223(1)
References
223(2)
Taking timing further
225(38)
The main ideas -- taking counting and timing further
225(1)
The 16F87XA Timer 0 and Timer 1
226(6)
Timer 0
226(1)
Timer 1
226(2)
Application of Timer 0 and Timer 1 as counters for Derbot odometry
228(3)
Using Timer 0 and Timer 1 to generate repetitive interrupts
231(1)
The 16F87XA Timer 2, comparator and PR2 register
232(3)
Timer 2
232(2)
The PR2 register, comparator and postscaler
234(1)
The capture/compare/PWM (CCP) modules
235(2)
A capture/compare/PWM overview
235(1)
Capture mode
235(2)
Compare mode
237(1)
Pulse width modulation
237(7)
The principle of PWM
237(2)
Generating PWM signals in hardware -- the 16F87XA PWM
239(2)
PWM applied in the Derbot for motor control
241(3)
Generating PWM in software
244(5)
An example of software-generated PWM
245(3)
Further Assembler directives for memory definition and branching
248(1)
PWM used for digital-to-analog conversion
249(3)
An example of PWM used for digital-to-analog conversion
249(3)
Frequency measurement
252(3)
The principle of frequency measurement
252(1)
Frequency (speed) measurement in the Derbot
252(3)
Speed control applied to the Derbot
255(3)
Where there is no timer
258(2)
Sleep mode
260(1)
Where do we go from here?
261(1)
Building up the Derbot
262(1)
Summary
262(1)
References
262(1)
Starting with serial
263(41)
The main idea -- introducing serial
263(2)
Simple serial links -- synchronous data communication
265(2)
Synchronous basics
265(1)
Implementing synchronous serial I/O in the microcontroller
266(1)
Microwire and SPI (Serial Peripheral Interface)
266(1)
Introducing multiple nodes
267(1)
The 16F87XA Master Synchronous Serial Port (MSSP) module in SPI mode
267(6)
Port overview
268(1)
Port configuration
268(2)
Setting the clock
270(1)
Managing data transfer
271(2)
A simple SPI example
273(2)
The limitations of Microwire and SPI, and of simple synchronous serial transfer
275(1)
Enhancing synchronous serial, and the Inter-Integrated Circuit bus
275(2)
Main I2C features and physical interconnection
275(1)
The pull-up resistor
275(1)
I2C signal characteristics
276(1)
The MSSP configured for I2C
277(9)
The MSSP I2C registers and their preliminary use
277(4)
The MSSP in I2C Slave mode
281(2)
The MSSP in I2C Master mode
283(3)
I2C applied in the Derbot AGV
286(7)
The Derbot hand controller as a serial node
286(1)
The AGV as an I2C master
286(4)
The hand controller as an I2C slave
290(2)
Evaluation of the Derbot I2C programs
292(1)
Evaluation of synchronous serial data communication and an introduction to asynchronous
293(2)
Asynchronous principles
293(1)
Synchronising serial data -- without an incoming clock
293(2)
The 16F87XA Addressable Universal Synchronous Asynchronous Receiver Transmitter (USART)
295(8)
Port overview
295(1)
The USART asynchronous transmitter
295(3)
The USART baud rate generator
298(1)
The USART asynchronous receiver
299(1)
An asynchronous example
300(2)
Using address detection with the USART receive mode
302(1)
The USART in synchronous mode
302(1)
Implementing serial without a serial port -- `bit banging'
303(1)
Building up the Derbot
303(1)
Summary
303(1)
References
303(1)
Data acquisition and manipulation
304(29)
The main idea -- analog and digital quantities, their acquisition and use
304(1)
The data acquisition system
305(7)
The analog-to-digital converter
306(2)
Signal conditioning -- amplification and filtering
308(1)
The analog multiplexer
308(1)
Sample and hold, and acquisition time
309(1)
Timing and microprocessor control
310(1)
Data acquisition in the microcontroller environment
311(1)
The PIC® 16F87XA ADC module
312(7)
Overview and block diagram
312(1)
Controlling the ADC
313(4)
The analog input model
317(1)
Calculating acquisition time
318(1)
Repeated conversions
319(1)
Trading off conversion speed and resolution
319(1)
Applying the ADC in the Derbot light meter program
319(2)
Configuration of the ADC
319(1)
Acquisition time
320(1)
Data conversion
321(1)
Some simple data manipulation techniques
321(5)
Fixed- and floating-point arithmetic
322(1)
Binary to Binary Coded Decimal conversion
323(1)
Multiplication
324(1)
Scaling and the Derbot light meter example
324(2)
Using the voltage reference for scaling
326(1)
The Derbot light-seeking program
326(1)
The comparator module
327(2)
Review of comparator action
327(2)
The 16F87XA comparators and voltage reference
329(1)
Applying the Derbot circuit for measurement purposes
329(3)
The electronic tape measure
329(2)
The light meter
331(1)
The voltmeter
331(1)
Other measurement systems
331(1)
Configuring the Derbot AGV as a light-seeking robot
332(1)
Summary
332(1)
References
332(1)
Section 4 Smarter Systems and the PIC® 18FXX2
333(178)
Smarter systems and the PIC® 18FXX2
335(33)
The main idea -- the PIC 18 Series and the 18FXX2
336(1)
The 18F2X2 block diagram and Status register
337(3)
The 18 Series instruction set
340(5)
Instructions which are unchanged
344(1)
Instructions which have been upgraded
344(1)
New, variant, instructions
345(1)
New instructions
345(1)
Data memory and Special Function Registers
345(2)
The data memory map
345(2)
Access RAM
347(1)
Indirect addressing and accessing tables in data memory
347(1)
Program memory
347(5)
The program memory map
349(1)
The Program Counter
349(1)
Upgrading from the 16 Series and computed goto instructions
349(1)
The Configuration registers
350(2)
The Stacks
352(1)
Automatic Stack operations
352(1)
Programmer access to the Stack
352(1)
The Fast Register Stack
352(1)
The interrupts
353(5)
An interrupt structure overview
353(1)
The interrupt sources, their enabling and prioritisation
353(1)
Overall interrupt prioritisation enabling
354(1)
Global enabling
354(1)
Other aspects of the interrupt logic
355(1)
The Interrupt registers
355(1)
Context saving with interrupts
356(2)
Power supply and reset
358(2)
Power supply
358(1)
Power-up and Reset
358(2)
The oscillator sources
360(4)
LP, XT, HS and RC oscillator modes
362(1)
EC, ECIO and RCIO oscillator modes
363(1)
HS + PLL oscillator mode
363(1)
Clock source switching
363(1)
Introductory programming with the 18F242
364(4)
Using the MPLAB IDE for the 18 Series
364(1)
The Fibonacci program
365(2)
Summary
367(1)
References
367(1)
The PIC® 18FXX2 peripherals
368(18)
The main idea -- the 18FXX2 peripherals
368(1)
The parallel ports
369(2)
The 18FXX2 Port A
369(1)
The 18FXX2 Port B
369(2)
The 18FXX2 Port C
371(1)
The parallel slave port
371(1)
The timers
371(5)
Timer 0
371(2)
Timer 1
373(1)
Timer 2
373(1)
Timer 3
373(3)
The Watchdog Timer
376(1)
The capture/compare/PWM (CCP) modules
376(2)
The control registers
376(1)
Capture mode
376(1)
Compare mode
377(1)
Pulse width modulation
378(1)
The serial ports
378(2)
The MSSP in SPI mode
379(1)
The MSSP in I2C mode
379(1)
The USART
380(1)
The analog-to-digital converter (ADC)
380(1)
Low-voltage detect
380(2)
Applying the 18 Series in the Derbot-18
382(1)
The 18F2420 and the extended instruction set
383(3)
Nanowatt technology
383(1)
The extended instruction set
384(1)
Enhanced peripherals
384(1)
Summary
385(1)
Reference
385(1)
Introducing C
386(23)
The main idea -- why C?
387(1)
An introduction to C
387(7)
A little history
387(1)
A first program
388(1)
Laying out the program -- declarations, statements, comments and space
388(2)
C keywords
390(1)
The C function
391(1)
Data type and storage
392(1)
C operators
392(1)
Control of program flow, and the while keyword
393(1)
The C preprocessor and its directives
394(1)
Use of libraries, and the Standard Library
394(1)
Compiling the C program
394(1)
The MPLAB C18 compiler
395(1)
Specification of radix
396(1)
Arithmetic operations
396(1)
A C18 tutorial
396(4)
The Linker and Linker Scripts
396(1)
Linking header and library files
397(1)
Building the project
397(1)
Project files
398(2)
Simulating a C program
400(1)
A second C example -- the Fibonacci program
401(2)
Program preliminaries -- more on declaring variables
402(1)
The do--while construct
403(1)
Labels and the goto keyword
403(1)
Simulating the Fibonacci program
403(1)
The MPLAB C18 libraries
403(3)
Hardware peripheral functions
404(1)
The software peripheral library
404(1)
The general software library
405(1)
The maths library
406(1)
Further reading
406(3)
Summary
407(1)
References
407(2)
C and the embedded environment
409(14)
The main idea -- adapting C to the embedded environment
409(1)
Controlling and branching on bit values
409(4)
Controlling individual bits
411(1)
The if and if--else conditional branch structures
411(1)
Setting the configuration bits
412(1)
Simulating and running the example program
412(1)
More on functions
413(2)
The function prototype
413(1)
The function definition
414(1)
Function calls and data passing
414(1)
Library delay functions, and Delay10KTCYx( )
415(1)
More branching and looping
415(2)
Using the break keyword
415(1)
Using the for keyword
416(1)
Using the timer and PWM peripherals
417(6)
Using the timer peripherals
420(1)
Using PWM
421(1)
The main program loop
421(1)
Summary
422(1)
Acquiring and using data with C
423(21)
The main idea -- using C for data manipulation
423(1)
Using the 18FXX2 ADC
423(8)
The light-seeking program structure
427(1)
Use of the ADC
428(1)
Further use of if-else
429(1)
Simulating the light-seeking program
429(2)
Pointers, arrays and strings
431(6)
Pointers
431(1)
Arrays
432(1)
Using pointers with arrays
432(1)
Strings
433(1)
An example program: using pointers, arrays and strings
433(1)
A word on evaluating the while condition
434(1)
Simulating the program example
435(2)
Using the I2C peripheral
437(3)
An example I2C program
437(2)
Use of ++ and -- operators
439(1)
Formatting data for display
440(4)
Overview of example program
440(2)
Using library functions for data formatting
442(1)
Program evaluation
442(1)
Summary
443(1)
More C and the wider C environment
444(22)
The main idea -- more C and the wider C environment
444(1)
Assembler inserts
445(1)
Controlling memory allocation
446(2)
Memory allocation pragmas
447(1)
Setting the Configuration Words
447(1)
Interrupts
448(1)
The Interrupt Service Routine
448(1)
Locating and identifying the ISR
449(1)
Example with interrupt on overflow -- flashing LEDs on the Derbot
449(4)
Using Timer 0
450(1)
Using interrupts, and the ISR action
451(1)
Simulating the flashing LEDs program
452(1)
Storage classes and their application
453(3)
Storage classes
453(1)
Scope
454(1)
Duration
454(1)
Linkage
455(1)
Working with 18 Series memory
455(1)
Storage class examples
455(1)
Start-up code: c018i.c
456(3)
The C18 start-up files
456(1)
The c018i.c structure
457(1)
Simulating c018i.c
457(2)
Structures, unions and bit-fields
459(1)
Processor-specific header files
460(2)
SFR definitions
460(1)
Assembler utilities in the header file
461(1)
Taking things further -- the MPLAB Linker and the .map file
462(4)
What the Linker does
462(1)
The Linker Script
462(2)
The .map file
464(1)
Summary
465(1)
References
465(1)
Multi-tasking and the Real Time Operating System
466(14)
The main ideas -- the challenge of multi-tasking and real time
466(3)
Multi-tasking -- tasks, priorities and deadlines
467(1)
So what is `real time'?
468(1)
Achieving multi-tasking with sequential programming
469(3)
Evaluating the super loop
469(1)
Time-triggered and event-triggered tasks
469(1)
Using interrupts for prioritisation -- the foreground/background structure
469(1)
Introducing a `clock tick' to synchronise program activity
470(1)
A general-purpose `operating system'
471(1)
The limits of sequential programming when multi-tasking
471(1)
The Real Time Operating System (RTOS)
472(1)
Scheduling and the scheduler
473(4)
Cyclic scheduling
473(1)
Round robin scheduling and context switching
473(1)
Task states
474(1)
Prioritised pre-emptive scheduling
475(1)
Cooperative scheduling
476(1)
The role of interrupts in scheduling
477(1)
Developing tasks
477(1)
Defining tasks
477(1)
Writing tasks and setting priority
478(1)
Data and resource protection -- the semaphore
478(1)
Where do we go from here?
479(1)
Summary
479(1)
References
479(1)
The Salvo™ Real Time Operating System
480(31)
The main idea -- Salvo, an example RTOS
480(2)
Basic Salvo features
480(1)
Salvo versions and references
481(1)
Configuring the Salvo application
482(1)
Building Salvo applications -- the library build
482(1)
Salvo libraries
482(1)
Using Salvo with C18
483(1)
Writing Salvo programs
483(2)
Initialisation and scheduling
484(1)
Writing Salvo tasks
485(1)
A first Salvo example
485(6)
Program overview and the main function
487(1)
Tasks and scheduling
488(1)
Creating a Salvo/C18 project
488(1)
Setting the configuration file
489(1)
Building the Salvo example
489(1)
Simulating the Salvo program
490(1)
Using interrupts, delays and semaphores with Salvo
491(8)
An example program using an interrupt-based clock tick
492(2)
Selecting the library and configuration
494(1)
Using interrupts and establishing the clock tick
494(2)
Using delays
496(1)
Using a binary semaphore
496(1)
Simulating the program
497(2)
Running the program
499(1)
Using Salvo messages and increasing RTOS complexity
499(1)
A program example with messages
500(9)
Selecting the library and configuration
505(1)
The task: USnd_ Task
505(1)
The task: Motor_ Task
505(1)
The use of messages
506(1)
The use of interrupts, and the ISRs
507(2)
Simulating or running the program
509(1)
The RTOS overhead
509(2)
Summary
510(1)
References
510(1)
Section 5 Techniques of Connectivity and Networking
511(16)
Connectivity and networks
513(14)
The main idea -- networking and connectivity
513(2)
A word on protocols
514(1)
Infrared connectivity
515(1)
The IrDA and the PIC microcontroller
515(1)
Radio connectivity
516(2)
Bluetooth
516(1)
Zigbee
517(1)
Zigbee and the PIC microcontroller
517(1)
Controller Area Network (CAN) and Local Interconnect Network (LIN)
518(4)
Controller Area Network (CAN)
518(2)
CAN and the PIC microcontroller
520(1)
Local Interconnect Network (LIN)
520(1)
LIN and the PIC microcontroller
521(1)
Embedded systems and the Internet
522(1)
Connecting to the Internet with the PIC microcontroller
523(1)
Conclusion
523(4)
Summary
524(1)
References
524(3)
Appendix 1 The PIC® 16 Series instruction set 527(1)
Appendix 2 The electronic ping-pong 528(5)
Appendix 3 The Derbot AGV -- hardware design details 533(4)
Appendix 4 Some basics of Autonomous Guided Vehicles 537(4)
Appendix 5 PIC® 18 Series instruction set (non-extended) 541(3)
Appendix 6 Essentials of C 544(5)
Index 549


Tim Wilmshurst is the author of Designing Embedded Systems with PIC Microcontrollers. He has been designing embedded systems since the early days of microcontrollers. For many years this was for Cambridge University, where he led a development team building original systems for research applications for example in measurement of bullet speed, wind tunnel control, simulated earthquakes, or seeking a cure to snoring. Now he is Head of Electronic Systems at the University of Derby, where he aims to share his love of engineering design with his students.