Jump to content
  • 0

chipKIT pin number for LD5 on MAX32


Flyline

Question

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 comment
Share on other sites

2 answers to this question

Recommended Posts

Hello,

 

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

http://digilentinc.com/Data/Products/CHIPKIT-MAX32/chipKIT_Max32_RM.pdf

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.

 

Sergiu

 

Link to comment
Share on other sites

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 comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...