Microcontroller programming: the Microchip PIC
Gespeichert in:
Hauptverfasser: | , |
---|---|
Format: | Buch |
Sprache: | English |
Veröffentlicht: |
Boca Raton, Fla. [u.a.]
CRC Press
2007
|
Schlagworte: | |
Online-Zugang: | Beschreibung für Leser Inhaltsverzeichnis |
Beschreibung: | XVII, 804 S. Ill., graph. Darst. |
ISBN: | 9780849371899 |
Internformat
MARC
LEADER | 00000nam a2200000zc 4500 | ||
---|---|---|---|
001 | BV023801647 | ||
003 | DE-604 | ||
005 | 20090426000000.0 | ||
007 | t | ||
008 | 070821s2007 ad|| |||| 00||| eng d | ||
020 | |a 9780849371899 |9 978-0-8493-7189-9 | ||
035 | |a (OCoLC)255681681 | ||
035 | |a (DE-599)BVBBV023801647 | ||
040 | |a DE-604 |b ger | ||
041 | 0 | |a eng | |
049 | |a DE-634 | ||
082 | 0 | |a 629.8955265 | |
100 | 1 | |a Sanchez, Julio |e Verfasser |4 aut | |
245 | 1 | 0 | |a Microcontroller programming |b the Microchip PIC |c Julio Sanchez ; Maria P. Canton |
264 | 1 | |a Boca Raton, Fla. [u.a.] |b CRC Press |c 2007 | |
300 | |a XVII, 804 S. |b Ill., graph. Darst. | ||
336 | |b txt |2 rdacontent | ||
337 | |b n |2 rdamedia | ||
338 | |b nc |2 rdacarrier | ||
650 | 0 | 7 | |a Mikrocontroller |0 (DE-588)4127438-6 |2 gnd |9 rswk-swf |
650 | 0 | 7 | |a Maschinencode |0 (DE-588)4169002-3 |2 gnd |9 rswk-swf |
650 | 0 | 7 | |a PICmicro |0 (DE-588)4571742-4 |2 gnd |9 rswk-swf |
689 | 0 | 0 | |a Mikrocontroller |0 (DE-588)4127438-6 |D s |
689 | 0 | 1 | |a Maschinencode |0 (DE-588)4169002-3 |D s |
689 | 0 | 2 | |a PICmicro |0 (DE-588)4571742-4 |D s |
689 | 0 | |5 DE-604 | |
700 | 1 | |a Canton, Maria P. |e Verfasser |4 aut | |
856 | 4 | |u http://www.loc.gov/catdir/enhancements/fy0703/2006050867-d.html |3 Beschreibung für Leser | |
856 | 4 | 2 | |m GBV Datenaustausch |q application/pdf |u http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=017443846&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |3 Inhaltsverzeichnis |
999 | |a oai:aleph.bib-bvb.de:BVB01-017443846 |
Datensatz im Suchindex
_version_ | 1804138999800922112 |
---|---|
adam_text | IMAGE 1
MICROCONTROLLER
PROGRAMMING THE MICROCHIP PIC JULIO SANCHEZ MINNESOTA STATE UNIVERSITY,
MANKATO
MARIA P. CANTON SOUTH CENTRAL COLLEGE, NORTH MANKATO, MINNESOTA
S * * * *. ; .:* . : Y .
* . . * - L. J . * I; F L Y- :*. , R . .
. - . . * - .- *I. V * = * - * I * - , - ..
IV * ** * - * * , * * * .-
@
CRC PRESS TAYLOR & FRANCIS G R O UP BOCA RATON LONDON NEW YORK CRC PRESS
IS AN IMPRINT OF THE TAYLOR & FRANCIS GROUP, AN INFORMA BUSINESS
IMAGE 2
TABLE OF CONTENTS
PREFACE * . XV
CHAPTER 1 - BASIC ELECTRONICS 1
1.0 THE ATOM 1
1.1 ISOTOPES AND IONS 2
1.2 STATIC ELECTRICITY 3
1.3 ELECTRICAL CHARGE 4
1.3.1 VORTAGE 4
1.3.2 CURRENT 4
1.3.3 POWER ..,, 5
1.3.4 OHM S LAW 5
1.4 ELECTRICAL CIRCUITS 6
14.1 TYPES OF CIRCUITS 6
1.5 CIRCUIT ELEMENTS 8
1.5.1 RESISTORS 9
1.5.2 REVISITING OHM S LAW 9
.: 1.5.3 RESISTORS IN SERIES AND PARALLEL 10
1.5.4 CAPACITORS 12
1.5.5 CAPACITORS IN SERIES AND IN PARALLEL 13
1.5.6 INDUCTORS F _.^ ....... 14
1.5.7 TRANSFORMERS 15
1.6 SEMICONDUCTORS 15
1.6.1 INTEGRATED CIRCUITS 16
1.6.2 SEMICONDUCTOR ELECTRONICS 16
1.6.3 P-TYPE AND N-TYPE SILICON 17
1.6.4 THE DIODE 17
CHAPTER 2 - NUMBER SYSTEMS 19
2.0 COUNTING 19
2.0.1 THE TALLY SYSTEM 19
2.0.2 ROMAN NUMERAIS 20
2.1 THE ORIGINS OF THE DECIMAL SYSTEM 20
2.1.1 NUMBER SYSTEMS FOR DIGITAL-ELECTRONICS 22
2.1.2 POSITIONAL CHARACTERISTICS 22
2.1.3 RADIX OR BASE OF A NUMBER SYSTEM 23
IMAGE 3
VI
MICROCONTROLLER PROGRAMMING
2.2 TYPES OF NUMBERS V ... -. * - * , S * ,, , ; 23
2.2.1 WHOLE NUMBERS : - * * ** * ** * 24
2.2.2 SIGNED NUMBERS 24
2.2.3 RATIONAL, IRRATIONAL, AND IMAGINARY NUMBERS 24
2.3 RADIX REPRESENTATIONS 25
2.3.1 DECIMAL VERSUS BINARY NUMBERS 25
2.3.2 HEXADECIMAL AND OCTAL 26
2.4 NUMBER SYSTEM CONVERSIONS 27
2.4.1 BINARY-TO-ASCIL-DECIMAL 28
2.4.2 BINARY-TO-HEXADECIMAL CONVERSION 29
2.4.3 DECIMAL-TO-BINARY CONVERSION 29
CHAPTER 3 - DATA TYPES AND DATA STORAGE 33
3.0 ELECTRONIC-DIGITAL MACHINES 33
3.1 CHARACTER REPRESENTATIONS *-...-**-, - U ^ :.- 33
3.1.1 ASCII . * * ** .. - ... ^ 34
3.1.2 EBCDIC AND IBM - * .*----I 36
3.1.3 UNICODE 36
3.2 STORAGE AND ENCODING OF INTEGERS 37
3.2.1 SIGNED AND UNSIGNED REPRESENTATIONS 37
3.2.2 WORDSIZE ;; 38
3.2.3 BYTE ORDERING / V 39
3.2.4 STGN-MAGNITUDE REPRESENTATION F 40
3.2.5 RADIX COMPLEMENT REPRESENTATION R * 41
3.3 ENCODING OF FRACTIONAL NUMBERS J 44
3.3.1 FIXED-POINT REPRESENTATIONS J - - 45
3.3.2 FLOATING-POINT REPRESENTATIONS 46
3.3.3 STANDARDI2ED FLOATING-POINT REPRESENTATIONS ..**-. - * -* 47
3.3.4 IEEE 754 SINGLE FORMAT 48
3.3.5 ENCODING AND DECODING FLOATING-POINT NUMBERS .- 50
3.4 BINARY-CODED DECIMALS (BCD) * 51
3.4.1 FLOATING-POINT BCD -^ 52
CHAPTER 4 - DIGITAL LOGIC, ARITHMETIC, AND CONVERSIONS 55
4.0 MICROCONTROLLER LOGIC AND ARITHMETIC 55
4.0.1 CPU FLAGS . ; ** .*-.., Y _^- 55
4.0.2 W O R D S I ZE 56
4.1 LOGICAL INSTRUCTIONS 56
4.1.1 LOGREAL AND 57
4.1.2 LOGICAL OR 57
4.1.3 LOGICAL XOR , * * * ,. ,, 57
4.1.4 LOGICAL NOT - ( :;? * / S * * * 58
4.2 MICROCONTROLLER ARITHMETIC .- , : 58
4.2.1 UNSIGNED AND TWO S COMPLEMENT ARITHMETIC .0 58
4.2.2 OPERATIONS ON DECIMAL NUMBERS 60
4.3 BIT MANIPULATIONS AND AUXILIARY OPERATIONS *.-.-. V. -**- : 62
4.3.1 BIT SHIFT AND ROTATE --.* .., * 62
4.3.2 COMPARISON OPERATIONS ****-.*.** . 63
4.3.3 OTHER SUPPORT OPERATIONS . , - , . * * * * . ., 63
IMAGE 4
CONTENTS
VU
4.4 UNSIGNED BINARY ARITHMETIC 64
4.4.1 MULTI-BYTE UNSIGNED ADDITION 64
4.4.2 UNSIGNED MULTIPLICATION 65
4.4.3 UNSIGNED DIVISION 67
; 4.5 SIGNED BINARY ARITHMETIC 67
4.5.1 OVERFLOW DETECTION IN SIGNED ARITHMETIC 69
4.5.2 SIGN EXTENSION OPERATIONS 70
4.5.3 MULTI-BYTE SIGNED OPERATIONS 71
4.6 DATA FORMAT CONVERSIONS 72
4.6.1 BCD DIGITS TO ASCII DECIMAL 72
4.6.2 UNSIGNED BINARY TO ASCII DECIMAI DIGITS 73
4.6.3 ASCII DECIMAL STRING TO UNSIGNED BINARY 73
4.6.4 UNSIGNED BINARY TO ASCII HEXADECIMAL DIGITS 75
4.6.6 SIGNED NUMERICAL CONVERSIONS 76
CHAPTER 5 - CIRCUITS AND LOGIC GATES 77
5,0 DIGITAL CIRCUITS 77
~ 5.1 THE DIODE REVISITED 78
,: 5.1.1 THE LIGHT-EMITTING DIODE (LED) 79
5.2 THE TRANSISTOR 81
5.2.1 BIPOLAR TRANSISTOR 81
I 5.2.2 MOS TRANSISTOR * 83
. 5.3 LOGIC GATES 84
; 5.4 TRANSISTOR-TRANSISTOR LOGIC 85
5.4.1 INVERTER GATES 86
:T 5,4.2 THE AND GATE 87
:*. 5.4.3 THE NAND GATE 87
:*.:- 5.4.4 THE OR GATE 88
..R 5.4.5 THE NOR GATE 88
T .. 5.4.6 POSITIVE AND NEGATIVE LOGIC 89
5.4.7 THEXOR GATE 90
5.4.8 SCHMITT TRIGGER INVERTER 91
5.5 O T H E R T TL LOGIC FAMILIES 93
5.6 CMOS LOGIC GATES 93
CHAPTER 6 - CIRCUIT COMPONENTS 95
6.0 POWER SUPPLIES ;T V ******- 95
6.1 CLOCKED LOGIC AND FLIP-FTOPS 96
6.1.1 THE RS FLIP-FLOP . . . * * : , , : - . ** 96
6.1.2 CLOCKED RS FLIP-FLOP 98
..;* / 6.1.3 THED FLIP-FLOP 99
, ; 6.1.4 THE EDGE-TRIGGERED D FLIP-TLOP 100
, ! ; 6.1.5 PRESET AND CLEAR SIGNALS 101
6,1.6 D FLIP-FLOP WAVEFORM ACTION 102
6.1.7 FLIP-FLOP APPLICATIONS - 103
6.2 CLOCKS 103
6.2.1 CLOCK WAVEFORMS 104
6.2.2 THE TTL CLOCK 105
C -- 6.2.3 THE555TIMER : 106
IMAGE 5
V L LL
MICROCONTROLLER PROGRAMMING
6.2.4 MICROCONTROLLER CLOCKS 106
6.3 FREQUENCY DIVIDERS AND COUNTERS 107
6.3.1 FREQUENCY DIVIDERS 107
6.3.2 THE JK FLIP-HOP COUNTER 107
6.3.3 RIPPLE COUNTERS 108
6.3.4 DECODING GATES 110
6.3.5 SYNCHRONOUS COUNTERS 110
6.3.6 COUNTER ICS 112
6.3.7 SHIFT REGISTERS 113
6.4 MULTIPLEXERS AND DEMULTIPLEXERS 115
6.4.1 MULTIPLEXERS 115
6.4.2 DEMULTIPLEXERS 118
6.4.3 MULTIPLEXER AND DEMULTIPLEXER ICS 118
6.5 INPUT DEVICES 118
6.5.1 SWITCHES 118
6.5.2 SWITCH CONTACT BOUNCE 120
6.5.3 KEYPADS 121
6.6 OUTPUT DEVICES 122
6.6.1 SEVEN-SEGMENT LED 122
6.6.2 LIQUID CRYSTAL DISPLAYS 124
6.6.3 LCD TECHNOLOGIES 125
CHAPTER 7 - THE MICROCHIP PIC 129
7.0 THE PICMICRO MICROCONTROLLER 129
7.0.1 PROGRAMMING THE PIC 130
PIC PROGRAMMERS 131
DEVELOPMENT BOARDS 131
7.0.2 PROTOTYPING THE PIC CIRCUIT 132
7.1 PIC ARCHITECTURE 134
7.1.1 BASELINE PIC FAMILY 134
PIC10 DEVICES 135
P1C12 DEVICES 135
PIC14 DEVICES 138
7.1.2 MID-RANGE PIC FAMILY 138
PIC16 DEVICES 139
7.1.3 HIGH-PERFORMANCE PIC FAMILY 139
PIC18 DEVICES 139
CHAPTER 8 - MID-RANGE PIC ARCHITECTURE 141
8.0 PROCESSOR ARCHITECTURE AND DESIGN 142
8.0.1 HARVARD ARCHITECTURE 142
8.0.2 RISC CPU DESIGN 143
8.0.3 SINGLE-WORD INSTRUCTIONS 143
8.0.4 INSTRUCTION FORMAT 144
8.0.5 MID-RANGE DEVICE VERSIONS 145
8.1 THE MID-RANGE CORE FEATURES 145
8.1.1 OSCIILATOR 145
8.1.2 SYSTEM RESET 147
8.1.3 INTERRUPTS 148
8.2 MID-RANGE CPU AND INSTRUCTION SET 149
IMAGE 6
CONTENTS
IX
8.2.1 MID-RANGE INSTRUCTION SET . 149
8.2.2 STATUS AND OPTION REGISTERS 151
8.3 EEPROM DATA STORAGE 153
8.3.1 EEPROM IN MID-RANGE PICS 153
8.4 DATA MEMORY ORGANIZATION 154
: S . 8.4.1 THE W REGISTER 154
.- [ * 8.4.2 THE DATA REGISTERS . .. 154
MEMORY BANKS 154
THESFRS 155
; ; THEGPRS 157
8.4.3 INDIRECT AD DRESSIN G 158
. 8.5 MID-RANGE I/O AND PERIPHERAL MODULES 158
8.5.1 I/O PORTS 159
8.5.2 TIMER MODULES 160
8.5.3 CAPTURE-AND-COMPARE MODULE 160
* :; 8.5.4 MASTER SYNCHRONOUS SERIAL PORT (MSSP) MODULE 161
* 8.5.5 USART MODULE 161
8.5.6 A/D MODULE 161
CHAPTER 9 - PIC PROGRAMMING: TOOLS AND TECHNIQUES 163
9.0 MICROCHIP S MPLAB 163
9.0.1 EMBEDDED SYSTEMS 164
9.1 INTEGRATED DEVELOPMENT ENVIRONMENT 165
9.1.1 INSTALLING MPLAB 165
9.1.2 CREATINGTHE PROJECT 167
9.1.3 PROJECT BUILD OPTIONS 169
].;* 9.1.4 BUILDING THE PROJECT 169
9.2 SIMULATORS AND DEBUGGERS .. V 170
9.2.1 MPLAB SIM 171
.;. ;. : 9.2.2 MPLAB HARDWARE DEBUGGERS 172
9.2.3 A QUICK-AND-DIRTY DEBUGGER 174
9.3 PROGRAMMERS 174
9.4 ENGINEERING PIC SOFTWARE 175
9.4.1 USING PROGRAM COMMENTS 176
PROGRAM HEADER 176
COMMENTED BANNERS *; *,* * .,, 177
* / COMMENTED BITMAPS 178
.,:-:*: 9.4.2 DEFINING DATA ELEMENTS , 179
THE CBLOCK DIRECTIVE 179
9.4.3 BANKING TECHNIQUES 180
V THE BANKSEI DIRECTIVE 180
I;R-. BANK SELECTION MACROS 180
, .- DEPRECATED BANKING INSTRUCTIONS 181
9.4.4 PROCESSOR AND CONFIGURATION CONTROLS 182
CONFIGURATION BITS 182
9.4.5 NAMING CONVENTIONS 184
9.4.6 ERRORLEVEL DIRECTIVE 186
9.5 PSEUDO INSTRUCTIONS 186
IMAGE 7
X
MICROCONTROLLER PROGRAMMING
CHAPTER 10 - PROGRAMMING ESSENTIAIS: INPUT AND OUTPUT 189
10.0 16F84A PROGRAMMING TEMPLATE ; , . , T I ; . 189
10.1 INTRODUCING THE 16F84A *.,.. ,,...,.,.-/ -* ..- .. V,,- 191
10.1.1 TEMPLATE CIRCUIT FOR 16F84A . , , ^. !./..,, . . .. . V 1 91
10.1.2 POWER SUPPLIES * ;: . 1 91
VOLTAGE REGULATOR .; / , 1 92
10.1.3 COMPARISONS IN PIC PROGRAMMING ~ : ? 193
THE INFAMOUS PIC CARRY FLAG * I ; / ; 194
10.2 SIMPLE CIRCUITS AND PROGRAMS 194
10.2.1 A SINGLE LED CIRCUIT , : . . . ...... ; ,, 194
LED FLASHER PROGRAM . , , , 196
10.2.2 LED/PUSHBUTTON CIRCUIT ; M: ^ * : S T- * -:-; :;:-*; I GG
10.2.3 MULTIPLE LED CIRCUIT / ; 202
10.3 PROGRAMMING THE SEVEN-SEGMENT LED ,L 204
10.4 A DEMONSTRATION BOARD . , * * -* * ,, -**.: - 2 06
10.4.1 PCB IMAGES FOR DEMO BOARD * . . *** F * .. 206
10.4.2 TESTDEMOL PROGRAM ** * ,I . - : * *;* S ^ 2 08
CHAPTER 11 - INTERRUPTS ? * UEKR ^: S ? 2 11
11.0 INTERRUPTS ON THE 16F84 . . .., V ..- 211
11.0.1 THE INTERRUPT CONTROL REGISTER ,/, . *. . .,,. . , : . , 211
11.0.2 THE OPTION REGISTER ^ ] ... 212
11.1 INTERRUPT SOURCES ^. . .. ., 213
11.1.1 PORT-B EXTERNAL INTERRUPT - . 214
11.1.2 TIMERO INTERRUPT T, . .. ** ^ * .* 214
11.1.3 PORT-B LINE CHANGE INTERRUPT ; TI ,V : . 215
MULTIPLE EXTERNA) INTERRUPTS . 217
11.1.4 EEPROM DATA WRITE INTERRUPT ** ****- . Z ^; ^^ 2 17
11.2 INTERRUPT HANDLERS :V , .^ R *;- - ^ , 217
11.2.1 CONTEXT SAVING OPERATIONS ; . , * * . , . / . , , * ,.
. * . ;. 218
SAVING W AND STATUS REGISTERS * * 218
11.3 INTERRUPT PROGRAMMING . , . , . , ; 218
11.3.1 PROGRAMMING THE EXTERNAL INTERRUPT -** - : . * , . ; 219
RB0 INTERRUPT INITIALIZATION : ^T-. 220
RB0 INTERRUPT SERVICE ROUTINE * ** * 221
11.3.2 WAKEUP FROM SLEEP USING THE RB0 INTERRUPT * ^ : : I - : ^
222
THE SLEEPDEMO PROGRAM ; * * * * * -** 223
11.3.3 PORT-B BITS 4-7 STATUS CHANGE INTERRUPT ; : ; - - * 224
RB4-7 INTERRUPT INITIALIZATION ; - -^ - 225
RB4-7 CHANGE INTERRUPT SERVICE ROUTINE X : **-*** * * * 227
11.4 SAMPLE PROGRAMS 229
11.4.1 THE RBOINT PROGRAM ^ L ^ 2 29
11.4.2 THE SLEEPDEMO PROGRAM / 232
11.4.3 THE RB4TO7LNT PROGRAM 235
CHAPTER 12-TIMERS AND COUNTERS 241
12.0 THE 16F84 TIMERO MODULE - 241
12,0,1 TIMERO OPERATION 241
IMAGE 8
CONTENTS
XI
V- TIMERO INTERRUPT 242
TIMERO PRESCALER 242
12.1 DELAYS USING TIMERO * 243
12.1.1 LONG DELAY LOOPS 244
HOW ACCURATE THE DELAY? 245
THE BLACK-AMMERMAN METHOD 245
; 12.2 TIMERO AS A COUNTER * 246
12.3 TIMERO PROGRAMMING 247
..... 12.3.1 PROGRAMMING A COUNTER . 247
. ^, A TIMER/COUNTER TEST CIRCUIT 248
;,,: THE TMROCOUNTER PROGRAM 248
[ 12.3.2 TIMERO AS A SIMPLE DELAY TIMER 250
L ^ 12.3.3 MEASURED TIME LAPSE 252
; INTERRUPT-DRIVEN TIMER 255
12.4 THE WATCHDOG TIMER 259
* 12.4.1 WATCHDOG TIMER PROGRAMMING 260
*;* 12.5 SAMPLE PROGRAMS 260
12.5.1 THE TMROCOUNTER PROGRAM 260
12.5.2 THE TIMERO PROGRAM 263
:,/;, 12,5.3 THE LAPSETIMER PROGRAM 265
12.5.4 THE LAPSETMRLNT PROGRAM 269
CHAPTER 13 - LCD INTERFACING AND PROGRAMMING 275
13.0 LCD FEATURES AND ARCHITECTURE 275
13.0.1 LCD FUNCTIONS AND COMPONENTS 276
^ : INTERNAL REGISTERS 276
BUSY FLAG 276
ADDRESS COUNTER 276
B : - DISPLAY DATA RAM (DDRAM) 276
CHARACTER GENERATOR ROM (CGROM) 276
CHARACTER GENERATOR RAM (CGRAM) 277
: ; / TIMING GENERATION CIRCUIT 277
- ;I; - LIQUID CRYSTAL DISPLAY DRIVER CIRCUIT 278
F :: CURSOR/BLINK CONTROL CIRCUIT 278
13.0.2 CONNECTIVITY AND PIN-OUT ;*-** 278
13.1 INTERFACING WFTH THE HD44780 . 279
13.1.1 BUSY FLAG ORTIMED DELAY OPTIONS 280
: ^ , [ ; 13.1.2 CONTRAST CONTROL 281
F : V 13.1.3 DISPLAY BACKLIGHT 281
13.1.4 DISPLAY MEMORY MAPPING 281
13.2 HD44780 INSTRUCTION SET 283
13.2.1 INSTRUCTION SET OVERVIEW 283
CLEARING THE DISPLAY IT 283
RETURN HOME 284
; - ENTRY MODE SET 284
DISPLAY AND CURSOR ON/OFF 284
CURSOR/DISPLAY SHIFT * * . 284
FUNCTION SET 285
^** SET CGRAM ADDRESS , 285
SET DDRAM ADDRESS 285
READ BUSY FLAG AND ADDRESS REGISTER 285
IMAGE 9
XU
MICROCONTROLLER PROGRAMMING
WRITEDATA 285
READ DATA 286
13.2.2 A 16F84 8-BIT DATA MODE CIRCUIT * * , * * . - , : *? : , ..,,,. 2
86
13.3 LCD PROGRAMMING 287
13.3.1 DEFINING CONSTANTS AND VARIABLES .. *.- , : 287
USING MPLAB DATA DIRECTIVES **- *= * V?- 289
13.3.2 LCD INITIALIZATION 290
FUNCTION SET COMMAND 290
DISPLAY OFT 291
DISPLAY AND CURSOR ON 291
SETENTRYMODE 292
CURSOR AND DISPLAY SHIFT /_ , V 292
CLEAR DISPLAY .;. *, 293
13.3.3 AUXILIARY OPERATIONS 293
TIME DELAY ROUTINE 293
PULSING THE E LINE 295
READING THE BUSY FLAG 295
BIT MERGING OPERATIONS ; JF * 296
13.3.4 TEXT DATA STORAGE AND DISPLAY S ; 298
GENERATING AND STORING A TEXT STRING : . ; 299
DISPLAYING THE TEXT STRING 301
13.3.5 DATA COMPRESSION TECHNIQUES - 302
4-BIT DATA TRANSFER MODE 302
MASTER/SLAVE SYSTEMS :. ..,,, .- -* ., * 304
13.4 SAMPLE PROGRAMS 306
13.4.1 LCDTESTL - 306
13.4.2 LCDTEST2 PROGRAM 316
13.4.3 LCDTEST3 PROGRAM * * 327
CHAPTER 14 - COMMUNICATIONS 339
14.0 PIC COMMUNICATIONS OVERVIEW 339
14.1 SERIAL DATA TRANSMISSION 340
14.1.1 ASYNCHRONOUS SERIAL TRANSMISSION - . 340
14.1.2 SYNCHRONOUS SERIAL TRANSMISSION 342
14.1.3 PIC SERIAL COMMUNICATIONS 342
14.1.4 THE RS-232-C STANDARD , S 343
ESSENTIAL CONCEPTS . / 344
THE SERIAL BIT STREAM 344
PARITY TESTING 345
CONNECTORS AND WIRING , .. . 345
THE NULL MODEM / 346
THE NULL MODEM CABLE , : 347
14.1.5 THE EIA-485 STANDARD 349
EIA-485 IN PIC-BASED SYSTEMS 350
14.2 PARALLEL DATA TRANSMISSION 350
14.2.1 PIC PARALLEL SLAVE PORT (PSP) . , , .. 351
14.3 PIC FREE-STYLE SERIAL PROGRAMMING 351
14.3.1 PIC-TO-PIC SERIAL COMMUNICATIONS 352
PIC-TO-PIC SERIAL COMMUNICATIONS CIRCUITS 352
PIC-TO-PIC SERIAL COMMUNICATIONS PROGRAMS 354
14.3.2 PROGRAM USING SHIFT REGISTER ICS 360
IMAGE 10
CONTENTS
KILL
THE 74HC165 PARALLEMO-SERIAL SHIFT REGISTER 361
74HC164 SERIAL-TO-PARALLEL SHIFT REGISTER 364
14.4 PIC PROTOCOL-BASED SERIAL PROGRAMMING 366
14.4.1 RS-232-C COMMUNICATIONS ON THE 16F84 366
THE RS-232-C TRANSCEIVER IC 367
- ** PIC TO PC COMMUNICATIONS 368
AN RS-232-C TTY BOARD 368
[ [ A 16F84AUART EMULATION 369
AN LCD SCROLLING ROUTINE 371
* 14.4.2 RS-232-C COMMUNICATIONS ON THE 16F87X 375
*** * THE 16F87X USART MODULE 376
THE USART BAUD RATE GENERATOR 376
16F87X USART ASYNCHRONOUS TRANSMITTER 379
16F87X USART ASYNCHRONOUS RECEIVER 380
R PIC-TO-PC RS-232-C COMMUNICATIONS CIRCUIT 381
16F877 PIC INITIALIZATION CODE 381
USART RECEIVE AND TRANSMIT ROUTINES 384
THE USART RECEIVE INTERRUPT 386
14.5 SAMPLE PROGRAMS 389
14.5.1 SERIALSND PROGRAM 389
14.5.2 SERIAIRCV PROGRAM 394
14.5.3 SERIAL6465 PROGRAM 400
14.5.4 TTYUSART PROGRAM 404
14.5.5 SERCOMLCD PROGRAM 420
14.5.6 SERLNTLCD PROGRAM 438
CHAPTER 15 - DATA EEPROM PROGRAMMING 459
15.0 PIC INTERNAL EEPROM MEMORY 460
15.0.1 EEPROM PROGRAMMING ON THE 16F84 460
READING EEPROM DATA MEMORY ON THE 16F84 460
16F84 EEPROM DATA MEMORY WRITE 461
:- *-;*: 16F84 EEPROM DEMONSTRATION PROGRAM 462
15.0.2 EEPROM PROGRAMMING ON THE 16F87X 465
READING EEPROM DATA MEMORY ON THE 16F87X 467
-*?/ WRITING TO EEPROM DATA MEMORY IN THE 16F87X 467
GFR ACCESS ISSUE IN THE 16F87X 469
15.0.3 16F87X EEPROM CIRCUIT AND PROGRAM 469
15.1 EEPROM DEVICES AND INTERFACES ;* 475
15.1.1 THE I2C SERIAL INTERFACE 476
F 15.1.2 I2C COMMUNICATIONS 476
15.1.3 EEPROM COMMUNICATIONS CONDITIONS 477
15.1.4 EEPROM WRITE OPERATION 478
15.1.5 EEPROM READ OPERATION 478
15.1.6 I2C EEPROM DEVICES 479
15.1.7 PIC MASTER SYNCHRONOUS SERIAL PORT (MSSP) 480
MSSP IN MASTER MODE 482
15.1.8 I2C SERIAL EEPROM PROGRAMMING ON THE 16F877 486
IC2 INITIALIZATION PROCEDURE 486
**: I2C WRITE BYTE PROCEDURE 488
I2C READ BYTE PROCEDURE 490
15.2 SAMPLE PROGRAMS 492
IMAGE 11
XIV
MICROCONTROLLER PROGRAMMING
15.2.1 EECOUNTER PROGRAM ^ *** -** * - * » 492
15.2.2 SER2EEP PROGRAM V: : : :H- * .,.: ; .* 504
15.2.3 I2CEEP PROGRAM - ^ ^V ! *: 521
CHAPTER 16 - ANALOG TO DIGITAL AND REALTIME CLOCKS 543
16.0 A/D CONVERTERS 544
16.0.1 CONVERTER RESOLUTION * . V 5 44
16.0.2 ADC IMPLEMENTATION ( .. - 545
16.1 A/D INTEGRATED CIRCUITS L :*;* -. ..- 546
16.1.1 ADC0331 SAMPLE CIRCUIT AND PROGRAM *-; *; . , 547
16.2 PIC ON-BOARD A/D HARDWARE _ 1 ^^ ^ - I, 5 49
16.2.1 A/D MODULE ONTHE16F87X ;J : [[./ [ :^ ., . L !,
549
THE ADCON0 REGISTER L .../ . . ^ R , 550
THEADCONI REGISTER -V *; , ; /^ 552
SLEEP MODE OPERATION -** -*:.; / 554
16.2.2 A/D MODULE SAMPLE CIRCUIT AND PROGRAM 554
16.3 REALTIME CLOCKS ^- ; -*; * L .** 5 58
16.3.1 THE NJU6355 REALTIME CLOCK : . . ; J * **:-. 558
16.3.2 RTC DEMONSTRATION CIRCUIT AND PROGRAM 7 * : 560
BCD CONVERSION PROCEDURES ! : * *- 5 65
16.4 SAMPLE PROGRAMS ,;.,.-. ^ .-*. , ..-,,...,. 568
16.4.1 ADF84 PROGRAM 568
16.4.2 A2DINLCD PROGRAM _.,.,. .,. ..,._ . ^ 580
16.4.3 RTC2LCD PROGRAM * ; R , : - K IU : 595
APPENDIX A - RESISTOR COLOR CODES ;J 6 1 3
APPENDIX B - BUILDING YOUR OWN CIRCUIT BOARDS 615
APPENDIX C - MID-RANGE INSTRUCTION SET 621
APPENDIX D - SUPPLEMENTARY PROGRAMS 659
INDEX 795
|
any_adam_object | 1 |
author | Sanchez, Julio Canton, Maria P. |
author_facet | Sanchez, Julio Canton, Maria P. |
author_role | aut aut |
author_sort | Sanchez, Julio |
author_variant | j s js m p c mp mpc |
building | Verbundindex |
bvnumber | BV023801647 |
ctrlnum | (OCoLC)255681681 (DE-599)BVBBV023801647 |
dewey-full | 629.8955265 |
dewey-hundreds | 600 - Technology (Applied sciences) |
dewey-ones | 629 - Other branches of engineering |
dewey-raw | 629.8955265 |
dewey-search | 629.8955265 |
dewey-sort | 3629.8955265 |
dewey-tens | 620 - Engineering and allied operations |
discipline | Mess-/Steuerungs-/Regelungs-/Automatisierungstechnik / Mechatronik |
format | Book |
fullrecord | <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"><record><leader>01543nam a2200385zc 4500</leader><controlfield tag="001">BV023801647</controlfield><controlfield tag="003">DE-604</controlfield><controlfield tag="005">20090426000000.0</controlfield><controlfield tag="007">t</controlfield><controlfield tag="008">070821s2007 ad|| |||| 00||| eng d</controlfield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">9780849371899</subfield><subfield code="9">978-0-8493-7189-9</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)255681681</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(DE-599)BVBBV023801647</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">DE-604</subfield><subfield code="b">ger</subfield></datafield><datafield tag="041" ind1="0" ind2=" "><subfield code="a">eng</subfield></datafield><datafield tag="049" ind1=" " ind2=" "><subfield code="a">DE-634</subfield></datafield><datafield tag="082" ind1="0" ind2=" "><subfield code="a">629.8955265</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Sanchez, Julio</subfield><subfield code="e">Verfasser</subfield><subfield code="4">aut</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">Microcontroller programming</subfield><subfield code="b">the Microchip PIC</subfield><subfield code="c">Julio Sanchez ; Maria P. Canton</subfield></datafield><datafield tag="264" ind1=" " ind2="1"><subfield code="a">Boca Raton, Fla. [u.a.]</subfield><subfield code="b">CRC Press</subfield><subfield code="c">2007</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">XVII, 804 S.</subfield><subfield code="b">Ill., graph. Darst.</subfield></datafield><datafield tag="336" ind1=" " ind2=" "><subfield code="b">txt</subfield><subfield code="2">rdacontent</subfield></datafield><datafield tag="337" ind1=" " ind2=" "><subfield code="b">n</subfield><subfield code="2">rdamedia</subfield></datafield><datafield tag="338" ind1=" " ind2=" "><subfield code="b">nc</subfield><subfield code="2">rdacarrier</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Mikrocontroller</subfield><subfield code="0">(DE-588)4127438-6</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Maschinencode</subfield><subfield code="0">(DE-588)4169002-3</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">PICmicro</subfield><subfield code="0">(DE-588)4571742-4</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="689" ind1="0" ind2="0"><subfield code="a">Mikrocontroller</subfield><subfield code="0">(DE-588)4127438-6</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2="1"><subfield code="a">Maschinencode</subfield><subfield code="0">(DE-588)4169002-3</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2="2"><subfield code="a">PICmicro</subfield><subfield code="0">(DE-588)4571742-4</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2=" "><subfield code="5">DE-604</subfield></datafield><datafield tag="700" ind1="1" ind2=" "><subfield code="a">Canton, Maria P.</subfield><subfield code="e">Verfasser</subfield><subfield code="4">aut</subfield></datafield><datafield tag="856" ind1="4" ind2=" "><subfield code="u">http://www.loc.gov/catdir/enhancements/fy0703/2006050867-d.html</subfield><subfield code="3">Beschreibung für Leser</subfield></datafield><datafield tag="856" ind1="4" ind2="2"><subfield code="m">GBV Datenaustausch</subfield><subfield code="q">application/pdf</subfield><subfield code="u">http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=017443846&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA</subfield><subfield code="3">Inhaltsverzeichnis</subfield></datafield><datafield tag="999" ind1=" " ind2=" "><subfield code="a">oai:aleph.bib-bvb.de:BVB01-017443846</subfield></datafield></record></collection> |
id | DE-604.BV023801647 |
illustrated | Illustrated |
indexdate | 2024-07-09T21:37:07Z |
institution | BVB |
isbn | 9780849371899 |
language | English |
oai_aleph_id | oai:aleph.bib-bvb.de:BVB01-017443846 |
oclc_num | 255681681 |
open_access_boolean | |
owner | DE-634 |
owner_facet | DE-634 |
physical | XVII, 804 S. Ill., graph. Darst. |
publishDate | 2007 |
publishDateSearch | 2007 |
publishDateSort | 2007 |
publisher | CRC Press |
record_format | marc |
spelling | Sanchez, Julio Verfasser aut Microcontroller programming the Microchip PIC Julio Sanchez ; Maria P. Canton Boca Raton, Fla. [u.a.] CRC Press 2007 XVII, 804 S. Ill., graph. Darst. txt rdacontent n rdamedia nc rdacarrier Mikrocontroller (DE-588)4127438-6 gnd rswk-swf Maschinencode (DE-588)4169002-3 gnd rswk-swf PICmicro (DE-588)4571742-4 gnd rswk-swf Mikrocontroller (DE-588)4127438-6 s Maschinencode (DE-588)4169002-3 s PICmicro (DE-588)4571742-4 s DE-604 Canton, Maria P. Verfasser aut http://www.loc.gov/catdir/enhancements/fy0703/2006050867-d.html Beschreibung für Leser GBV Datenaustausch application/pdf http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=017443846&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA Inhaltsverzeichnis |
spellingShingle | Sanchez, Julio Canton, Maria P. Microcontroller programming the Microchip PIC Mikrocontroller (DE-588)4127438-6 gnd Maschinencode (DE-588)4169002-3 gnd PICmicro (DE-588)4571742-4 gnd |
subject_GND | (DE-588)4127438-6 (DE-588)4169002-3 (DE-588)4571742-4 |
title | Microcontroller programming the Microchip PIC |
title_auth | Microcontroller programming the Microchip PIC |
title_exact_search | Microcontroller programming the Microchip PIC |
title_full | Microcontroller programming the Microchip PIC Julio Sanchez ; Maria P. Canton |
title_fullStr | Microcontroller programming the Microchip PIC Julio Sanchez ; Maria P. Canton |
title_full_unstemmed | Microcontroller programming the Microchip PIC Julio Sanchez ; Maria P. Canton |
title_short | Microcontroller programming |
title_sort | microcontroller programming the microchip pic |
title_sub | the Microchip PIC |
topic | Mikrocontroller (DE-588)4127438-6 gnd Maschinencode (DE-588)4169002-3 gnd PICmicro (DE-588)4571742-4 gnd |
topic_facet | Mikrocontroller Maschinencode PICmicro |
url | http://www.loc.gov/catdir/enhancements/fy0703/2006050867-d.html http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=017443846&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |
work_keys_str_mv | AT sanchezjulio microcontrollerprogrammingthemicrochippic AT cantonmariap microcontrollerprogrammingthemicrochippic |