0
|
INTRODUCTION TO COMPUTING
|
1
|
|
Section 0.1: Numbering and coding systems |
2 |
''
|
''
|
''
|
|
Section 0.2: Digital primer |
8 |
''
|
''
|
''
|
|
Section 0.3: Inside the computer |
12 |
1
|
THE 8051 MICROCONTROLLERS
|
19
|
|
Section 1.1: Microcontrollers and embedded processors |
20 |
''
|
''
|
''
|
|
Section 1.2: Overview of the 8051 family |
23 |
2
|
8051 ASSEMBLY LANGUAGE PROGRAMMING
|
29
|
|
Section 2.1: Inside the 8051 |
30 |
''
|
''
|
''
|
|
Section 2.2: Introduction to 8051 Assembly programming |
32 |
''
|
''
|
''
|
|
Section 2.3: Assembling and running an 8051 program |
34 |
''
|
''
|
''
|
|
Section 2.4: The program counter and ROM space in the 8051 |
35 |
''
|
''
|
''
|
|
Section 2.5:8051 data types and directives |
38 |
''
|
''
|
''
|
|
Section 2.6:8051 flag bits and the PSW register |
40 |
''
|
''
|
''
|
|
Section 2.7:8051 register banks and stack |
43 |
3
|
JUMP, LOOP, AND CALL INSTRUCTIONS
|
55
|
|
Section 3.1: Loop and jump instructions |
56 |
''
|
''
|
''
|
|
Section 3.2: Call instructions |
60 |
''
|
''
|
''
|
|
Section 3.3: Time delay for various 8051 chips |
65 |
4
|
I/O PORT PROGRAMMING
|
75
|
|
Section 4.1:8051 I /O programming |
76 |
''
|
''
|
''
|
|
Section 4.2: I /O bit manipulation programming |
80 |
5
|
8051 ADDRESSING MODES
|
89
|
|
Section 5.1: Immediate and register addressing modes |
90 |
''
|
''
|
''
|
|
Section 5-2: Accessing memory using various addressing modes |
91 |
''
|
''
|
''
|
|
Section 5.3: Bit addresses for I /O and RAM |
100 |
''
|
''
|
''
|
|
Section 5.4: Extra 128-byte on-chip RAM in 8052 |
107 |
6
|
ARITHMETIC, LOGIC INSTRUCTIONS, AND PROGRAMS
|
115
|
|
Section 6.1: Arithmetic instructions |
116 |
''
|
''
|
''
|
|
Section 6.2: Signed number concepts and arithmetic operations |
124 |
''
|
''
|
''
|
|
Section 6.3: Logic and compare instructions |
129 |
''
|
''
|
''
|
|
Section 6.4: Rotate instruction and data serialization |
135 |
''
|
''
|
''
|
|
Section 6.5: BCD, ASCII, and other application programs |
141 |
7
|
8051 PROGRAMMING IN C
|
153
|
|
Section 7.1: Data types and time delay in 8051 C |
154 |
''
|
''
|
''
|
|
Section 7.2: I /O programming in 8051 C |
160 |
''
|
''
|
''
|
|
Section 7.3: Logic operations in 8051 C |
165 |
''
|
''
|
''
|
|
Section 7.4: Data conversion programs in 8051 C |
169 |
''
|
''
|
''
|
|
Section 7.5: Accessing code ROM space in 8051 C |
173 |
''
|
''
|
''
|
|
Section 7.6: Data serialization using 8051 C |
178 |
8
|
8051 HARDWARE CONNECTION AND INTEL HEX FILE
|
183
|
|
Section 8.1: Pin description of the 8051 |
184 |
''
|
''
|
''
|
|
Section 8.2: Design and test of DS89C4xO trainer |
188 |
''
|
''
|
''
|
|
Section 8.3: Explaining the Intel hex file |
195 |
9
|
8051 TIMER PROGRAMMING IN ASSEMBLY AND C
|
201
|
|
Section 9.1: Programming 8051 timers |
202 |
''
|
''
|
''
|
|
Section 9.2: Counter programming |
217 |
''
|
''
|
''
|
|
Section 9.3: Programming timers 0 and 1 in 8051 C |
222 |
10
|
8051 SERIAL PORT PROGRAMMING IN ASSEMBLY AND C
|
237
|
|
Section 10.2: 8051 connection to RS232 |
242 |
''
|
''
|
''
|
|
Section 10.1: Basics of serial communication |
238 |
''
|
''
|
''
|
|
Section 10.3: 8051 serial port programming in Assembly |
244 |
''
|
''
|
''
|
|
Section 10.4: Programming the second serial port |
255 |
''
|
''
|
''
|
|
Section 10.5: Serial port programming in C |
261 |
11
|
INTERRUPTS PROGRAMMING IN ASSEMBLY AND C
|
271
|
|
Section 11.1: 8051 interrupts |
272 |
''
|
''
|
''
|
|
Section 11.2: Programming timer interrupts |
275 |
''
|
''
|
''
|
|
Section 11.3: Programming external hardware interrupts |
279 |
''
|
''
|
''
|
|
Section 11.4: Programming the serial communication interrupt |
284 |
''
|
''
|
''
|
|
Section 11.5: Interrupt priority in the 8051/52 |
288 |
''
|
''
|
''
|
|
Section 11.6: Interrupt programming in C |
290 |
12
|
LCD AND KEYBOARD INTERFACING
|
299
|
|
Section 12.1: LCD interfacing |
300 |
''
|
''
|
''
|
|
Section 12.2: Keyboard interfacing |
311 |
13
|
ADC, DAC, AND SENSOR INTERFACING
|
321
|
|
Section 13.1: Parallel and serial ADC |
322 |
''
|
''
|
''
|
|
Section 13.2: DAC interfacing |
344 |
''
|
''
|
''
|
|
Section 13.3: Sensor interfacing and signal conditioning |
348 |
14
|
8051 INTERFACING TO EXTERNAL MEMORY
|
355
|
|
Section 14.1: Semiconductor memory |
356 |
''
|
''
|
''
|
|
Section 14.2: Memory address decoding |
364 |
''
|
''
|
''
|
|
Section 14.3: 8031 /51 interfacing with external ROM |
367 |
''
|
''
|
''
|
|
Section 14.4: 8051 data memory space |
371 |
''
|
''
|
''
|
|
Section 14.5: Accessing external data memory in 8051 C |
381 |
15
|
8051 INTERFACING WITH THE 8255
|
389
|
|
Section 15.1: Programming the 8255 |
390 |
''
|
''
|
''
|
|
Section 15.2: 8255 interfacing |
397 |
''
|
''
|
''
|
|
Section 15.3: 8051 C programming for the 8255 |
402 |
16
|
DS12887 RTC INTERFACING AND PROGRAMMING
|
407
|
|
Section 16.1: DS12887 RTC interfacing |
408 |
''
|
''
|
''
|
|
Section 16.2: DS12887 RTC programming in C |
415 |
''
|
''
|
''
|
|
Section 16.3: Alarm, SQW, and IRQ features of the DS12887 chip |
417 |
17
|
MOTOR CONTROL: RELAY, PWM, DC, AND STEPPER MOTORS
|
427
|
|
Section 17.1: Relays and optoisolators |
428 |
''
|
''
|
''
|
|
Section 17.2: Stepper motor interfacing |
432 |
''
|
''
|
''
|
|
Section 17.3: DC motor interfacing and PWM |
441 |
A
|
8051 INSTRUCTIONS, TIMING, AND REGISTERS
|
453
|
|
APPENDIX A: 8051 INSTRUCTIONS, TIMING, AND REGISTERS |
453 |
B
|
BASICS OF WIRE WRAPPING
|
487
|
|
APPENDIX B: BASICS OF WIRE WRAPPING |
487 |
C
|
IC TECHNOLOGY AND SYSTEM DESIGN ISSUES
|
491
|
|
APPENDIX C: IC TECHNOLOGY AND SYSTEM DESIGN ISSUES |
491 |
''
|
''
|
''
|
|
APPENDIX C: IC TECHNOLOGY AND SYSTEM DESIGN ISSUES |
491 |
D
|
FLOWCHARTS AND PSEUDOCODE
|
509
|
|
APPENDIX D: FLOWCHARTS AND PSEUDOCODE |
509 |
E
|
8051 PRIMER FOR X86 PROGRAMMERS
|
513
|
|
APPENDIX E: 8051 PRIMER FOR X86 PROGRAMMERS |
513 |
F
|
ASCII CODES
|
514
|
|
APPENDIX F: ASCII CODES |
514 |
G
|
ASSEMBLERS, DEVELOPMENT RESOURCES, AND SUPPLIERS
|
517
|
|
APPENDIX G: ASSEMBLERS, DEVELOPMENT RESOURCES, AND SUPPLIERS |
517 |
H
|
DATA SHEETS
|
519
|
|
APPENDIX H: DATA SHEETS |
519 |
-
|
INDEX
|
545
|
|
INDEX |
545 |