Microchip PIC32CX1025SG41128 Manual

Microchip Ikke kategoriseret PIC32CX1025SG41128

Læs gratis den danske manual til Microchip PIC32CX1025SG41128 (10 sider) i kategorien Ikke kategoriseret. Denne vejledning er vurderet som hjælpsom af 12 personer og har en gennemsnitlig bedømmelse på 4.1 stjerner ud af 6.5 anmeldelser. Har du et spørgsmål om Microchip PIC32CX1025SG41128, eller vil du spørge andre brugere om produktet?

Side 1/10
TB3291
The Difference Between MPLAB Harmony v3 PLIBs and
Drivers, and When to Use Them
Introduction
MPLAB® Harmony v3 provides layered and modular software libraries that support a flexible embedded software
development model. The core libraries under MPLAB Harmony v3 includes Peripheral Libraries (PLIBs), drivers, and
system services. The PLIBs provide low-level device-specific support. The drivers and system services provide
hardware abstraction upon which a highly capable Middleware is built.
This document explains the differences between the MPLAB Harmony v3 PLIBs and drivers, and it also describes
when to use them.
© 2020 Microchip Technology Inc. Technical Brief DS90003291A-page 1
1. Description
1.1 Peripheral Libraries
The MPLAB Harmony v3 Peripheral Library (PLIB) is a low-level interface library to access a peripheral on a
microcontroller. The PLIB Application Program Interfaces (APIs) hide peripheral register details and make it easier to
configure the peripheral per the application requirements by calling the PLIB APIs.
The MPLAB Harmony v3 Peripheral Library features are as follows:
Simple and user-friendly APIs.
Abstraction layers are not implemented; has direct register access.
Clean code and no conditional macros (for example, #if, #elif).
Easy to integrate into existing applications.
Self-containing and self-sufficient implementation. In general, all PLIBs are interrupt driven, but few PLIBs have
blocking implementation in addition to interrupt driven implementation.
PLIBs can be easily extended to add new features.
PLIBs provide status using polling and interrupt mode (through a callback mechanism) implementation models
for data transaction operations. By using these models, the application can either poll the status of the submitted
request, or choose to get notified when the request is complete by registering a callback API in an application.
Consistent API signature for similar peripherals across 32-bit SAM and PIC microcontroller families. The
following table illustrates the PLIB API signatures.
Usage UART SPI I2C/TWI
Initialization UARTx_Initialize() SPIx_Initialize() TWIx_Initialize()
Transaction
UARTx_Write() SPIx_Write() TWIx_Write()
UARTx_Read() SPIx_Read() TWIx_Read()
-SPIx_WriteRead() TWIx_WriteRead()
Status
UARTx_ReadIsBusy()
SPIx_IsBusy() TWIx_IsBusy()
UARTx_WriteIsBusy()
1.2 Drivers
The MPLAB Harmony v3 drivers are a highly abstracted interface to control, access, manage peripherals, and other
resources on the 32-bit SAM and PIC microcontrollers. The driver interface allows applications and other client
modules (drivers, Middleware libraries and system services) to interact with the peripheral.
The following are MPLAB Harmony v3 driver features:
Abstracted interfaces: Enables portability and interoperability.
Drivers are built on the top of the PLIBs.
A driver is capable of handling multiple instances of a peripheral without duplicating the driver code to handle
the individual instance of a peripheral. The multiple instance support of MPLAB Harmony v3 drivers enables the
application to remain the same even when the peripheral instance is changed.
USART Driver API USART PLIB API
DRV_USART_WriteBufferAdd(…)
USART1_Write(…)
USART2_Write(…)
TB3291
Description
© 2020 Microchip Technology Inc. Technical Brief DS90003291A-page 2


Produkt Specifikationer

Mærke: Microchip
Kategori: Ikke kategoriseret
Model: PIC32CX1025SG41128

Har du brug for hjælp?

Hvis du har brug for hjælp til Microchip PIC32CX1025SG41128 stil et spørgsmål nedenfor, og andre brugere vil svare dig