PROGRAMMING AND CUSTOMIZING THE PIC

2y ago
59 Views
4 Downloads
3.21 MB
6 Pages
Last View : 2d ago
Last Download : 3m ago
Upload by : Anton Mixon
Transcription

PROGRAMMING ANDCUSTOMIZING THEPIC MICROCONTROLLERMYKE PREDKOThird EditioneNewYorkChicago San Francisco Lisbon London MadridMexico City Milan New Delhi San Juan SeoulSingapore Sydney Toronto

mentsChapter 1 Embedded MicrocontrollersMicrocontroller Types1Internal Hardware2Applications5Processor Architectures7Instructions and Software12Peripheral Functions17Memory Types21Microcontroller Communication28Device Packaging35Application Development Tools39Xlxx'1Chapter 2 The Microchip PIC MicrocontrollerAccessing the Microchip Web Site43PIC Microcontroller Feature Summary48Features Unique to the PIC Microcontroller54PIC Microcontroller Families5943Chapter 3 Software Development ToolsTools Overview65High Level Languages83Microchip MPLAB IDE 10363Chapter 4 Programming PIC MicrocontrollersHex File Format156Code Protection158Parallel Programming159PIC ICSP Programmer Interface166Microchip Programmers178My Programmers181Third-Party Programmers204155Chapter 5 Emulators and DebuggersMPLAB ICE-2000210MPLAB REAL ICE213207

viCONTENTSMPLAB ICD 2 DebuggerThe Emu-Il219Other Emulators241Chapter 6214The Microchip PIC MCU Processor Architecture243The CPU244Hardware and File Registers248The PIC Microcontroller's ALU254Data Movement260The Program Counter and Stack264Reset268Interrupts271Architecture Differences273Chapter 7Using the PIC MCU Instruction SetSetting Up the MPLAB IDE Simulator with a Test TemplatePIC MCU Instruction Types297The Mid-Range Instruction Set303Low-End PIC Microcontroller Instruction Set348PIC18 Instruction Set356Chapter 8Assembly-Language Software Techniques293294373Sample Template374Labels, Addresses, and Flags376Subroutines with Parameter Passing381Subtraction, Comparing and Negation385Bit AND and OR38916-Bit Operations390MulDiv, Constant Multiplication and Division392Delays400Patch Space405Structures, Pointers, and Arrays407Sorting Data414Interrupts419Reentrant Subroutines423Simulating Logic423Event-Driven Programming426State Machine Programming429Porting Code Between PIC Microcontroller Device Architectures430Optimizing PIC Microcontroller Applications438A Baker's Dozen Rules to Follow That Will Help to Avoid Application SoftwareProblems443Chapter 9Basic Operating FeaturesPower Input and Decoupling446Configuration Fuses451OPTION Register470TMRO478Interrupt Operation483The Right PIC Microcontroller to Learn On445485

CONTENTSChapter 10 Macro DevelopmentPIC Microcontroller Assembly-Language Macros489The Difference Between Defines and Macros492The Assembler Calculator494Multiline С Macros499Conditional Assembly/Compilation500Using Defines and Conditional Assembly for Application DebugDebugging Macros509Structured Programming Macros513vii489507Chapter 11 Building and LinkingCreating Linked Applications519519Chapter 12 BootloadersBootloader Requirements528Mid-Range Bootloaders530PIC18 Bootloaders535527Chapter 13 Real-Time Operating SystemsLow-End and Mid-Range RTOSs541PIC18 RTOS Design542537Chapter 14 Debugging Your ApplicationsDocument the Expected State566Characterize the Problem567Hypothesize and Test Your Hypothesis569Propose Corrective Actions571Test Fixes572Release Your Solution576Debug: An Application to Test Your Debug Skills565577Chapter 15 PIC Microcontroller Application Designand Hardware InterfacingRequirements Definition590PIC Microcontroller Resource Allocation595Effective User Interfacing597Project Management599Power Management603Reset608Interfacing to External Devices611Chapter 16 PIC MCU Optional Hardware FeaturesMid-Range Built-in EEPROM/Flash Access618TMR1624TMR2626Compare/Capture/PWM (CCP) Module626Serial I/O 633Analog I/O 649Parallel Slave Port (PSP)657In-Circuit Serial Programming (ICSP)659589617

