The PIC24 support library is divided into
external components,
internal components, and
tools used in creating the library. External components should be called by the typical user to set up the PIC, communicate over the UART, I
2C bus, etc. Internal components include both implementation details and information on adding support for PIC24 processors not currently supported by this library. Following these three sections is a
library function summary, listing all functions available in the library.
A simple example which echos characters via the UART:
- Development support
- Peripheral support
SCons provides automated library building and testing. See
SConstruct.py for documentation of this process. Capabilities include:
- Automated build of all example code in the textbook
- Support for multiple copies of a device, such as the UART, I2C, and SPI, is auto-generated from templates which contain a single copy of the code. The templates/ directory contains the templates from which these files are built.
To maintain a consistent style, a batch file which runs the Artistic Style code formatter is available as runAStyle.bat.
This section lists all the commands available in the various sections of the library, providing a quick overview of the library's capabilities.
The file
pic24_delay.h defines:
The file in
pic24_generic.h defines:
The file
pic24_ports.h includes files which define:
- High-level port configuration: CONFIG_Rxy_AS_DIG_OUTPUT(), CONFIG_Rxy_AS_DIG_OD_OUTPUT(), CONFIG_Rxy_AS_DIG_INPUT(), CONFIG_ANx_AS_ANALOG()
- Low-level port configuration: ENABLE_Rxy_ANALOG(), DISABLE_Rxy_ANALOG(), CONFIG_RPy_AS_DIG_PIN(), ENABLE_Rxy_OPENDRAIN(), DISABLE_Rxy_OPENDRAIN(), ENABLE_Rxy_PULLUP(), DISABLE_Rxy_PULLUP(), ENABLE_Rxy_CN_INTERRUPT(), DISABLE_Rxy_CN_INTERRUPT()
- Remappable peripherlal support: CONFIG_xxx_TO_RP(pin)