21.07.2013 Views

Introduction to Microcontrollers Lab Manual - Microchip

Introduction to Microcontrollers Lab Manual - Microchip

Introduction to Microcontrollers Lab Manual - Microchip

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3.2.4 I/O Ports with Peripheral Pin Select (PPS)<br />

The Peripheral Pin Select (PPS) module controls the connection between digital hardware<br />

modules and the external device pins. Traditionally, microcontroller pins would<br />

only be internally connected <strong>to</strong> a specific hard module with a dedicated function. As<br />

microcontrollers became more complex, configuration options were provided <strong>to</strong> select<br />

the I/O of a hardware module from a small number of preconfigured options.<br />

The PPS module allows for ultimate configuration. For any pin controlled by the PPS<br />

module, a completely flexible connection matrix exists between the I/O of the hardware<br />

module and the device pins. Thus, any hardware module can be connected <strong>to</strong> any<br />

device pin. This allows for a much more flexible user configuration of hardware modules.<br />

The hardware modules managed by the PPS are all digital-only peripherals. These<br />

include general serial communications (UART and SPI), general purpose timer clock<br />

inputs, timer related peripherals (input capture and output compare) and external interrupt<br />

inputs.<br />

In comparison, some digital-only peripheral modules are not currently included in the<br />

Peripheral Pin Select feature. This is because the peripheral's function requires special<br />

I/O circuitry on a specific port and cannot be easily connected <strong>to</strong> multiple pins. These<br />

modules include I2C, high-speed communication (Ethernet and USB), change notification<br />

inputs, RTCC alarm output and all modules with analog inputs, such as the A/D<br />

Converter.<br />

A key difference between remappable and non-remappable peripherals is that remappable<br />

peripherals are not associated with a default I/O pin. The peripheral must always<br />

be assigned <strong>to</strong> a specific I/O pin before it can be used. In contrast, non-remappable<br />

peripherals are always available on a default pin, assuming that the peripheral is active<br />

and not conflicting with another peripheral.<br />

When a remappable peripheral is active on a given I/O pin, it takes priority over all other<br />

digital I/O and digital communication peripherals associated with the pin. Priority is<br />

given regardless of the type of peripheral that is mapped. Remappable peripherals<br />

never take priority over any analog functions associated with the pin.<br />

The PIC24FJ256GB110 has a <strong>to</strong>tal of 44 remappable pins, which includes 12 input only<br />

pins:<br />

• RP0-RP31 Remappable Peripheral (input or output)<br />

• RPI32-RPI43 Remappable Peripheral (input ONLY)<br />

2011 <strong>Microchip</strong> Technology Inc. DS51963A-page 27

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!