Pin-Planner for PIC24FxxxDA1/DA2/GB2

A Pin Mapping and Planning tool for PIC24FJ256DA210 Family of PIC® Microcontrollers

           

I.          Introduction. 1

II.         Installation. 1

III.       Launching the tool 5

IV.       Providing input about your system.. 6

1.     Select a target device. 6

2.     Chose peripheral Modules. 7

V.        Reading the Mapping report 13

1.     Visual Mapping of pins. 13

2.     Unmapped resources. 18

3.     Word of caution and Disclaimer 19

 

I.                   Introduction

The PIC24FJ256DA210 family of microcontrollers, like other PIC family, is loaded with many peripherals. The “Pin-Planner For PIC24FxxxDA1/DA2/GB2” is an aid to quickly map the user’s system requirements with the pin resources available on the Microcontroller. The User inputs his choice of peripherals into the tool and the tool finds out how many pins will be needed for that application, what are the pin conflicts and free pins available for expansion. The user can thus fine tune his system. ‘Pin-Planner For PIC24FxxxDA1/DA2/GB2’ does an ad-hoc analysis for quick prototyping.

II.                Installation

You must have downloaded the ‘Pin-Planner_For_PIC24FxxxDA1-DA2-GB2.zip’ from microchip website.

 

1.                  The tool is written in Microsoft Excel Macros and VB scripts. You will need MS Excel 2003 or later installed on your machine. (The tool might work with previous versions of MS excel, but it is not tested on versions before 2003)

2.                  Unzip the package.

3.                  Make sure that you unzip the files onto a local machine and not a networked folder

4.                  You should see two excel files. Pin-Planner_For_PIC24FxxxDA1-DA2-GB2.xls and device-info.xls along with License document and User guide.

5.                  Make sure the files ‘Pin-Planner_For_PIC24FxxxDA1-DA2-GB2.xls’ and ‘device-info.xls’ are in the same folder.

 

1.                  The tool is implemented using Visual Basic Script. The security settings of MS Excel should be set at medium

2.                  Open Microsoft Excel

3.                  Go to Tools->Macros and click on ‘Security’

 

 

4.                  Chose Medium and click OK to set the security to Medium, security level below medium is not recommended.

 

5.                  NOTE: from now on, when you open an Excel work book with Macros, you will be prompted to Enable or Disable the Macros in it.

6.                  Click Enable, when you open ‘Pin-Planner_For_PIC24FxxxDA1-DA2-GB2.xls’

7.                  Additional Debug Tip: If you find errors after launching the tool make sure you have the proper Add-Ins enabled in Excel. To check this,

1.      Go to Tools and click Add-Ins

 

2.      Make sure you have the following Add-Ins enabled.

 

 

 

III.              Launching the tool

The tool is implemented within an Excel work book. The tool needs device-info.xls for the device and pin related data. To launch the tool

1.                  Open the Pin-Planner_For_PIC24FxxxDA1-DA2-GB2.xls file by double clicking on it.

2.                  If you had set your Macro security level to Medium you should see the screen prompting you to enable or Disable the Macros

 

3.                  Click ‘Enable Macros’

4.                  This should bring you to the following screen.

 

5.                  We are now looking at the Pin-Planner For PIC24FxxxDA1/DA2/GB2 home screen

 

IV.            Providing input about your system

1.                Select a target device

The Pin-Planner_For_PIC24FxxxDA1-DA2-GB2 can help you with more than one devices from the PIC24FJ256DA210 family. This list of devices is available from the drop down menu. Click on the cell next to “Select the Device”.  An arrow (tiny triangle) should appear at the bottom right corner of the cell. Click on it and select a device from the drop down menu.

Rounded Rectangular Callout: Click on this cell and then on the tiny triangle to the right to bring up the list of devices.

 

 

 

 

2.                Chose peripheral Modules

Now that the target device is set, go ahead and chose the peripherals required for your system.

1.      Click on the check boxes against the peripheral that you will need in your system.

Rounded Rectangular Callout: Use this check box to check/uncheck all available modules for the selected deviceRounded Rectangular Callout: Check or uncheck the box. Your selection is mirrored by True or False indication

Note: Depending on the Target Device you have selected, some peripherals may be mandatory and some may be unavailable to you.

 

