1
\$\begingroup\$

I wanted to do a little project with the µC mentioned above (TQFP-44 package). I looked into the datasheet, obviously. But there are multiple names for the pins which aren´t the voltage supply. How can I determine how the pins are labeled? Or does this depend upon the application of the µC?

\$\endgroup\$

2 Answers 2

1
\$\begingroup\$

It's pretty typical in microcontrollers today that each pin has more than one function it can be configured to implement. I'm not familiar with Microchip's scheme, but they'll have designed it so that the chip has some basic functionality coming out of reset -- then it's your job to write the software so that a given pin does what you want it to.

There's two directions you can go. You can use the manufacturer's tools, or you can closely study the datasheet, figure out how the chip works, and configure the thing yourself in software.

Most manufacturers also have wizards built into their tool chains that let folks who don't want, or can't, wrap their heads around doing the work in bare metal make the chip work. Usually these wizards don't work as well as they should, and don't play well with a mix of "wizard-generated" and "programmer generated" content, so I tend to not use them.

I usually take the opposite tack*, and closely study the datasheet. I can't speak for Microchip, but there's always some combination (sometimes large) of registers and/or register bits that can be configured to get a pin to function in a specific way. Some manufacturers are very good about thoroughly documenting this sort of functionality (i.e., ST), and some (i.e., Atmel) are horrible. I can't speak to Microchip's documentation, unfortunately.

* but I started in the 1980's, when a microcontroller with a couple of dual-purpose pins was really fancy, so I got ushered into this whole scheme gently, over a long period of time.

\$\endgroup\$
1
  • \$\begingroup\$ Thanks for the quick reply. So I found out that there is the MPLAB X IDE which I can use then to realize my project. \$\endgroup\$ Commented Mar 19, 2020 at 17:08
1
\$\begingroup\$

The labeling of the pins can be quite hard to understand if one is not familiar with the abbreviations and feature MCU (can) have. The actual "work" the pin does depends on how you set certain registers or maybe even fuses. Just for starters you dont have to worry about them too much. As you continue through the datasheet and explore the features you will come about the pins that change from their "normal" behavior depending on the settings.

Some pins you need to know as they are important for flashing (putting the software on) the chip are: Vcc, GND, Reset, MISO Master In Slave out, MOSI Master Out Slave in.

Dont worry to much how they work, the programm used for flashing does.

Also try to stay away from the jtag pins. They can be a hassle if you use those ports in your programm and did not disable jtag. Those pin normale have the names of : TMS, TCK, TDI, TDO.

And to at least answer one of your questions. Yes they depend on the application of the uC

\$\endgroup\$
2
  • \$\begingroup\$ I can't speak to the Microchip parts, but as soon as you repurpose a JTAG pin you can't use it for programming or debugging. This is, at best, a hassle, and if you don't take precautions you essentially brick the processor by remapping them. \$\endgroup\$
    – TimWescott
    Commented Mar 19, 2020 at 23:22
  • \$\begingroup\$ Some MCU have JTAG enabled per default, which could throw one off when you use them, but they dont do as objected, was what I wanted to point out. \$\endgroup\$
    – ownedcore
    Commented Mar 20, 2020 at 22:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.