PIC32 Microcontrollers and the Digilent Chipkit -  Dogan Ibrahim

PIC32 Microcontrollers and the Digilent Chipkit (eBook)

Introductory to Advanced Projects
eBook Download: PDF | EPUB
2015 | 1. Auflage
398 Seiten
Elsevier Science (Verlag)
978-0-08-099935-7 (ISBN)
Systemvoraussetzungen
Systemvoraussetzungen
36,95 inkl. MwSt
  • Download sofort lieferbar
  • Zahlungsarten anzeigen
PIC32 Microcontrollers and the Digilent chipKIT: Introductory to Advanced Projects will teach you about the architecture of 32-bit processors and the hardware details of the chipKIT development boards, with a focus on the chipKIT MX3 microcontroller development board. Once the basics are covered, the book then moves on to describe the MPLAB and MPIDE packages using the C language for program development. The final part of the book is based on project development, with techniques learned in earlier chapters, using projects as examples. Each projectwill have a practical approach, with in-depth descriptions and program flow-charts with block diagrams, circuit diagrams, a full program listing and a follow up on testing and further development. With this book you will learn: - State-of-the-art PIC32 32-bit microcontroller architecture - How to program 32-bit PIC microcontrollers using MPIDE, MPLAB, and C language - Core features of the chipKIT series development boards - How to develop simple projects using the chipKIT MX3 development board and Pmod interface cards - how to develop advanced projects using the chipKIT MX3 development boards - Demonstrates how to use the PIC32 series of microcontrollers in real, practical applications, and make the connection between hardware and software programming - Usage of the PIC32MX320F128H microcontroller, which has many features of the PIC32 device and is included on the chipKIT MX3 development board - Uses the highly popular chipKIT development boards, and the PIC32 for real world applications, making this book one of a kind

Dogan Ibrahim graduated from the University of Salford with First Class Honours in Electronic Engineering. He then completed an MSc course in Automatic Control Engineering at the University of Manchester, and PhD in Digital Signal Processing at the City University in London. Prof Ibrahim worked at several companies and gained industrial experience before returning to the academic life. Prof Ibrahim is currently a Fellow of the IET, and a Chartered Electrical Engineer. His interests are in the fields of microcontroller based automatic control, digital signal processing, and computer aided design. Dogan Ibrahim has been a lecturer at South Bank University, London, and Principal Research Engineer at GEC Hirst Research Centre. Prof Ibrahim is the author of over 70 technical books in the fields of microcontrollers and electronic engineering. He is currently a systems consultant, carrying out consultancy work to various firms in London.
PIC32 Microcontrollers and the Digilent chipKIT: Introductory to Advanced Projects will teach you about the architecture of 32-bit processors and the hardware details of the chipKIT development boards, with a focus on the chipKIT MX3 microcontroller development board. Once the basics are covered, the book then moves on to describe the MPLAB and MPIDE packages using the C language for program development. The final part of the book is based on project development, with techniques learned in earlier chapters, using projects as examples. Each projectwill have a practical approach, with in-depth descriptions and program flow-charts with block diagrams, circuit diagrams, a full program listing and a follow up on testing and further development. With this book you will learn:- State-of-the-art PIC32 32-bit microcontroller architecture- How to program 32-bit PIC microcontrollers using MPIDE, MPLAB, and C language- Core features of the chipKIT series development boards- How to develop simple projects using the chipKIT MX3 development board and Pmod interface cards- how to develop advanced projects using the chipKIT MX3 development boards- Demonstrates how to use the PIC32 series of microcontrollers in real, practical applications, and make the connection between hardware and software programming- Usage of the PIC32MX320F128H microcontroller, which has many features of the PIC32 device and is included on the chipKIT MX3 development board- Uses the highly popular chipKIT development boards, and the PIC32 for real world applications, making this book one of a kind

Chapter 2

PIC32 Microcontroller Series


Abstract


This chapter is an introduction to the hardware of the PIC32 family of microcontrollers. The architecture of the popular PIC32MX360F512L microcontroller is taken as an example in this chapter. The program and data memory structure, reset circuitry, clock sources, I/O port characteristics, real-time clock module, and various timer modules offered by the chip are described in detail. In addition, the important topic of interrupts is covered and the interrupt mechanisms and interrupt sources of the PIC32 family of microcontrollers are described. Finally, the analogue input structure and the ADC module of the PIC32MX360F512L microcontroller are given with examples to show how this microcontroller can be used in analogue input applications.

Keywords


