This is my thirteen week in AESTE. Getting closer and closer to the end of my internship~  This week I continue with drawing Schematic.

😴 💤 💩 😈 👿 👹 👺 💀 👻 👽 🙌 👏 👋 👍 👊 ✊ ✌️ 👌 ✋ 💪 🙏 ☝️ 👆 👇 👈 👉

Nothing much to share about because its just drawing PCB based on past interns’ work and this link. Drawing schematic is really easy and straight forward. I am using KiCAD for my Schematic design. And cause I’m dealing with PIC32MZ chip I spend some time reading the datasheet and figuring the proper pin to use:

My 2Cents about PIC32MZ

Surprisingly PIC32MZ does not have VCAP pin, which provides a filtering capacitor for the internal voltage regulator (both PIC18 and PIC32MX do have). And the most interesting thing about PIC32MZ is the PPS(Peripheral Pin Select) feature.

PPS functionality for the following peripherals:
• CAN
• UART
• SPI (except SCK)
• Input Capture
• Output Compare
• External Interrupt (except INT0)
• Timer Clocks (except Timer1)
• Reference Clocks (except REFCLK2)

With this PPS feature on most of the PIC32MZ pin, all the pins with such function can be configured to any of the above peripherals, which will ease PCB routing and provide flexibility.


This week I also do some code searching for PIC32MZ to understand how to use PPS feature to enable SPI function. A good start would be to check out ‘<harmony>\apps\driver\spi\spi_loopback’. To make any PPS pin into SPI mode or others just ensure the following code is written in ‘sys_ports_static.c’ file in ‘SYS_PORTS_Initialize’ function (assuming you are using HARMONY)

PLIB_PORTS_RemapInput(PORTS_ID_0, INPUT_FUNC_SDI1, INPUT_PIN_RPD14 );
//RPD14 will become SPIRX
PLIB_PORTS_RemapOutput(PORTS_ID_0, OUTPUT_FUNC_SDO1, OUTPUT_PIN_RPD10 );
//RPD10 will become SPITX

Keeping in mind SPI clock pin (start with ‘SCK’ name) cannot be configured.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.