Jump to content
  • 0

schematic vs reality?


T22

Question

Okay, I need someone to please point out the key piece of information I'm missing.  I have years of microcontroller programming experience but am new to Digilient products.  I have a chipKIT Max32 with "REV D" printed on the back in silkscreen.  I look at the Rev D schematic on the Digilent website, and on sheet 5 of 5 there is a LED with reference designator "LD5" that is controlled by net "T2CK/RC1" (see snapshot below/attached).  On schematic sheet 3 of 5 I see where the net "T2CK/RC1" is connected to reference designator "IC2PC" "Port C" on pin 6 (see snapshot below/attached).  I program the most basic blink-LED example in MPIDE and... LD5 does not blink.  I Google the situation and find someone else having the same problem but is given the only partially helpful tip of "... LD5 isn't on pin 6, LD5 is on pin 86." (see link).  I change my MPIDE sketch to "int ledPin = 86;" and sure enough it works!  Looking through the schematic, pin 86 is a VDD pin on sheet 2 (see snapshot below/attached).  What is going on?  Can someone please point out my error in thinking?

DigilentSchematicLEDControl2.JPG

DigilentSchematicLEDControl0.JPG

DigilentSchematicLEDControl1.JPG

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Even the datasheet for the Microchip PIC32MX795F512L lists pin 86 as a VDD input (see below).  How can the MPIDE sketch possibly work using "int ledPin = 86;"  And yet it does.  Hmm...  ???

DigilentSchematicLEDControl3.JPG

Link to comment
Share on other sites

Although the NPN transistor package Q2 listed in the BOM from the Digilent site is a single unit (MMBT3904WT1G), the schematic and what I see before me is definitely a dual-package.  Luckily, the interconnections match a standard dual-package NPN pinout (link).  LD5 is definitely being controlled by pin6 of IC2 (PIC32MX795F512L).  How this maps to "int ledPin = 86;" in MPIDE I'll need someone to please explain to me.  Help!

Link to comment
Share on other sites

Hey T22,

So MPIDE has its own list of digital pin assignments that correspond with a particular physical port. So for the Max32, its digital PIN 86 maps to net T2CK/RC1 which is connected to PIN 6 on PORT C as you saw in the schematic. So "int ledPin = 86;" correctly maps to that pin because its the digital pin ID for it within MPIDE.

The digital pin assignments can all be found within the Board_Data.c file, which is within the MPIDE folder. Just go in to hardware -> pic32 -> variants then select the board you're using (Max32 in your case).

Hope this was helpful!

Regards

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...