element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Autodesk EAGLE
  • Products
  • More
Autodesk EAGLE
EAGLE User Support (English) Tidy schematic after pinswap
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Autodesk EAGLE to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 12 replies
  • Answers 1 answer
  • Subscribers 191 subscribers
  • Views 2400 views
  • Users 0 members are here
  • pinswap schematic
Related

Tidy schematic after pinswap

alberthall
alberthall over 10 years ago

I am working on a design using a microcontroller using analogue inputs and digital I/O.   The analogue pins can be swapped and the digital pins can be swapped at will (with commensurate changes in the firmware).  I have set the swap levels on the part to allow this.  I put short wires on each pin and named them and did likewise with the parts they connected to.  The parts on the board layout are connected correctly but the layout would be better if some pins were swapped.   So, on the schematic I swap some pins and the board layout correctly reflects the changes.   The problem is that the schematic is now a mess wire wires draped all over the microcontroller.  I tried using Bus/Net but the result is similar.

 

Is there a way of using pinswap without making a mess of the schematic?

  • Sign in to reply
  • Cancel
  • hanseltime
    0 hanseltime over 8 years ago

    Hey all,

     

       I came across this question and almost lost hope based on the comments.  HOWEVER, there is a work around that will allow for modularity in schematics without changing PCB pad design.  What i wanted was a schematic symbol that I can physically alter the pin arrangement so i don't have a schematics rats nest, all while maintaining the pin-to-pad linking that was there in the first place.

     

       The Solution I have:

      

    1. Create a symbol level pin for the library you are working in.
      1. This is a simple as simply placing a pin and saving it as a generic PIN1
      2. Note: If you want to be able to PIN SWAP STILL you will need to produce a number of pins equal to the number of swappable pins on your final schematic part (i.e. if you expect 36 swappable pins on a part, then that library can have PIN1 -PIN36 defined).  This is because pinswap will not occur if the pins have the same symbol name for a component part.
    2. Create the symbol for the package SANS pins.
      1. This takes a little bit of work on your part to make sure the package is the right size for the size pins you created.
    3. Create a Device
      1. Choose the Package you already have designated for the part you will use
      2. Go to Change-> Add Level (Always), means that every component you add will be placed immediately.  You can look at the other levels if you are interesting in more interesting device placements.
      3. In order to do a gateswap, change the swap level to non-0 in the device creation manager.  Note, this is different than the swap level of the individual PINS you will be adding in regards to pin swapping.
      4. Add+ :
        1. Your Strictly Symbolic Package Body
        2. Each Pin the body should have
          1. Place them according to how you would have if designing the symbol as a single package.  (You can place PIN 1 for all of them if you don't care about pinswapping, or can add different pin symbols for swappability in the future)
          2. Change the NAME of each pin to the PIN number you expect (i.e. 1,2,3, etc.)
      5. Connect the Pins on the Package to the Pins on the Device; the pins will have format {NAME.SchematicPinName}.
    4. In your schematic you may now Place the Device.
      1. Caveats:
        1. Each Pin and the body are now moveable on their own.  To do operations or rotations, use group select and group move or rotate.
        2. If you have not Net connected any pins, a quick way to swap pin orientation is to use GATE SWAP.  Warning:  If you have Connect Pin1 to Vin and Pin 3 to D+, GATE Swap on Pin 1 and 3 will swap the pins on the schematic, but will not maintain the routed connection (i.e. Pin 3 now goes to Vin, and Pin 1 now goes to D+)
        3. If you want to maintain the already routed net, then individually select the pins and reposition them in the schematic.

     

    I hope this helps.  While there are some caveats, this beats having to version name every single pin change if you want to have a nice schematic and useable device!

     

    Let me know if this fails in any ways!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • e14candies
    0 e14candies over 10 years ago

    Sounds like you want to have a neat board layout (without undue ratsnest)

    AND a neat schematic,without a wire maze.  Your best bet is to

    redefine/optimize your microcontroller symbol definition pin arrangement to

    give an uncluttered schematic.   I wish the editor would let you simply

    "drag" pins around on a microcontroller to neaten things up.

    --

    Web access to CadSoft support forums at www.eaglecentral.ca.  Where the CadSoft EAGLE community meets.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • alberthall
    0 alberthall over 10 years ago in reply to autodeskguest

    So the short answer is 'no' - it can't be done.

    But my thanks to Warren for a suggestion to help minimise the mess.

     

    Ah, well, onwards and upwards...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • autodeskguest
    0 autodeskguest over 10 years ago in reply to autodeskguest

    On 07/02/16 10:25, Matthias Dingeldein wrote:

    If the pins are not equivalent, your idea is the best way to handle it, but

    in case of logic gates (for example) I can't see any reason why "just

    renumbering" might cause any trouble

     

    The problem is that you're looking at a (potentially small) subset of

    cases and saying "my way works for these, so it's good". That's very bad

    logic. You can't extrapolate from the specific to the general in a

    positive sense. I'm saying "here are some cases where it doesn't work",

    which is sufficient to exclude it as a general solution. Now, perhaps,

    it might be of limited use as a user-triggered "tidy-up" option, but I

    suspect the extra overhead of maintaining the ability to arbitrarily

    swap pin numbers within a schematic symbol (which, I should point out,

    is NOT SOMETHING EAGLE CAN DO at the moment, for generally good reason)

    would be worth it. Especially as, due to the existence of cases where

    it's blatantly wrong, there would need to be an extra layer of "allow

    this to be done" conditions in the library component definition.

     

    Besides, for the bulk of your cases (logic gates) it's already quite

    easy for the user to tidy up with a combination of mirror and rotate.

     

    And, apparently unlike you, I positively detest schematics which show

    the pin-out order from the arbitrary package (which is often different

    between SSOP and TQFP anyway) in preference to the logical pin ordering

    that functionality implies. My CPU parts are ALL shown on the schematic

    with the port pins in bit number order.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • autodeskguest
    0 autodeskguest over 10 years ago in reply to autodeskguest

    Rob Pearce wrote:

     

    On 06/02/16 19:22, Matthias Dingeldein wrote:

      1. swapping with cleanup:

     

    ---+                    ---+                 ---+

    d1|-a                 d1|-a            d1|---a

    d2|-b   pinswap 2&4   d2|-\ /-b  cleanup   d4|---b

    d3|-c                 d3|Xc            d3|---c

    d4|-d                 d4|-/ \-d            d2|---d

    ---+                    ---+                 ---+

     

    No, that's not how you do it. You do:

     

    ---+                    ---+                 ---+

      d1|-a                 d1|-a            d1|---a

      d2|-b   pinswap 2&4   d2|-\ /-b  cleanup   d2|---d

      d3|-c                 d3|Xc            d3|---c

      d4|-d                 d4|-/ \-d            d4|---b

    ---+                    ---+                 ---+

     

    So there is practically no way to really clean up - either you have the

    crossing on the board, or you have it on the schematic. This only happens,

    when it is impossible to swap the pins, because they are not equivalent.

     

    Because to do the other:

     

      1. swapping by exchanging the pin numbers in schematic:

     

    ---+                    ---+

    d1|-a                 d1|---a

    d2|-b   pinswap 2&4   d4|---b

    d3|-c                 d3|---c

    d4|-d                 d2|---d

    ---+                    ---+

     

    results in your port labelling being OUT OF SEQUENCE.

     

    Yes, often the pins are not in order on the package, but in the schematic. I

    would rather like a renumbering of equivalent ports in the schematic (as it

    is on the real part) than wild crossings of signals either on the board or

    in the schematic, only to maintain neatly assorted numbers/pin names in a

    block, which represents a part with a seemingly random enumeration of its

    physical pins.

    If the pins are not equivalent, your idea is the best way to handle it, but

    in case of logic gates (for example) I can't see any reason why "just

    renumbering" might cause any trouble, and concerning port pins the only

    possible trouble is, when one swaps pins without keeping in mind, that the

    signal now has a different port number (because the port pins are not as

    equivalent as the pins on a logic gate, and therefore require more thinking

    when swapped).

     

    Gruss, Matthias Dingeldein

     

    --

    Guillotinen sind nicht reziprok, aber das macht nix,

    die werden eh nur fuer die Hinrichtung verwendet

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • autodeskguest
    0 autodeskguest over 10 years ago in reply to autodeskguest

    On 06/02/16 19:22, Matthias Dingeldein wrote:

      1. swapping with cleanup:

     

    ---+                    ---+                 ---+

    d1|-a                 d1|-a            d1|---a

    d2|-b   pinswap 2&4   d2|-\ /-b  cleanup   d4|---b

    d3|-c                 d3|Xc            d3|---c

    d4|-d                 d4|-/ \-d            d2|---d

    ---+                    ---+                 ---+

     

    No, that's not how you do it. You do:

     

    ---+                    ---+                 ---+

      d1|-a                 d1|-a            d1|---a

      d2|-b   pinswap 2&4   d2|-\ /-b  cleanup   d2|---d

      d3|-c                 d3|Xc            d3|---c

      d4|-d                 d4|-/ \-d            d4|---b

    ---+                    ---+                 ---+

     

    Because to do the other:

     

      1. swapping by exchanging the pin numbers in schematic:

     

    ---+                    ---+

    d1|-a                 d1|---a

    d2|-b   pinswap 2&4   d4|---b

    d3|-c                 d3|---c

    d4|-d                 d2|---d

    ---+                    ---+

     

    results in your port labelling being OUT OF SEQUENCE. This is far too

    ugly. Much better have the tool leave something you need to tidy than

    have it force you to accept that c&^p.

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • autodeskguest
    0 autodeskguest over 10 years ago

    On 7/02/2016 3:07 a.m., James Thurgood wrote:

    I am working on a design using a microcontroller using analogue inputs

    and digital I/O.   The analogue pins can be swapped and the digital pins

    can be swapped at will (with commensurate changes in the firmware).  I

    have set the swap levels on the part to allow this.  I put short wires

    on each pin and named them and did likewise with the parts they

    connected to.  The parts on the board layout are connected correctly but

    the layout would be better if some pins were swapped.   So, on the

    schematic I swap some pins and the board layout correctly reflects the

    changes.   The problem is that the schematic is now a mess wire wires

    draped all over the microcontroller.  I tried using Bus/Net but the

    result is similar.

     

    Is there a way of using pinswap without making a mess of the schematic?

     

    --

    To view any images and attachments in this post, visit:

    https://www.element14.com/community/message/173714

     

     

     

    Hi James

     

    It is what it is and the use of stub nets from the pins is as good as

    you can do.

     

    When the pin swap occurs, the end of the net segments attached to the

    pins are moved. If the last run to the pin is long, it appears as if

    lot of the schematic has been defaced.

     

    In this case there is a technique you can employ that you may benefit from.

     

    Just before you do the pin swap, drop a junction on the net just out

    from each of the pins you will swap. That will make the segment

    connected to the pin only as long as that from the junction to the pin,

    like a stub. In that way only the nets in the area of the pins are

    affected and the clean up is easier to envisage.

     

    HTH

    Warren

     

     

     

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • autodeskguest
    0 autodeskguest over 10 years ago in reply to autodeskguest

    Rob Pearce wrote:

     

    On 06/02/16 15:59, Matthias Dingeldein wrote:

    Why? To swap two equivalent pins on the board you only have to change the

    pin number in the schematic, nothing has to be redrawn (otherwise the

    pins were not swapable in the first place).

     

    But to swap pin numbers in the schematic **FUNDAMENTALLY CHANGES THE

    DEVICE** and is thus absolutely not an option.

     

    Yes, if the position of the pin in the schematic defines which pin it is. If

    you have pin numbers, you can draw it anywhere*) and it stays the same pin.

     

    It may work for many

    cases - the simple logic gates could be mirrored in an appropriate axis,

    if there were a predictable way to identify that axis - but not in the

    general case.

     

    I don't think you have to mirror anything, if you identify the used pin by

    its number.

     

    Specifically, in the case that the OP asked about, he is

    swapping pins of a micro. Thus your "just swap the pin numbers" idea

    would result in two port pins being wrongly allocated. That's FAR WORSE

    than the mess that currently needs cleaning up.

     

    If you do a pinswap, you have the same problem with "wrongly" allocated

    pins, only difference is, the nets attached to the pins follow the swap and

    have to be rerouted to where they were in the first place, and connect to

    the new (swapped) pin. If that is impossible, you can't swap the pins,

    otherwise you get the exact same result as when you just exchange the pin

    numbers in the schematic. Some ASCII-Art against misunderstandings:

     

      1. swapping with cleanup:

     

    ---+                    ---+                 ---+

    d1|-a                 d1|-a            d1|---a

    d2|-b   pinswap 2&4   d2|-\ /-b  cleanup   d4|---b

    d3|-c                 d3|Xc            d3|---c

    d4|-d                 d4|-/ \-d            d2|---d

    ---+                    ---+                 ---+

     

    d1=Pin1                 d1=Pin1              dito

    d2=Pin2                 d2=Pin4

    d3=Pin3                 d3=Pin3

    d4=Pin4                 d4=Pin2

     

      1. swapping by exchanging the pin numbers in schematic:

     

    ---+                    ---+

    d1|-a                 d1|---a

    d2|-b   pinswap 2&4   d4|---b

    d3|-c                 d3|---c

    d4|-d                 d2|---d

    ---+                    ---+

     

    d1=Pin1                 d1=Pin1

    d2=Pin2                 d2=Pin4

    d3=Pin3                 d3=Pin3

    d4=Pin4                 d4=Pin2

     

    In both cases the pins d2 and d4 finally connect to the other signal (that

    is why the pins were swapped). This doesn't matter concerning the function

    (otherwise the pinswap is not possible), and since the schematic represents

    the function of the device, it doesn't matter where*) the signal is attached

    to the block representing the device in the schematic, as long as the pin

    number defines the connector rather than the position on the block (but in

    this case you don't have pin numbers to swap, and so the reason for the idea

    with just renumbering disappears).

    Same thing with gateswap, btw.

     

    Gruss, Matthias Dingeldein

     

    *) well, on a block like for a microcontroller, or anywhere on one side for

    a logic gate

    --

    Guillotinen sind nicht reziprok, aber das macht nix,

    die werden eh nur fuer die Hinrichtung verwendet

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • clem57
    0 clem57 over 10 years ago

    When you have overlap, try to place devices/packages in better location(s).

    Clem

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • autodeskguest
    0 autodeskguest over 10 years ago in reply to autodeskguest

    On 06/02/16 15:59, Matthias Dingeldein wrote:

    Why? To swap two equivalent pins on the board you only have to change the

    pin number in the schematic, nothing has to be redrawn (otherwise the pins

    were not swapable in the first place).

     

    But to swap pin numbers in the schematic **FUNDAMENTALLY CHANGES THE

    DEVICE** and is thus absolutely not an option. It may work for many

    cases - the simple logic gates could be mirrored in an appropriate axis,

    if there were a predictable way to identify that axis - but not in the

    general case. Specifically, in the case that the OP asked about, he is

    swapping pins of a micro. Thus your "just swap the pin numbers" idea

    would result in two port pins being wrongly allocated. That's FAR WORSE

    than the mess that currently needs cleaning up.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube