Programming 16-Bit PIC Microcontrollers in C :

Jasio, Lucio Di.

Programming 16-Bit PIC Microcontrollers in C : Learning to Fly the PIC 24. - 1 online resource (396 pages) - Embedded Technology . - Embedded Technology .

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.

The official guide to the PIC revolution!.

9780080475462


Programmable controllers.;C (Computer program language).


Electronic books.

TJ223.P76.D55 2007

005.1