Page 19 - Introduction to Microcontrollers Architecture, Programming, and Interfacing of The Motorola 68HC12
P. 19
List of Figures xvii
Figure 9.1 A Simple Program 254
Figure 9.2 AC Program with Local and Global Variables 258
Figure 9.3 AC Program with Some Operators 260
Figure 9.4 AC Program with Incrementing and Decrementing 262
Figure 9.5 AC Program with ORing, ANDing and Shifting 264
Figure 9.6 A Program with Boolean Operators 266
Figure 9.7 A Program with If-Then Expressions 269
Figure 9.8 Assembly Language for a Decision Tree 270
Figure 9.9 Alternative Assembly Language for a Case Statement 273
Figure 9.10 For, While, and Do While Loops 274
Figure 9.11 Array Manipulation Program 276
Figure 9.12 Clearing a Vector with a Do While Loop 277
Figure 9.13 A Program Setting and Testing a Bit 278
Figure 9.14 A Subroutine to Raise a Number to a Power 280
Figure 9.15 Stack for power Procedure 280
Figure 9,16 An Object and Its Pointers 281
Figure 10.1 A Vector Z 292
Figure 10.2 A Histogram 294
Figure 10.3 An Array 295
Figure 10.4 Subroutine ZTRANS 297
Figure 10.5 Deque Data Structure 301
Figure 10.6 Buffer for a Deque Wrapped on a Drum 301
Figure 10.7 Subroutines for Pushing and Pulling B from the Top of the Deque 303
Figure 10.8 Picture of the Tree Representing the String (12) 304
Figure 10.9 Linked List Representation of the Tree Shown in Figure 10.8 305
Figure 10.10 Path for Scanning the Tree 306
Figure 10.11 Flowchart for Scanning Tree 307
Figure 10.12 Subroutine SCAN Using Indexes 308
Figure 10.13 Linked List Data Structure for SCAN 308
Figure 10.14 Subroutine SCAN Using Address Pointers 309
Figure 11.1 Simplified Diagram of a Microcomputer 317
Figure 11.2 A Memory and Its Connection to the MPU 318
Figure 11.3 Some 6812 Parallel I/O Ports 320
Figure 11.4 Simple Devices 322
Figure 11.5 A Traffic Light 323
Figure 11.6 Row Charts for Programmed I/O 324
Figure 11.7 The Counter/Timer Subsystem 325
Figure 11.8 Status Port 328
Figure 11.9 Interrupt Request Path 330
Figure 11.10 D-to-A Converter 335
Figure 11.11 A-to-D Subsystem of the ' A4 or 'B32 336
Figure 11.12 Frame Format for UART Signals 337
Figure 11.13 6812 Serial Communication Interface 338
Figure 11.14 Parallel Output Port of the A4 or 'B32 341
Figure 11.15 Parallel Input Port of the 'A4 or 'B32 341