Index – Designing Embedded Systems with PIC Microcontrollers, 2nd Edition

Index
0-9
8-bit shift register
297–298
12F508/509 pin
18–21
14-bit opcode
81
16-bit PIC microcontrollers:
clock sources of
600, 601
coding of
593
comparison of
593
CPU of
595–596
digital signal controllers
instruction set of
619–620
peripherals of
603–604
PIC24FJ64GA004
block diagram of
592, 594
data memory map of
597–598
interrupt vector table of
596–597
program memory map of
596–597
pins and ports
602–603
power supply of
600–602
RTCC of
603–604
software stack
598
traps and interrupts
599–600
16C5X Microchip baseline microcontroller
17
16F84A
architecture overview
31–33
basic operating conditions
69
block diagram of
32
clock oscillator and instruction cycle
41–42, 67–68
Configuration Word
40
Data and Special Function Register memory (‘RAM’)
38–39
EEPROM (Electrically Erasable Programmable Read-Only Memory)
35, 40–41
EPROM (Erasable Programmable Read-Only Memory)
35
Flash
36
on-chip reset circuit
45–47
PIC parallel port A
63
PIC parallel port B
61–63
pipelining
42–43
Port A and Port B
33
port output characteristics
63–65
power-up
44–45
program memory and the stack
36–38
‘ready-to-start’ condition
44–45
sleep mode
291–292
static RAM (SRAM)
34–35
status register
34
upgraded version
31
ways of supplying a clock waveform
68
16F84A INTCON register
148
16F84A Timer 0 module
159–160, 258
application as counters for Derbot odometry
260–263
to generate repetitive interrupts
263
hardware-generated delays
162–163
object or event counting
160–161
16F84A Timer 1 module
258–260
application as counters for Derbot odometry
260–263
to generate repetitive interrupts
263
16F87XA Addressable Universal Synchronous Asynchronous Receiver Transmitter (USART)
asynchronous receiver
330–332
asynchronous transmitter
327–329
baud rate generator
329–330
example
332–333
port overview
327
receive mode
333–334
synchronous mode
334
16F87XA comparators and voltage reference
364
16F87XA Master Synchronous Serial Port (MSSP) module
data transfer
304–305
overview
301–302
port configuration
301–302
16F87XA Timer
2, 264–265
16F88:
architecture
comparators and voltage reference
373
pin connection and block diagrams
372–373, 374
internal oscillator block
383
peripherals
pin use optimisation
375
register for data transfer
373
16F88 Port A 3 pin driver circuit, block diagram of
375
16F873A:
and 16F88 peripherals
376
architecture
372–373
block diagram
173
CPU structure
173–175
memory structure
175–176
peripherals
176
program memory
176–178
16F873A/874A data memory map
178–180
16F883:
block diagram of
376, 377
data and program memory maps for
376
interrupt sources
378
nanoWatt technology features of
379
oscillator selection in
380, 381–383
peripherals
378, 383
ADC modules
386–388
CCP modules
384–385
enhanced addressable USART
385–386
timers
384
port bits
378
16F883 internal oscillator:
block diagram of
380
18F2450/4450 USB Peripheral
587
18FXX20 microcontrollers:
ADC module
438–440
characteristics of
396
clock sources
422
configuration registers and device identifications
410
INTCON register
417
INTCON2 register
418
INTCON3 register
419
OSCCON Register
424
PIE1/PIR1/IPR1 registers
419
PIE2/PIR2/IPR2 registers
420
pin diagrams for DIL packages
397
Port C and E
432
power supply parameters
420–421
program memory map for
408–409
serial modules
437
Special Function Registers
407
Status register
399
supply voltage requirements of
421
timers
433–434
18FXX20 Port Pin Driver Circuit
431
32-bit PIC microcontrollers:
coding of
610
connecting to Internet with
589
features of
610
JTAG capability of
614
memory of
614–615
PIC32MX4XX microcontroller
block diagram
611, 612
182420 ports:
Port A
431
Port B
432
Port C and E
432
A
AA Alkaline cells
7
Access RAM concept:
PIC 18F2420
405
Acquisition time:
for 8-bit conversion
345–346
calculation of 16F87XA ADC module
354–355
definition of
345
Actuators:
DC or stepper motors
243–244
interfacing
245–250
servos
244–245
ADC clock:
frequency, switching of
354
period
349
source selection
350
ADCON0 register
349
ADCON1 register
188, 350
Added value, idea of
5
Addr MUX
20
Address bus
11
Address Generation Units (AGUs)
597
Addressable Universal Synchronous Asynchronous Receiver Transmitter (USART):
asynchronous receiver
330–332
asynchronous transmitter
327–329
automatic baud rate detection
385
baud rate generator
329–330
example
332–333
port overview
327
receive mode
333–334
synchronous mode
334
Aliasing
344
‘Alternate Input Function’ line, of I/O pin
55
Alternative radix
84
Analog input filtering
239–241
Analog input model:
signal path
351
signal source
352
switch resistance
353
Analog multiplexer:
as selector switch
344
Analog signals
340
Analog-to-digital converter (ADC)
340
of 16F883
acquisition time of
388
analog inputs
386
18F2420
482–487
of 18FXX20 microcontrollers
438–440
applications of
341
conversion characteristics of
input range
343
input/output
342–343
measure of
343
conversion time of
343
in Derbot light meter program
acquisition time
355–356
data conversion
356
setting of control registers
355
digital interface of
343
integrated onto microcontroller
347
module
188
voltage reference of
343
AND instruction
131–132
andlw instruction
131
Anti-aliasing filtering
344
AQ6 configuration register:
oscillator selection bits within
382
Arguments
133
Arithmetic Logic Unit (ALU)
19, 79–80
.asm extension
86
Assembler complexities, programs:
Include File
132
macros
133
MPLAB special instructions
134
use of LIST directive
134–135
Assemblers
77
directives
83
format
82–83
MPASM
83–84
in MPLAB
86, 91
number representation
83–84
process of writing
78
program example
84–85
programming in
78
Asynchronous principles
325
Automated household
575–576
Automatic baud rate detection
385
Automatic wake-up
385–386
Autonomous guided vehicle design:
locomotion and wheel layout
631–632
motor, gearbox and wheel
632
odometry
634
turning geometries
632–634
B
Background debug mode (BDM)
197
bcf f,b instruction
99
Binary code, of the computer
76
Binary Coded Decimal (BCD)
358–359
Binary point
357
Binary radix
99
Binary semaphore
538, 559
Binary to binary coded decimal conversion
358–359
Bit values, controlling
468
Bitwise basis
125
Block scope
512
Bluetooth
579–580
BOREN bit
187
Breakpoints
140–141
bsf f,b instruction
99
Bulk data transfer, of parallel input/output (I/O)
52
busy_check
230
busy_check routine
231
C
C compiler
502, 503–506
C library
451
C program:
code blocks
447
comments
446
compilation of:
C source file
452
Fibonacci series generator
459–461
object file
453
preprocessor directives for
451
process of
452–453
using MPLAB C18 compiler
454–457
data type
449
declarations
446
examples
445, 492
‘flashing LEDs’ program:
simulation
509–511
using ISR action
508–509
using Timer 0 interrupts
507–508
flow control
450
functions
448–449
moving microswitch states to LEDs:
controlling individual bits
468
if and if–else conditional branch structures
468, 470
running
471–472
settings configuration bits
470
simulation of
470–471
scope of variable
512
simulation of
458–459
space in
447
statements
446–447
storage location
449–450
variables within
449
C programming language
18
arrays
489–491
assembler inserts
502
branching and looping using:
break keyword
474–475
for keyword
475–476
data acquisition in
18F2420 ADC
482–487
if–else tests
487
light-seeking program structure
482
for data manipulation
481
data types
643
duration of variable
512
function calls and data passing
473
function definition
472–473
function prototype
472
history
444–445
interrupts in:
Interrupt Service Routines
506–507
on overflow
507–511
keywords
448
keywords associated with:
data storage class
642
data type and structure definition
641
program flow
642
library delay functions
473–474
linkage of variable/function
513
operators
450, 643–644
pointer
489–491
preprocessor directives
645
punctuation marks
645
storage classes
511–512
strings
491
structures and unions
218
while structure
450–451, 491
C radix specifications
453–454
C Standard Library
462
C18 compiler:
c018i.c file (start-up program file)
514
simulation
515–517
structure
515
storage classes
511–512, 513–514
storage qualifiers
513
C18 in-line assembler:
and MPLAB Assembler, difference between
502–503
Capture/compare/PWM (CCP) modules:
of 18F2420
436–437
capture mode
267–268
compare mode
269
enhanced:
block diagram of
384
output of
385
overview
267
Car door mechanism
5–6
CCPRxL registers
267
CCPxCON registers
267
Central locking
6
Central Processing Unit (CPU)
6
of 18F2X20 microcontrollers
395
of PIC24F family microcontroller
593, 596
of PIC32MX4XX microcontroller
613–614
Chip Select
300
Chip_Reset mode, of 16F84A
45–46
Clamping voltage spikes
239
Clock oscillator:
16F84A
67–68
design of 16F88 and 16F883
380
parallel input/output
65–68
Clock source:
of 24FJ64GA004
600
block diagram
381
external
381
selection of
380–381
clrf instruction
99
Comments
446
Communication link
576
Comparators:
applications of
363
and voltage reference
364
Compiler
444
Complementary Metal Oxide Semiconductor (CMOS)
56, 236
logic families
60
Compressor control, in domestic refrigerator
4–5
Computed go to
128
Computer, embedded
5
elements
9
Harvard structure
11
memory technology
10–11
organising memory
11
RISC and CISC approach
9–10
Von Neumann structure
11
Computer programming:
Cross-Assembler
77
ideas of
76
instruction mnemonics
77
problem of programming
76–78
process of writing in Assembler
78
program development cycle
78–79
using high-level language (HLL)
77
Condition code flags
33
Conditional branching
110–111
Configuration registers:
of 18F2X20 microcontrollers
410–411
Configuration Word, of a 16 Series PIC microcontroller
180
Configured as output of comparator 2 (C2OUT)
188
Controller Area Network (CAN):
concept of
581
features of
582
in motor vehicle environment
582, 583
and PIC microcontrollers
582–583
Cooperative scheduling
536
Counters:
digital
156–157
as timer
157–159
Counter/timer (C/T)
158
Counting semaphore
538
Count_Task function
558
Cross-Assembler
77, 78
Crystal oscillator
66
Crystal vibration
66
Crystals, piezo-electric properties
66
Cyclic scheduling
532–533
D
Data acquisition:
definition of
339
in microcontroller environment
347
Data acquisition system:
elements of
341
S&H circuit of:
leakage from capacitor
345
schematic representation of
344
series resistance in signal path
345
signal conditioning of
344
timing and microprocessor control
346–347
Data bus
11, 20
‘Data’ flip-flop forms
54
Data manipulation techniques:
binary to binary coded decimal conversion
358–359
Derbot light meter
359–361
fixed- and floating-point arithmetic
357–358
multiplication
359
scaling of input data
359
voltage reference for scaling
361
Data memory:
of 18F2X20 microcontrollers
396
of PIC24FJ64GA004
597–598
Data move instructions
95–97
Data transfer programs
97–101
Dbt_speed_control program
286–289
Dbt_speed_meas program
284
DC and stepper motors
243–244
Debugger
86
Declarations
446
Deep Sleep mode
380
Default radix
84
Derbot Autonomous Guided Vehicle (AGV)
7–8
building up
250–252
‘flashing LEDs’ on
simulation of
509–511
using ISR action
508–509
using Timer 0 interrupts
507–508
hand controller board on
575
hardware design details
circuit diagram using 16F873A microcontroller
627
hand controller circuit diagram
628
I2C applications
495–497
Inter-Integrated Circuit (I2C) protocol
318–324
L293D dual H-bridge
250
program Dbt_blind_Nav
253
program for
525
pulse width modulation (PWM)
273–276
simple switching
247–248
Derbot ‘blind navigation’ program
477–478
with ultrasound overhang detector
563–566
Derbot incremental shaft encoder
629–630
Derbot light meter program:
10-bit resolution of
359–360
ADC in, applying:
acquisition time
355–356
data conversion
356
setting of control registers
355
data processing sequence for rear LDR
361
multiplication by
359
scaling of input data by
359–360
Derbot light-seeking program:
applying ADC in
361–363
flow diagram
363, 526
formatting data for display using
497–500
and real time concept
527–528
simulation of
487–489
structure
482
tasks in
527
using timed interrupt in
530
Derbot-18
440
Desktop computer
8
Digital input filtering
241
Digital interface of ADC
343
Digital signal controllers:
DSP engine:
block diagram
607, 608
data flow
608–609
multiplier output and accumulators
607
dsPIC30F and dsPIC33F
606–607
Digital signal processing:
applications of
605–606
definition of
605
instructions
608–609
Digital signals
340
‘Direct Addr’ bus
21
Direct user interface, of parallel input/output (I/O)
52
‘Direction’ flip-flop forms
54
‘Direction’ latch
61
Domestic refrigerator
4–5
E
Electrically Erasable Programmable Read-Only Memory (EEPROM)
17, 31, 147
Electronic ping-pong:
circuit diagram
621
program
98
program listing of
622–625
Electronic tape measure:
Derbot assembly for
365–366
Derbot configured for
367
Embedded systems
371
definition
3
examples of
4–8
and Internet
588–589
Enhanced CAN module
582–583
Erasable Programmable Read-Only Memory (EPROM)
31
EUSART automatic wake-up
385–386
Event-triggered tasks
530
External Reset mode, of 16F84A
46
F
Fail-Safe Clock Monitor (FSCM)
383
Fast Register Stack:
context saving with
418
of PIC 18 Series microcontrollers
412–413
Fibonacci series
95, 425–427
Fibonacci series generator:
compilation of:
do–while construct
460
labels and goto keyword
461
variables
459
simulation of
461
File scope
512
File Select Register (FSR)
143, 407–408
Fixed-point arithmetic
357–358
Flags memory location
127
Flash converter
341–342
Flash memory technology
180–181
Floating-point representation
358
Foreground/background program structure
529
Free-form programming language
Frequency measurement:
in the Derbot
284–286
principles
283–284
Full Function Device (FFD)
580
Function calls and data passing
473
Function definition
472–473
Function prototype
472
Futaba S3003 servo
244
G
General-Purpose Input/Output (GPIO)
20
General-purpose operating system:
using sequential programming
530–531
Global Interrupt Enable
147
Global interrupt enabling
415–416
goto instruction
85
H
Hardware timer
289–291
Hardware-generated delays
162–163
Harvard structure
128
H-bridge
248–250
HD44780
228–230
Hex file
104
Hexadecimal number
84
Higher-frequency crystal applications
67
High-frequency internal oscillator (HFINTOSC)
380, 382
High-level language (HLL)
77, 443, 444
Host layers
577
Human computer interface, concept
214–215
I
I2C peripheral
494–495
I2C program:
++ and – – operators uses
497
sending character and string to Derbot AGV using
495–497
I2C_RX_word
332
In Circuit Serial Programming (ICSP)
103
In-circuit debugger (ICD)
197
In-circuit emulator (ICE)
196–197
In-Circuit Serial Programming (ICSP)
190
Include File
132
Indirect Address (INDF)
142
Information revolution, age of
3
Infrared Data Association (IrDA)
578
Infrared (IR) data communication:
characteristics of
577–578
IrDA and PIC microcontroller
578
Initialise function
473
In-line assembler
502–503
Input channels:
configuring
351
selecting
351
Input measurement information, of parallel input/output (I/O)
52
Input multiplexer:
inputs
347
Input transducers
232
Instruction mnemonics
77, 82
‘Instruction Reg’ bus
21
INTCON register
147–148, 150, 185
Integrated circuit (IC)
6
Integrated development environment (IDE)
79
Interface, with physical world
231–233
Inter-Integrated Circuit (I2C) protocol:
in the Derbot AGV
318–324
features and physical interconnection
308
MSSP configuration for:
master mode
316–318
registers and their preliminary use
310–313
slave mode
313–316
pull-up resistor
308–309
signal characteristics
309–310
Internal oscillator
380, 383
‘Internal RC OSC’ internal clock oscillator
21
Internet communication
588–589
Interrupt registers
416–418
Interrupt Service Routine (ISR)
149
for ‘clock tick,’
557
Interrupt structure of 18 Series microcontrollers:
context saving with
418
global enabling
415–416
interrupt registers
416–418
interrupt sources
413–415
overall interrupt prioritisation enabling
415
PIE1/PIR1/IPR1
419
PIE2/PIR2/IPR2
420
Interrupt Vector Table (IVT)
599
Interrupt X Enable
146
Interrupt-based clock tick
553–555
Interrupt(s):
16F84A structures
147–148
in 16F84A Timer 1 module
263
and context saving
152–154
CPU responses
149
critical regions and masking
155–156
flag
146
idea of
146
int_cntr
286
latency
165
non-maskable
147
occurrence of
165
PIC 16F873A
184–187
programming with multiple
152
programming with single
150–151
stopping of
152–156
structures
146–147
Timer
2, 284
K
Keypad:
in an embedded environment
216
idea
216
output values
217
use in Derbot hand controller
218–222
Keypad_test
218, 230
Kpad_pat
219
Kpad_rd subroutine
219
Kpad_to_lcd
218, 219
Kp_code_conv
219
subroutine
219
L
L293D dual H-bridge
249
in the Derbot motor drive circuit
250
Label loop
85, 253
Labels
82
LCD display:
formatting data for
497–500
Lcd_write
230
Led_posn memory location
138
Leftmot_fwd subroutine
253
Library build
543
Light meter:
Derbot assembly for
366
Derbot configured for
367
Light-dependent resistor (LDR)
234
Light-emitting diodes (LEDs)
59–61, 131, 138
common anode/common cathode connection
222–223
multiplexing of digits
223
seven-segment displays
222–223
version of Derbot hand controller
223–227
Link layer
576–577
Linker
86
Linker Script
521–522
Liquid crystal
227
Liquid crystal display (LCD)
215
control lines
229
general-purpose displays
228
HD44780
228–230
use in Derbot hand controller
230–231
Local Interconnect Network (LIN):
API
585
and CAN buses, communication system using
585
data frame
584
network topology
584
physical interface
584
and PIC microcontroller
585–586
‘Logic-compatible’ MOSFET transistor
225
Look-up table
128–132
Low-frequency crystal applications
67
Low-frequency internal oscillator (LFINTOSC)
380
Low-frequency oscillator:
calibration of
383
Low-power radio system
579
M
Macros
133
.map file
522–523
Masking
147
MCLR (‘Master Clear’) input
44–45, 47, 70
MCP2122
578
MCP2551
583
Memory allocation, controlling:
pragmas for
504–505
setting configuration bits
505–506
Memory models
513
MFA/Como Drills
244
Microchip
6, 372
Microchip C18 compiler
443, 445
Microchip ICD 2 system
198–199
application in Derbot AGV
199–202
application of
202–206
Microchip Technology
379, 591
Microcontrollers
3, 12–13
Derbot
8
design issues
372
downloading to
101–105
families
13
header files
517–518
keypad
217
Microchip
7
packaging and appearance
13–15
performance
380
peripherals control using library functions
476
PIC 16 Series
110
Microphone output signal
340
Microprocessors
12, 110
Microswitches
233–234
Microwire
299–300
limitations
307
MOSFET (Metal Oxide Semiconductor Field Effect Transistor)
57, 65, 245, 246, 247
Movf f,d instruction
96
Movlw instruction
128
Movlw k instruction
96
Movwf f instruction
96
MPASM
83–84
elements
86
file structure
86
tutorial
86–92
MPLAB:
Assembler
86, 91
Debugger toolbar
94–95
file extensions used
87
IDE Screen
87
simulator
121–125
Zero, Digit Carry and Carry bits
95
MPLAB C18 compiler
425–426
arithmetic operations
454
assembler inserts
502
C program compilation using:
building project
456–457
linker, header and library files
455–456
project window
454
C radix specifications
453–454
delay functions in
473
libraries:
ADC functions
462
character classification functions
462
general software library functions
462–464
hardware peripheral functions
461–462
maths library functions
464
software peripheral functions
462
string/character conversion functions
463
memory models
645
program simulation with
492–494
storage qualifiers
645
MPLAB Linker:
build process
520
Linker Script
521–522
and .map file
522–523
MPSIM
141
Multiplexer (‘MUX’)
19
Multiplication
359
Multi-tasking:
definition of
526
examples
527
with sequential programming
528–531
N
NanoWatt technology:
features in 16F88 and 16F883
379–380
objective of
379
XLP (eXtra Low Power)
380
Network connectivity
576
Network layer
577
Network protocols
577
Non-volatile memory
10
NORP12
234
Nyquist sampling criterion
344
O
Odometry
634
Open Drain output
57
Open Systems Interconnect (OSI) model
576–577
OpenPWMx( ) function
479
Operands
79–80, 83
operand codes
80
Optical object sensing
234–235
applied as a shaft encoder
235–236
ultrasound
236
OPTION register
147, 159–160
Opto-isolator
241
Org directive
85
Oscillator control register
382
Oscillator frequency
66–67
Oscillator modes
381
Oscillator Start-up Timer
46–47
OS_Delay( ) function
557–558
‘Out-of-play’ LED
6
Output control information, of parallel input/output (I/O)
52
P
Parallel input/output:
building of
53–55
clock oscillator
65–68
light-emitting diodes (LEDs)
59–61
notion
52
Open Drain output
57
port electrical characteristics
55–56
Schmitt trigger inputs of
56–57
switch position
57–59
technical challenges
52–57
PCL register
176, 178
PCLATH register
177, 178
PCON register
188
Period register PR2
266–267
Peripheral Interface Controller:
8-bit microcontrollers
16–18
12F508/509
18–19
baseline family
17
‘mid-range’ family
17–18
PIC 1650 and 1655 processors
15
Peripheral Interrupt Enable bit (PEIE)
185
Peripheral pin select
602
Peripherals:
of 18FXX20 microcontrollers
430–431
control using:
main program loop
480
of PIC24 series
603–604
Photocopier control
214
Physical layer
576
PIC 16 Series instruction set
78
14-bit machine code words
78
addlw k
81
addwf f,d
81
Apprndix
1, 80
Arithmetic Logic Unit (ALU)
79–80
bcf f,b
81
case-sensitivity
81
clrf f
81
clrw
81
format
105
goto k
81
operand codes
80
PIC 16F84 microcontroller
334
PIC 16F87XA
172
PIC 16F873A:
clock oscillator
187
configuration bits
206–207
EEPROM and program memory
181–183
Flash memory technology
180–181
in-circuit emulator (ICE)
196–197
In-Circuit Serial Programming (ICSP)
183–184
input characteristics
237–238
interrupts
184–187
legal logic levels, and input protection
238–241
on-chip debuggers
197–198
oscilloscopes and logic analysers
194–196
parallel port A
188–190
parallel port B
190
parallel port C
190–191
parallel port D
307–309
parallel port E
307–309
reset and power supply
187–188
switch debouncing
241–242
testing of
192–194
PIC 16F882/883/886 block diagram
377
PIC 16F882/883/886 pin connection diagram
376
PIC 18 Series microcontrollers:
18F2X20 microcontrollers:
block diagram and 28-pin devices of
395, 397
Configuration registers
410–411
CPU
395
data memory
396
goto instructions
410
indirect addressing in
407–408
oscillator inputs
399
power supply connections
396–397
Program Counter
396, 409–410
program memory
395–396
program memory map
408–409
Special Function Registers
407
Status register
399–400
sub-family
396
ADC of
438–440
basis of
393
instruction set of
400–405, 636–639
interrupts:
context saving with
418
global enabling
415–416
interrupt registers
416–418
interrupt sources
413–415
overall interrupt prioritisation enabling
415
PIE1/PIR1/IPR1
419
PIE2/PIR2/IPR2
420
peripherals of
430–431
power supply
421
power-up and reset
421
principal characteristics of
394–395
serial modules of
437
stacks
411
automatic functions
412
Fast Register Stack
412–413
programmer access to
412
Return Address Stack
412
timers of
432
18FXX20 Timer 0
433–434
18FXX20 Timer 1 and
2, 434
18FXX20 Timer
3, 435
PIC 18F2420:
Access RAM concept
405
block diagram for
398
CCP modules of
436–437
clock sources and selection possibilities of
422–423
HSPLL oscillator mode
423
power-managed modes
423–424
data memory map of
405, 406
Derbot loaded with
440
introductory programming with:
applying interrupts
428–430
Fibonacci series
425–427
using MPLAB IDE
425
pin diagrams for
397
PIC 18F4520:
block diagram for
398
pin diagrams for
397
PIC microcontrollers
371
and CAN
582–583
and IR data communication
578
and LIN
585–586
and radio connectivity
580–581
and USB
587–588
PIC mid-range family:
16F84A
31
family overview
27–30
upgrades
31
PIC24F family:
block diagram of
592, 594
data memory map of
597–598
interrupt vector table of
596–597
program memory map of
596–597
PIC-based Zigbee implementation
580–581
PICkit pod
103
PIC 16F87XA ADC module:
acquisition time calculation
353–354
ADC control possibilities:
conversion initiation
351
formatting result
351, 352
input channels, configuring and selecting
351
setting conversion speed
349–351
switching on
348–349
analog input model:
signal path
351
signal source
352
switch resistance
353
conversion time of
354
external voltage reference
347
input multiplexer
347
operation of
349
PICSTART Plus programmer
102
PICSTART programmer
101–103
Piezo-electric sounder
7
Pin 4 – MCLR
31
Ping-pong code
136–138
Ping-pong program:
hardware-generated delays
162–163
main play state
138
object or event counting
160–161
opening section, and memory allocation
136–138
structure
135–136
tutorial
139–141
wait state
138
‘Ping-pong,’electronic
6–7
Port A, 16F84A
63
Port B, 16F84A
61–63
Port Select
53
PORTB register
61
Power consumption:
power down (sleep) current and
379
strategies for reduction of
378
Power down (Sleep) current and power consumption
379
Power supply:
of 18LFXX20 and 18FXX20
421
connections for microcontroller
396
of PIC24 series
600–602
Power-on Reset mode, of 16F84A
46
Powertip PC0802-A display
230
Power-up Timer
45
Prioritised pre-emptive scheduling
535–536
Priority inversion
538
Processor-specific header files:
assembler utilities in
520
SFR definitions
519
Program Counter
20, 151
of 18F2X20 microcontrollers
409–410
Program memory
10
Program memory map:
of 18F2X20 microcontrollers
408–409
of PIC24FJ64GA004
596
Program Space Visibility (PSV)
598–599
Programs:
Assembler complexities
132–135
branching
110–111
breakpoints
140–141
Fibonacci series
143
flow diagrams
108–109
generation of time delays and intervals
117–121
indirect addressing
142–143
logical instructions
125–127
look-up table
128–132
ping-pong
135–141
running of
140
single-stepping
140
state diagrams
109–110
subroutines
115–117
working with bits
111–112
working with status register bits
112–115
Project Manager
86
Project Wizard
88
Protocol:
definition of
576
stack
577
Pull-up resistors
216–217
Pulse width modulation (PWM):
16F87XA
271–273
controlling microcontroller peripherals through
479–480
in the Derbot for motor control
273–276
library functions
480
memory functions and branching
280
principles
269–271
in software
276–279
used for digital-to-analog conversion
280–283
R
Radio connectivity:
Bluetooth
579–580
PIC microcontrollers
580–581
Zigbee
580–581
RAM Addr
20
RAM (Random Access Memory)
10
RC – resistor–capacitor, frequency of oscillation
67
RC oscillator
350–351
RC time constant
44
Read/Write control
53
Real time concept:
Derbot light-seeking program and
527–528
Real-time operating system (RTOS):
functions of
532
overhead
570–571
program written for
532
Salvo
scheduling:
cooperative
536
cyclic
532–533
prioritised pre-emptive
535–536
role of interrupts in
536
round-robin
533
task states
534–535
simulation, setting breakpoints for
552–553
tasks:
defining
537
setting priority of
537–538
writing
537
Reduced Function Device (RFD)
580
Reduced Instruction Set Computer (RISC)
10
approach
393
processor
81
Register files
79
Reset input, 16F84A
44–45
Retfie instruction
149
Retlw instructions
128
Return Address Stack
412
Return instruction
141
ROM (Read-Only Memory)
10
Round-robin scheduling and context switching
533
Rtmot_fwd subroutine
253
S
Salvo Lite
551
Salvo RTOS:
build using
551–552
with C18 compiler
544–545
configuring
543–545, 550
development of
541
features of
542
message signal
561–562
programming with:
initialisation and scheduling
545–546
Salvo task
547
standard libraries of
544
using binary semaphore
558–559
using delay
557–558
using interrupts
556
versions and references
543
Salvo-based program
548
interrupt-based clock tick
553–555, 556–557
main function of
549
with message signal
562–570
running of
561
Salvo/C18 project
550
salvo.h.
547
simulation of
552–553, 559–560, 570
tasks and scheduling
549
Sample and hold (S&H) circuit:
acquisition time
345–346
leakage from capacitor
345
schematic representation of
344
series resistance in signal path
345
Sample_no memory location
129
Scheduling:
cooperative
536
cyclic
532–533
prioritised pre-emptive
535–536
role of interrupts in
536
round-robin
533
task states
534–535
Schmitt trigger
239
buffer
65
inputs
56–57
Semaphore
538–539
Semiconductor temperature sensors
368
Sequential programming:
‘clock tick’ for program activity synchronisation
530
definition of
528
general-purpose operating system using
530–531
limits of
531
super loop evaluation
528–529
time-triggered and event-triggered tasks
529
using interrupts for prioritisation
529–530
Serial communication
296–297
SetDCPWMx( ) function
479
Signal conditioning:
amplification
344
filtering
344
Signal conversion process
346
Simulating Program:
getting started
93
graphical
141–142
ping-pong
139–141
resetting and running function
93–95
viewing microcontrollers
93
see alsoprograms
Single-pole, double-throw (SPDT) switch
58
Single-pole, single-throw (SPST) switch
58
Slave Select (SS)
300
Sleep mode
164–165
Software simulator
86
Source Code
79, 86
Special Function Registers (SFRs)
176
SPI (Serial Peripheral Interface)
299–300
16F87XA MSSP module
301–305
example
305–307
limitations
307
SSPBUF buffer register
305
SSPSR register
305
Stack and Program Counter
177
Stack in PIC 18 Series microcontrollers
411–413
Stand-alone ‘programmer,’
79
Standard Library
452
StartI2C( ) function
496
Statements
446–447
Steering of wheel, in embedded vehicle
7
Stopwatch reading
122–123, 141
Subroutine table
129
Successive approximation ADC
342
Switch debouncing, of PIC 16F873A
241–242
Switches, of parallel port
57–61
Synchronising serial data
326
Synchronous data communication:
basics
297–299
Microwire
299–300
multiple modes
300
serial I/O
299
SPI (Serial Peripheral Interface)
299–300
T
Tasks:
defining
537
setting priority of
537–538
writing
537
Text Editor
86
Thevenin equivalent circuit
56
Time-out Reset mode, of 16F84A
46
Timer:
16F883
384
18FXX20 Timer 0
433–434
18FXX20 Timer 1 and
2, 434
18FXX20 Timer
3, 435
controlling microcontroller peripherals through
476, 479
Time-triggered tasks
530
Timing diagram, output
156–157
Trace function
124–125
Track and hold circuit
Transducers, output signals of
340
Transistor Transistor Logic (TTL)
236
TRIS latch
61–62
‘TRIS’ register
189
TRIS register bit
99
TTL (Transistor Transistor Logic) logic family
68–69
TXSTA register
334
U
Ultra-low-power wake-up (ULPWU)
380
Ultrasonic object sensor
236, 289
Ultrasound detector
7
Ultrasound test program
365
USB On-the-Go standard
588
USB (Universal Serial Bus):
4-wire interconnection
586
concept of
586–587
specifications
586
using PIC microcontrollers with
587–588
V
Volatile memory
10
Voltmeter:
Derbot assembly for
366
input terminals for
367
Von Neumann structure
128
W
W register
129
Watchdog Timer (WDT)
21, 435–436
16F84A
164
Reset
164
Sleep mode
164–165
wake-up
164
Working register (‘W Reg’)
19
WriteI2C( ) function
496
X
XT – crystal configuration
67
Z
Zero Insertion Force (ZIF) socket
103
Zigbee
580–581
ZVN4306A
246–247