viiiCONTENTSC h a p t e r 1 7 P I C M C U Input a n d Output Device InterfacingLEDs667Switch Bounce665Matrix Keypads668LCDs672Analog I/O 682Audio Output690Relays and Solenoids692Asynchronous (NRZ) Serial Interfaces693Synchronous Serial Interfaces704661Chapter 18 Motor ControlDc Motors711Stepper Motors724R/C Servo Control733711Chapter 19 Practical PC InterfacingPC Software Application Development ToolsSerial Port742Parallel Port749739740Chapter 2 0 PIC Microcontroller Application BasicsJumping Around 755Some Basic Functions771Analog Input/Output798I/O with Interrupts810Serial I/O 832755Chapter 21 ProjectsLow-End Devices853Mid-Range Devices878PIC18 Devices953853Appendix A ResourcesMicrochip965Books to Help You Learn Moreabout the PIC MicrocontrollerUseful Books967Recommended PIC Microcontroller Websites970Periodicals971Other Websites of Interest972Part Suppliers973965Appendix В PIC Microcontroller SummaryFeature to Part Number Table977Instruction Sets977I/O Register Addresses 1016Device Pinouts 1030966977

CONTENTSixAppendix С Useful Tables and DataElectrical Engineering Formulas 1063Mathematical Formulas 1065Mathematical Conversions 1066ASCII 10671061Appendix D Miscellaneous Electronic Reference InformationBasic Electronic Components and Their Symbols 1073Test Equipment 10801073Appendix E Basic Programming LanguagePICBASIC 10911089Appendix F С Programming LanguageCommon Library Functions 1130PICC Library Functions 1133Microchip C18 Library Functions 11381123Appendix G Reuse, Return, and RecycleUseful Snippets 1150Mykemacs.inc1160Sixteen-Bit Numbers 12001149GlossaryIndex12131229

Chapter 7 Using the PIC MCU Instruction Set Setting Up the MPLAB IDE Simulator with a Test Template PIC MCU Instruction Types 297 The Mid-Range Instruction Set 303 Low-End PIC Microcontroller Instruction Set 348 PIC18 Instruction Set 356 Chapter 8 Assembly-Language Software Techniques 373 Sample Template 374 Labels, Addresses, and Flags 376

Related Documents:

Silat is a combative art of self-defense and survival rooted from Matay archipelago. It was traced at thé early of Langkasuka Kingdom (2nd century CE) till thé reign of Melaka (Malaysia) Sultanate era (13th century). Silat has now evolved to become part of social culture and tradition with thé appearance of a fine physical and spiritual .

May 02, 2018 · D. Program Evaluation ͟The organization has provided a description of the framework for how each program will be evaluated. The framework should include all the elements below: ͟The evaluation methods are cost-effective for the organization ͟Quantitative and qualitative data is being collected (at Basics tier, data collection must have begun)

̶The leading indicator of employee engagement is based on the quality of the relationship between employee and supervisor Empower your managers! ̶Help them understand the impact on the organization ̶Share important changes, plan options, tasks, and deadlines ̶Provide key messages and talking points ̶Prepare them to answer employee questions

Dr. Sunita Bharatwal** Dr. Pawan Garga*** Abstract Customer satisfaction is derived from thè functionalities and values, a product or Service can provide. The current study aims to segregate thè dimensions of ordine Service quality and gather insights on its impact on web shopping. The trends of purchases have

On an exceptional basis, Member States may request UNESCO to provide thé candidates with access to thé platform so they can complète thé form by themselves. Thèse requests must be addressed to esd rize unesco. or by 15 A ril 2021 UNESCO will provide thé nomineewith accessto thé platform via their émail address.

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 PIC12 Devices 135 PIC14 Devices 138 7.1.2 Mi

Chính Văn.- Còn đức Thế tôn thì tuệ giác cực kỳ trong sạch 8: hiện hành bất nhị 9, đạt đến vô tướng 10, đứng vào chỗ đứng của các đức Thế tôn 11, thể hiện tính bình đẳng của các Ngài, đến chỗ không còn chướng ngại 12, giáo pháp không thể khuynh đảo, tâm thức không bị cản trở, cái được

Aug 27, 2019 · Pic-3 Pic-6 Pic-2 Pic-5 Pic-1 Pic-4 ATTENTION: Make sure that the right wheel (marked R) is attached to the right side and the left wheel (marked L) to the left side (seen from behind the cart in driving direction), as the wheels have built-in one-way clutches. The caddy w