• 0

chipKIT pin number for LD5 on MAX32

Go to solution Solved by Sergiu,


I am working with the MAX32 board and want to control LD5.  The schematic shows that the control for this LED is connected to RC1.  However, the Reference guide (and the Excel pinout table show this as not assigned to a chipKIT pin number.  If I were working with XC32 and the MPLAB X IDE, I would simply write TRISCCLR = 0x01; and then use LATCSET and LATCCLR to turn the LED on or off. What are my options if I want to stay in the Arduino IDE format? .

Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0
  • Solution



If you look in the Max32 reference manual at page 9 of 20 you will find the "User LEDs" section.


User LEDs: Two user LEDs are provided, Pin 13 (LD4) and Pin 86 (LD5). Pin 13 is shared between a connector pin and LD4. Pin 86 is dedicated to LD5 and is not shared with any connector pin. Driving the pin high turns the LED on, driving it low turns it off. 

Pin 86 is the chipKIT pin.




Link to post
Share on other sites
  • 0

Thanks Sergiu, I missed that even though  I did a text search on the reference manual. I found the answer to my own question by searching the Arduino hardware/PIC32 files. I am not using mpide but the PIC32 core with the arduino IDE.  The answer to my question is to be found in the file Boards_Defs which contains the following define statements..

/* Define the pin numbers for the LEDs */
#define    PIN_LED1    13
#define    PIN_LED2    86

The full path to the C:\Program Files (x86)\Arduino\hardware\chipkit-core\pic32\variants\Max32/Boards_Defs.h

The pin number "86" is declared in C:\Program Files (x86)\Arduino\hardware\chipkit-core\pic32\variants\Max32/Boards_Data.c in the section'identified as "    //*    Pic32 EXTRAS start here (with #70"


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now