32-Bit microcontrollers
Architecture of the PIC32 family
Program memory
Data memory
The power supply
Reset mechanisms
Clock modules
I/O ports
Timer modules
Interrupts
Priorities
ADC converter

Chapter Outline

2.1 The PIC32MX360F512L Architecture 18

2.1.1 The Memory 21

2.1.2 The Microcontroller Clock 25

Clock Sources 26

Clock Outputs 26

Configuring the Operating Clocks 27

Performance and Power Consumption Considerations 28

2.1.3 Resets 28

2.1.4 The Input/Output Ports 29

TRISx 29

PORTx 31

LATx 31

ODCx 31

CNCON 31

SET, CLR, INV I/O Port Registers 31

Digital/Analogue Inputs 32

2.1.5 The Parallel Master Port (PMP) 33

PMCON 34

PMMODE 34

PMADDR 35

PMDOUT 35

PMDIN 35

PMAEN 35

PMSTAT 36

2.1.6 Timers 36

Timer 1 38

Timers 2, 3, 4, 5 45

2.1.7 Real-Time Clock and Calendar 47

2.1.8 Analogue-to-Digital Converter 48

AD1CON1 48

AD1CON2 49

AD1CON3 49

AD1CHS 51

AD1PCFG 51

AD1CSSL 52

Operation of the ADC Module 54

2.1.9 Interrupts 55

Configuring Timer 1 Interrupts 57

Configuring External Interrupt 0 58

PIC32 Interrupt Service Routines 58

2.2 Summary 59

2.3 Exercises 60

PIC32 is a 32-bit family of general-purpose, high-performance microcontrollers manufactured by Microchip Technology Inc. Looking at the PIC microcontroller development history, based on their performance, we can divide the PIC microcontroller families into low-performance, low-to-medium–performance, medium-performance, and high-performance devices.
Low-performance PIC microcontrollers consist of the basic 8-bit PIC10 and PIC16 series of devices that have been around for over a decade. These devices are excellent general-purpose low-speed microcontrollers that have been used successfully in thousands of applications worldwide.
The PIC18 series of microcontrollers were then introduced by Microchip Technology Inc. as low-to-medium–performance devices for use in high–pin count, high-density, complex applications requiring large number of I/O ports, large program and data memories, and supporting complex communication protocols such as CAN, USB, TCP/IP, or ZigBee. Although these devices are also based on 8-bit architecture, they offer higher speeds, from DC to 40 MHz, with a performance rating of up to 10 MIPS.
The PIC24 series of microcontrollers are based on 16-bit architecture and have been introduced as medium-performance devices to be used in applications requiring high compatibility with lower-performance PIC microcontroller families, and at the same time offering higher throughput and complex instruction sets. These microcontrollers have been used in many real-time applications such as digital signal processing, automatic control, speech and image processing, and so on, where higher accuracy than 8 bits is required, and at the same time higher speed is the main requirement.
PIC32 microcontroller family has been developed for high-performance, general-purpose microcontroller applications. The family offers 80 MIPS performance with a wide range of on-chip peripherals, large data and program memories, large number of I/O ports, and an architecture designed for high-speed real-time applications. PIC32 microcontrollers can be used in real-time applications requiring high throughput. Some of the application areas are digital signal processing, digital automatic control, real-time games, and fast communication. The chip employs the industry standard M4K MIPS32 core from MIPS Technologies Inc. PIC32 family offers programming interface similar to other PIC microcontroller families, thus making the programming an easy task if the programmer is already familiar with the basic PIC microcontroller architecture. PIC32 microcontrollers are pin-to-pin compatible with most members of the PIC24 family of 16-bit microcontrollers; thus, the migration from 16- to 32-bit operation should be relatively easy.
Figure 2.1 shows a simplified architectural overview of the PIC32 microcontrollers. At the heart of the microcontroller is a 32-bit M4K MIPS32 core processor that connects to the rest of the chip via a bus matrix and a peripheral bus. The bus matrix runs at the same speed as the core processor and connects various high-speed modules such as the USB, DMA, memory, ports, and so on. The peripheral bus can be programmed to run at slower speeds, and it connects to slower modules such as A/D converter, UART, SPI, Real-Time Clock and Calendar (RTCC), and so on.
Figure 2.1 Simplified Architecture of the PIC32 Microcontroller Family
The core processor has the following features:
80 MHz clock speed
32-Bit address bus and 32-bit data bus
Five-stage pipelining
Single-cycle ALU
Single-cycle multiply and high-speed divide module
2 × 32 register files
Other important features of the chip are the following:
2.3–3.6 V operation
Up to 512k flash program memory
Up to 32k SRAM data memory
Internal oscillators
Multiple interrupt vectors
UART, SPI, and I2C modules
Configurable watchdog timer and real-time clock
High-speed I/O with 18 mA current sink/source capability
Configurable open-drain output on I/O pins
External interrupt pins
PWM, capture, and compare modules
JTAG debug interface
Fast A/D converter and analogue comparator modules
Timers and counters
Hardware DMA channels
USB support
Large pin count for a wide range of peripherals and I/O ports
Wide operating temperature (−40 to +105°C)
Different chips in the family may have additional features, such as Ethernet support, CAN bus support, and so on.
Perhaps the best way of learning the PIC32 microcontroller family architecture is to look at a typical processor in the family in greater detail. In this book, the Digilent Cerebot MX3cK Development Board (has been renamed to chipKIT MX3) will be used. This board is equipped with the PIC32MX320F128H microcontroller (from the PIC32MX3XX/4XX family). In this chapter, we shall be looking at the architecture of the PIC32MX360F512L microcontroller from the same family. The architectures of other members of the PIC32 microcontroller family are very similar to the chosen one and should not be too difficult to learn them.

