
Programming 16-Bit PIC Microcontrollers in C : Learning to Fly the PIC 24.
Title:
Programming 16-Bit PIC Microcontrollers in C : Learning to Fly the PIC 24.
Author:
Di Jasio, Lucio.
ISBN:
9780080475462
Personal Author:
Physical Description:
1 online resource (396 pages)
Series:
Embedded Technology
Contents:
Cover -- Contents -- Preface -- Introduction -- Who should read this book? -- Structure of the book -- What this book is not -- Checklists -- PART I -- CHAPTER 1: THE FIRST FLIGHT -- Flight plan -- Preflight checklist -- The flight -- Compiling and linking -- Building the first project -- PORT initialization -- Retesting PORTA -- Testing PORTB -- Post-flight briefing -- Notes for assembly experts -- Notes for PIC MCU experts -- Notes for C experts -- Tips and tricks -- Exercises -- Books -- Links -- CHAPTER 2: A LOOP IN THE PATTERN -- Flight plan -- Preflight checklist -- The flight -- An animated simulation -- Using the Logic Analyzer -- Post-flight briefing -- Notes for assembly experts -- Notes for PIC microcontroller experts -- Notes for C experts -- Tips and tricks -- Exercises -- Books -- Links -- CHAPTER 3: MORE PATTERN WORK, MORE LOOPS -- Flight plan -- Preflight checklist -- The flight -- Do Loops -- Variable declarations -- for loops -- More loop examples -- Arrays -- A new demo -- Testing with the Logic Analyzer -- Using the Explorer16 demonstration board -- Post-flight briefing -- Notes for assembly experts -- Notes for PIC microcontroller experts -- Notes for C experts -- Tips and tricks -- Exercises -- Books -- Links -- CHAPTER 4: NUMB3RS -- Flight plan -- Preflight checklist -- The flight -- On optimization (or lack thereof) -- Testing -- Going long -- Note on the multiplication of long integers -- Long long multiplication -- Floating point -- Notes for C experts -- Measuring performance -- Post-flight briefing -- Notes for assembly experts -- Notes for PIC microcontroller experts -- Tips and tricks -- Math libraries -- Complex data types -- Exercises -- Books -- Links -- CHAPTER 5: INTERRUPTS -- Flight plan -- Preflight checklist -- The flight -- Nesting of interrupts -- Traps -- A template and an example for Timer1 interrupt.
A real example with Timer1 -- Testing the Timer1 interrupt -- The secondary oscillator -- The real-time clock calendar (RTCC) -- Managing multiple interrupts -- Post-flight briefing -- Notes for C experts -- Notes for assembly experts -- Notes for PIC microcontroller experts -- Tips and tricks -- Exercises -- Books -- Links -- CHAPTER 6: TAKING A LOOK UNDER THE HOOD -- Flight plan -- Preflight checklist -- The fl ight -- Memory space allocation -- Program space visibility -- Investigating memory allocation -- Looking at the MAP -- Pointers -- The heap -- MPLAB C30 Memory Models -- Post-flight briefing -- Notes for C experts -- Notes for assembly experts -- Notes for PIC microcontroller experts -- Tips and tricks -- Exercises -- Books -- Links -- PART II
FLYING SOLOŽ -- CHAPTER 7: COMMUNICATION -- Flight plan -- Preflight checklist -- The flight -- Synchronous serial interfaces -- Asynchronous serial interfaces -- Parallel interfaces -- Synchronous communication using the SPI modules -- Testing the Read Status Register command -- Writing to the EEPROM -- Reading the memory contents -- A nonvolatile storage library -- Testing the new NVM library -- Post-flight briefing -- Notes for C experts -- Notes for the experts -- Notes for PIC microcontroller experts -- Tips and tricks -- Exercises -- Books -- Links -- CHAPTER 8: ASYNCHRONOUS COMMUNICATION -- Flight plan -- Preflight checklist -- The flight -- UART confi guration -- Sending and receiving data -- Testing the serial communication routines -- Building a simple console library -- Testing a VT100 terminal -- Using the serial port as a debugging tool -- The matrix -- Post-flight briefing -- Notes for C experts -- Notes for PIC microcontroller experts -- Tips and tricks -- About the ICD2 and UARTs on ICE -- Exercises -- Books -- Links -- CHAPTER 9: GLASS BLISS -- Flight plan -- Pre-flight checklist.
The flight -- HD44780 controller compatibility -- The Parallel Master Port -- Configuring the PMP for LCD module control -- A small library of functions to access an LCD display -- Advanced LCD control -- Post-flight briefing -- Notes for C experts -- Tips and tricks -- Exercises -- Books -- Links -- CHAPTER 10: IT'S AN ANALOG WORLD -- Flight plan -- Preflight checklist -- The flight -- The fi rst conversion -- Automatic sampling timing -- Developing a demo -- Developing a game -- Measuring temperature -- The breath-alizer game -- Post-flight briefing -- Notes for C experts -- Tips and tricks -- Exercises -- Books -- Links -- PART III - CROSS-COUNTRY FLYING -- CHAPTER 11: CAPTURING INPUTS -- CHAPTER 12: THE DARK SCREEN -- Flight plan -- The flight -- Generating the composite video signal -- Using the Output Compare modules -- Memory allocation -- Image serialization -- Building the video module -- Testing the video generator -- Measuring performance -- The dark screen -- A test pattern -- Plotting -- A starry night -- Line drawing -- Bresenham algorithm -- Plotting math functions -- Two-dimensional function visualization -- Fractals -- Text -- Testing the TextOnGPage module -- Developing a text page video -- Testing the text page performance -- Post-flight briefing -- Tips and tricks -- Exercises -- Books -- Links -- CHAPTER 13: MASS STORAGE -- Flight plan -- The flight -- The SD/MMC card physical interface -- Interfacing to the Explorer16 board -- Starting a new project -- Selecting the SPI mode of operation -- Sending commands in SPI mode -- Completing the SD/MMC card initialization -- Reading data from an SD/MMC card -- Writing data to an SD/MMC card -- Using the SD/MMC interface module -- Post-flight briefing -- Tips and tricks -- Exercises -- Books -- Links -- CHAPTER 14: FILE I/O -- Flight plan -- The flight -- Sectors and Clusters.
The File Allocation Table (FAT) -- The Root Directory -- The treasure hunt -- Opening a fi le -- Reading data from a file -- Closing a file -- Creating the fileio module -- Testing fopenM() and freadM() -- Writing data to a file -- Closing a file, second take -- Accessory functions -- Testing the complete fileio module -- Code Size -- Post-flight briefing -- Tips and tricks -- Exercises -- Books -- Links -- CHAPTER 15: VOLARE -- Flight plan -- The flight -- The PS/2 communication protocol -- Interfacing a PIC24 to the PS/2 -- Input Capture -- Testing the Input Capture method using Stimulus Scripts -- Testing the PS/2 receive routines -- The simulation -- The Simulator Profile -- Another method - Change Notification -- Evaluating cost -- A third method - I/O polling -- Testing the I/O polling method -- Cost and efficiency of the solution -- Completing the interface: adding a FIFO buffer -- Completing the interface: performing key codes decoding -- Post-flight briefing -- Tips and tricks -- Stalling transmissions from the keyboard - Open-Drain Output Control -- Exercises -- Books -- Links -- Flight plan -- The flight -- Using the PIC24 OC modules in PWM mode -- Testing the PWM as a D/A converter -- Producing analog waveforms -- Reproducing voice messages -- A media player -- The WAVE file format -- The play() function -- The low level audio routines -- Testing the WAVE file player -- Optimizing the fi le I/O -- LED Profi ling -- Looking under the hood for more -- Post-flight briefing -- Tips and tricks -- Exercises -- Books -- Links -- About the Author -- Index.
Abstract:
A Microchip insider tells all on the newest, most powerful PICs ever! FREE CD-ROM includes source code in C, the Microchip C30 compiler, and MPLAB SIM software Includes handy checklists to help readers perform the most common programming and debugging tasks The new 16-bit PIC24 chip provides embedded programmers with more speed, more memory, and more peripherals than ever before, creating the potential for more powerful cutting-edge PIC designs. This book teaches readers everything they need to know about these chips: how to program them, how to test them, and how to debug them, in order to take full advantage of the capabilities of the new PIC24 microcontroller architecture. Author Lucio Di Jasio, a PIC expert at Microchip, offers unique insight into this revolutionary technology, guiding the reader step-by-step from 16-bit architecture basics, through even the most sophisticated programming scenarios. This book's common-sense, practical, hands-on approach begins simply and builds up to more challenging exercises, using proven C programming techniques. Experienced PIC users and newcomers to the field alike will benefit from the text's many thorough examples, which demonstrate how to nimbly side-step common obstacles, solve real-world design problems efficiently, and optimize code for all the new PIC24 features. You will learn about: basic timing and I/O operations, multitasking using the PIC24 interrupts, all the new hardware peripherals how to control LCD displays, generating audio and video signals, accessing mass-storage media, how to share files on a mass-storage device with a PC, experimenting with the Explorer 16 demo board, debugging methods with MPLAB-SIM and ICD2 tools, and more! ·A Microchip insider tells all on the newest, most powerful PICs ever! ·Condenses typical introductory "fluff" focusing instead on examples and
exercises that show how to solve common, real-world design problems quickly ·Includes handy checklists to help readers perform the most common programming and debugging tasks ·FREE CD-ROM includes source code in C, the Microchip C30 compiler, and MPLAB SIM software, so that readers gain practical, hands-on programming experience ·Check out the author's Web site at http://www.flyingpic24.com for FREE downloads, FAQs, and updates.
Local Note:
Electronic reproduction. Ann Arbor, Michigan : ProQuest Ebook Central, 2017. Available via World Wide Web. Access may be limited to ProQuest Ebook Central affiliated libraries.
Genre:
Electronic Access:
Click to View