2.      Certain options are available only once you declare that you need the subsystem in a line above. Example, USB, PMP etc.

 

     Note above that while USB appears in Larger letters, the USB options like “USB Host Mode” etc are not highlighted. You will not be able to select these sub options until USB subsystem is checked.

 

            Once USB is checked, the sub options will be available for selection and will be shown in bold letters.

 

3.      If you see a pink colored box to the right of any peripheral, it means that further options of configuration are available for that peripheral.

The options available are

a.       Number of Direct Pins:

                                                                                                   i.      Some peripherals have dedicated (fixed) pins on the MCU. Input number of such pins you would like to use in the box

b.      Number of RP Pins Input/Output:

                                                                                                   i.      Some peripherals use Remap-able pins to route input and output. Select the number of  Input pins and Output pins

 

Rounded Rectangular Callout: Input field for number of ADC channels needed in your project

 

c.       In the example above, for ADC, you must input the number of channels required for your design.

 

4.      The number of unallocated channels will show up in the cell as illustrated (after generating the mapping). This is a tool output.

 

Rounded Rectangular Callout: The number of unallocated ADC channels will be reported here

 

 

 

 

 

5.      Some more options:

a.       Remove Redundant pin functions from Mapping: The tool makes an ad-hoc analysis of the input and selects the pin assignments. The decision made by the tool when it chooses a pin for a function can be made available to the user. The tool documents its decisions by striking through the choices on each pin that had multiple functionalities. If you do not need this information you may check this box and make them go away to reduce clutter.

b.      ALTPMP : The tool needs to know if you are planning on using the ALTPMP configuration bit in your project. If ALTPMP is enabled (reset to zero) please check the box.

c.       ALTVREF: The tool needs to know if you are planning on using the ALTVREF configuration bit in your project. If ALTVREF is enabled (reset to zero) please check the box.

Rounded Rectangular Callout: Check this box if you have enabled ALTPMP in config bits.Rounded Rectangular Callout: Check this box if you have enabled ALTVREF in config bits.Rounded Rectangular Callout: Uncheck this box if you need to know the choices made by the tool (not all choices may be shown)

 

6.      Once you are happy with your input click on Generate Mapping.

Rounded Rectangular Callout: Click here once you are done with your inputs. 

 

With the click on “Generate Mapping”, the tool now opens the Device-info.xls and tries to map the pins required for your system configuration.

NOTE: The Excel application will be unresponsive for some time. That is just the tool finding information and analyzing it. You should see a Progress bar on the bottom left corner.

 

Rounded Rectangular Callout: When the Tool is working the status is shown here

7.      Once the tool is done working the following indication will appear. It is strongly recommended that you do not type or use other input devices when the tool is working. Your input might overwrite some of the critical data in the device-info.xls.

 

Rounded Rectangular Callout: Wait for this Message box to appear. This message signals end of analysis.Rounded Rectangular Callout: Click here to go back to the top of the page and change the inputs to the tool 

Rounded Rectangular Callout: Status bar should say Analysis Done!
 


8.      It is not uncommon for the tool to take up to a couple of minutes if the inputs are complex.

 

V.               Reading the Mapping report

1.                Visual Mapping of pins

 

With the click on “Generate Mapping”, the tool now opens the Device-info.xls and tries to map the pins required for your system configuration.

NOTE: you might see screen flicker and jump through different sheets. That is just the tool trying to find information and tabulating the results.

 

1.      Once the tool is done, you will be dropped to a page which looks as below.

 

 

The picture above is a pin mapping of a 121 pin Ball Grid Array (BGA) device. The pins requested for your system are marked. Other pins are left blank.

 

 

2.      If there are any conflicts in the pin mapping, they will appear as red. The choices available on that pin are shown separated by a ‘/’

3.      Had you Un-Checked the option of  Remove un-mapped pins form report” the above reports will appear as shown Below.

 

 

4.      Here is an example screen shot from the report for 100 pin TQFP package

 

5.      You may have to resize some rows or columns to read the full contents of pin information.

 

 

2.                Unmapped resources

Whenever possible, the tool will report the number of un-mapped pins under the column “Number of pins that could not be allocated”

 

Rounded Rectangular Callout: The number of unmapped pins will be reported under this column.

 

3.                Word of caution and Disclaimer

While The Pin Planner tool can help in quick prototyping and heuristic analysis, it is not meant to replace the analysis of an engineer. The tool makes some assumptions while picking pin functionality for a requested resource which may be suboptimal to user’s system. A thorough analysis based on the latest Datasheet by an engineer is always recommended before taking any design decisions.