2.1. The PIC32MX360F512L Architecture


The PIC32MX360F512L is a typical PIC32 microcontroller, belonging to the family PIC32MX3XX/4XX. This microcontroller has the following features:
A 100-pin (TQFP) package
Up to 80 MHz clock speed
512k flash program memory (+12k boot flash memory)
32k data memory
5 × 16-bit timers/counters
5 × capture inputs
5 × compare/PWM outputs
Four programmable DMA channels
2 × UARTs (supporting RS232,...

Erscheint lt. Verlag 9.1.2015
Sprache englisch
Themenwelt Kunst / Musik / Theater Design / Innenarchitektur / Mode
Informatik Weitere Themen Hardware
Technik Elektrotechnik / Energietechnik
ISBN-10 0-08-099935-2 / 0080999352
ISBN-13 978-0-08-099935-7 / 9780080999357
Haben Sie eine Frage zum Produkt?
PDFPDF (Adobe DRM)
Größe: 73,0 MB

Kopierschutz: Adobe-DRM
Adobe-DRM ist ein Kopierschutz, der das eBook vor Mißbrauch schützen soll. Dabei wird das eBook bereits beim Download auf Ihre persönliche Adobe-ID autorisiert. Lesen können Sie das eBook dann nur auf den Geräten, welche ebenfalls auf Ihre Adobe-ID registriert sind.
Details zum Adobe-DRM

Dateiformat: PDF (Portable Document Format)
Mit einem festen Seiten­layout eignet sich die PDF besonders für Fach­bücher mit Spalten, Tabellen und Abbild­ungen. Eine PDF kann auf fast allen Geräten ange­zeigt werden, ist aber für kleine Displays (Smart­phone, eReader) nur einge­schränkt geeignet.

Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen eine Adobe-ID und die Software Adobe Digital Editions (kostenlos). Von der Benutzung der OverDrive Media Console raten wir Ihnen ab. Erfahrungsgemäß treten hier gehäuft Probleme mit dem Adobe DRM auf.
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 eine Adobe-ID sowie eine kostenlose App.
Geräteliste und zusätzliche Hinweise

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.

EPUBEPUB (Adobe DRM)
Größe: 26,2 MB

Kopierschutz: Adobe-DRM
Adobe-DRM ist ein Kopierschutz, der das eBook vor Mißbrauch schützen soll. Dabei wird das eBook bereits beim Download auf Ihre persönliche Adobe-ID autorisiert. Lesen können Sie das eBook dann nur auf den Geräten, welche ebenfalls auf Ihre Adobe-ID registriert sind.
Details zum Adobe-DRM

Dateiformat: EPUB (Electronic Publication)
EPUB ist ein offener Standard für eBooks und eignet sich besonders zur Darstellung von Belle­tristik und Sach­büchern. Der Fließ­text wird dynamisch an die Display- und Schrift­größe ange­passt. Auch für mobile Lese­geräte ist EPUB daher gut geeignet.

Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen eine Adobe-ID und die Software Adobe Digital Editions (kostenlos). Von der Benutzung der OverDrive Media Console raten wir Ihnen ab. Erfahrungsgemäß treten hier gehäuft Probleme mit dem Adobe DRM auf.
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 eine Adobe-ID sowie eine kostenlose App.
Geräteliste und zusätzliche Hinweise

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.

Mehr entdecken
aus dem Bereich