Programming PIC Microcontrollers with XC8 (eBook)
XVII, 434 Seiten
Apress (Verlag)
978-1-4842-3273-6 (ISBN)
- Set up the MPLAB X and XC8 compilers for microcontroller development
- Use GPIO and PPS
- Review EUSART and Software UART communications
- Use the eXtreme Low Power (XLP) options of PIC microcontrollers
- Explore wireless communications with WiFi and Bluetooth
Armstrong Subero has been tinkering with electronics for as long as he can remember. The thrill of creating something from the ground up and watching it work is something that one never shakes. His entire life changed when he discovered microcontrollers. They were so powerful and simple and complex, all at the same time. After finishing school, Armstrong taught himself programming. Armstrong landed his first job as a Systems Technologist completely self taught and a lot of it was due to his in depth knowledge and passion for microcontroller technology. He has used many microcontroller families during the course of his work, however he has an affinity for PIC microcontrollers. Armstrong currently works for the Ministry of National Security in his country and designs robots as well as write books, blogs and software on trinirobotics.com and angelstemlabs.org in his free time.
Learn how to use microcontrollers without all the frills and math. This book uses a practical approach to show you how to develop embedded systems with 8 bit PIC microcontrollers using the XC8 compiler. It's your complete guide to understanding modern PIC microcontrollers.Are you tired of copying and pasting code into your embedded projects? Do you want to write your own code from scratch for microcontrollers and understand what your code is doing? Do you want to move beyond the Arduino? Then Programming PIC Microcontrollers with XC8 is for you! Written for those who want more than an Arduino, but less than the more complex microcontrollers on the market, PIC microcontrollers are the next logical step in your journey.You'll also see the advantage that MPLAB X offers by running on Windows, MAC and Linux environments. You don't need to be a command line expert to work with PIC microcontrollers, so you can focus less on setting up your environment and more on your application. What You'll LearnSet up the MPLAB X and XC8 compilers for microcontroller developmentUse GPIO and PPSReview EUSART and Software UART communicationsUse the eXtreme Low Power (XLP) options of PIC microcontrollersExplore wireless communications with WiFi and BluetoothWho This Book Is ForThose with some basic electronic device and some electronic equipment and knowledge. This book assumes knowledge of the C programming language and basic knowledge of digital electronics though a basic overview is given for both. A complete newcomer can follow along, but this book is heavy on code, schematics and images and focuses less on the theoretical aspects of using microcontrollers. This book is also targeted to students wanting a practical overviewof microcontrollers outside of the classroom.
Armstrong Subero has been tinkering with electronics for as long as he can remember. The thrill of creating something from the ground up and watching it work is something that one never shakes. His entire life changed when he discovered microcontrollers. They were so powerful and simple and complex, all at the same time. After finishing school, Armstrong taught himself programming. Armstrong landed his first job as a Systems Technologist completely self taught and a lot of it was due to his in depth knowledge and passion for microcontroller technology. He has used many microcontroller families during the course of his work, however he has an affinity for PIC microcontrollers. Armstrong currently works for the Ministry of National Security in his country and designs robots as well as write books, blogs and software on trinirobotics.com and angelstemlabs.org in his free time.
Preface• Why Did I Write This Book?• Who Is This Book For?• What You Will Need For This Book?• What Will I learn in This Book?• About the Author• Errata and Suggestions• Copyright DisclaimerChapter One: Preparing For DevelopmentA short intro chapter focused on telling the reader tools and software that will be needed• Gathering Your Hardware• Microcontroller• Programmer• Gathering the Software• Setting Up Shop• Multimeter• Oscilloscope• Power Supply• Shopping for Supplies• ConclusionChapter Two: The C Programming LanguageFocused on reviewing the basics of the C programming language for those familiar and providing a basic overview for absolute beginners• 2.1 C• 2.2 C Programming• 2.2.1 C program Structure• 2.2.2 Comments• 2.2.3 Variables and Constants• 2.2.4 Arrays, Pointers and Structures• 2.2.5 Operators• 2.2.6 Controlling Program Flow• 2.2.7 Preprocessor Directives• 2.3 Assembly vs C• ConclusionChapter Three: Basic Electronics for Embedded SystemsReviews basic electronics components and their functions as it relates to embedded systems while avoiding too much complex theory and providing practical applications usually skipped in other books eg logic level conversion• 3.1 Electronics• 3.2 Resistors• 3.3 Potentiometer• 3.4 Photoresistor• 3.5 Capacitor• 3.6 Inductor• 3.7 Transformers• 3.8 Diode• 3.9 Transistor• 3.10 Operational Amplifier• 3.11 Digital Electronics• 3.13 Logic Level Conversion• ConclusionChapter Four: PIC® MicrocontrollersProvides everything the user will need to know about PIC microcontrollers by presenting the architecture concisely in a plain context presenting basic information (eg what is a pin) all the way to the CPU core without using irrelevant detail beyond what is needed to use the device. • 4.1 PIC® Microcontrollers Overview• 4.2 PIC® 16F1717 block diagram• 4.3 Program Flash Memory• 4.4 Random Access Memory• 4.5 Timing Generation• 4.5 !MCLR• 4.6 PORTS• 4.7 On Board Peripherals• 4.7.1 Analog to Digital Converter• 4.7.2 Digital to Analog Converter• 4.7.3 Capture Compare Pulse Width Modulation Module• 4.7.4 Timers• 4.7.5 Comparators• 4.7.6 Fixed Voltage Reference• 4.7.7 Temperature Indicator• 4.7.8 EUSART• 4.7.8 CLC• 4.7.9 MSSP• 4.7.10 NCO• 4.7.11 ZCD• 4.7.12 COG• 4.7.13 Operational Amplifiers• 4.7.14 High Endurance Flash Block• 4.8 The Enhanced Mid-Range CPU Core• 4.8.1 Power-up Timer• 4.8.2 Oscillator Start-up Timer• 4.8.3 Power-on Reset• 4.8.4 Watchdog Timer• 4.8.5 Brown-out Reset• ConclusionChapter Five: Input and OutputCovers the basics of I/O including PPS, interfacing LEDs, pushbuttons and seven segmentdisplays.• 5.1 Let’s Begin I/O• 5.2 TRIS Register• 5.3 PORT Register• 5.4 Output Latch Registers• 5.5 Analog Select Registers• 5.6 Weak pull-up• 5.7 Making an LED Blink• 5.8 Using a Pushbutton• 5.9 Seven Segment Displays• 5.10 Seven Segment Display Multiplexing• 5.11 Project: Countdown Timer• 5.12 Peripheral Pin Select• 5.13 ConclusionChapter Six: Interfacing ActuatorsDemonstrates using actuators DC motors, servos and stepper motors.• 6.1 Introducing Actuators• 6.2 DC Motor• 6.3 Servo Motor• 6.4 Stepper Motor• ConclusionChapter Seven: Interrupts, Timers, Counters and PWMExamines the use of Interrupts, Timers, Counters, PWM and the RGB LED• 7.1 Introduction to Interrupts• 7.2 Timers• 7.3 Timer0 in Timer Mode• 7.4 Timer0 in Counter Mode• 7.5 Timer0 with Interrupts• 7.6 CCP Module• 7.7 Understanding PWM• 7.8 Using PWM• 7.9 Project: Using PWM with a Motor Driver• 7.10 Project: Using CCP and dedicated PWM with RGB LED• ConclusionChapter Eight: USART, SPI and I2CPresents the use of serial communication protocols including USART with GPS and GSM,SPI and I2C.• 8.1 Serial Communication Protocols• 8.2 USART• 8.3 Serial Character LCD• 8.4 UART to PC Communication• 8.5 Text To Speech• 8.6 GPS• 8.7 NEMA Commands• 8.8 Software USART• 8.9 GSM Module• 8.10 AT Commands• 8.11 SPI• 8.12 Digital Potentiometer• 8.13 Character Display• 8.14 Character: The Hitachi HD44780 LCD• 8.15 The Samsung KS0066U• 8.16 I2C• 8.17 EEPROM• ConclusionChapter Nine: Interfacing DisplaysLooks at using displays including the SSD1306 and Nextion Touch Screen Displays• 9.1 Displays• 9.2 OLED Display• 9.3 Touch Screen LCD• 9.4 Resistive Touch• 9.5 Capacitive Touch• 9.6 Selecting a Touch Screen LCD• 9.7 Using the Touch LCD• 9.8 Create a layout• 9.9 Adding Widgets• 9.10 Adding Code• 9.11 The Result• 9.12 Read on Microcontroller• ConclusionChapter Ten: ADC and DACConsists of understanding the ADC and DAC• 10.1 Data Conversion• 10.2 ADC• 10.3 Project: Digital Thermometer• 10.4 DAC• ConclusionChapter Eleven: CLC, NCO, Comparator and FVRCovers using the onboard peripherals of the CLC, NCO, Comparator and FVR• 11.1 CLC• 11.2 NCO• 11.3 Comparator• 11.4 FVR• ConclusionChapter Twelve: Wi-Fi and BluetoothTakes us into the wireless connectivity with Wi-Fi and Bluetooth• 12.1 Low Cost Wireless Connectivity• 12.2 Wi-Fi• 12.3 The ESP8266• 12.4 Testing the ESP8266• 12.5 Project: Wi-Fi Data Logger• 12.6 Bluetooth• 12.7 Using the HC-05• ConclusionChapter Thirteen: Watchdog Timer and Low PowerDemonstrates use of low power features of the microcontroller, minimizing power consumption and the WDT• 13.1 Low Power 8 bit vs 32 bit• 13.2 SLEEP Mode• 13.3 Watchdog Timer• 13.4 Other Ways to Conserve Power• 13.5 Reduce the Clock Frequency• 13.6 Reduce the Operating Voltage• 13.7 Power External Devices from I/O Lines• ConclusionChapter Fourteen: PIC® Microcontroller ProjectsA project based chapter where we build two projects• 14.1 Project: Temperature Controlled Fan• 14.2 Project: Touch Screen Clock• Conclusion
Erscheint lt. Verlag | 6.12.2017 |
---|---|
Zusatzinfo | XVII, 434 p. 101 illus., 57 illus. in color. |
Verlagsort | Berkeley |
Sprache | englisch |
Themenwelt | Mathematik / Informatik ► Informatik ► Programmiersprachen / -werkzeuge |
Informatik ► Weitere Themen ► Hardware | |
Schlagworte | Buliding Embedded Systems Program PIC microcontroller in C • Embedded Systems • How to get Started with PIC microcontrollers? • Microcontroller for Beginners • Microcontrollers • Microcontroller Tutorials • Moving from Arduino • PIC Microcontroller • PIC Microcontroller Projects • Programming PIC Microcontrollers • Using bare Microcontrollers |
ISBN-10 | 1-4842-3273-9 / 1484232739 |
ISBN-13 | 978-1-4842-3273-6 / 9781484232736 |
Haben Sie eine Frage zum Produkt? |
Größe: 5,6 MB
DRM: Digitales Wasserzeichen
Dieses eBook enthält ein digitales Wasserzeichen und ist damit für Sie personalisiert. Bei einer missbräuchlichen Weitergabe des eBooks an Dritte ist eine Rückverfolgung an die Quelle möglich.
Dateiformat: PDF (Portable Document Format)
Mit einem festen Seitenlayout eignet sich die PDF besonders für Fachbücher mit Spalten, Tabellen und Abbildungen. Eine PDF kann auf fast allen Geräten angezeigt werden, ist aber für kleine Displays (Smartphone, eReader) nur eingeschränkt geeignet.
Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen dafür einen PDF-Viewer - z.B. den Adobe Reader oder Adobe Digital Editions.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen dafür einen PDF-Viewer - z.B. die kostenlose Adobe Digital Editions-App.
Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.
aus dem Bereich