Connecting some pins together (mega88)

Go To Last Post
23 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Everybody,

 

I'm making very small board for a mega88 - tqfp32 and I'm not able to expose on the dedicated pin-header as many pins as I would like to. So I'm inclined to connect/combine some together, for example PD1 (TXD/PCINT17), PC4(ADC4/SDA/PCINT12), so either I will use UART or I2C, and make sure the other one will be high-z disabled. Except making sure that I do not enable both of these at the same time, is there something else that could be seen wrong/bad? This is for low volume personal board (nothing commercial, no noise, no abuse, no expectation to work 24/7 and not expecting to last long either). Thanks in advance for any opinions.

This topic has a solution.
Last Edited: Mon. Feb 3, 2020 - 03:56 AM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Should be okay as far as I can see, but as you understand this is not a recommended practice.  If you get your program wrong, you will blow your chip.  So don't do that...  (my code never has bugs in it...cheeky  S.

 

Edited to add:

You might consider making another board that doesn't have those ridiculous size constraints on it for testing and programming purposes.  Once you've got the program right, then you can make the dinky little board you seem to need.  Making the board too small to start with is premature optimization, and you know what we think about that...  S.

Last Edited: Sun. Feb 2, 2020 - 09:02 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you, yes I have a more forgiving version already, but now I'm trying to do the compromises and cramp it and was worried I wouldn't able to get it shrinked into the form factor at all.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You could always put 500 ohms between the pins (instead of a direct tie), then no damage can occur.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That just seems like an incredibly bad idea...

I hate hardware that has the ability to destroy itself if the software isn't perfect.

 

Are you laying out parts on both sides of the PCB?

That might free up some more room for an additional header, or for the resistors mentioned above.

 

Another option might be to bring the pins you definitely want / plan to use to their own header pin.

Then route the others to pads.

Then you can use a small jumper wire to connect the pad of the desired pin to the pad of a header pin.

In this was you can at least select whichever I/O pins you actually need to use without the risk of frying the chip.

 

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, but the other side is full with a lot of other stuff. 1.27mm pin header and still no extra space left.

 

In one case I had to actually go through a Pin which I didn't need/wanted just because the other side couldn't take a via.

 

But I have tiny space left under the package, so I could maybe have an exposed pad for a jumper/solder wire, or have it the opposite way, exposed jumper trace for an easier cut.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In one case I had to actually go through a Pin which I didn't need/wanted just because the other side couldn't take a via.

That sounds a bit extreme...maybe try another round of layout 

Where is your schematic?

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrcandies wrote:

In one case I had to actually go through a Pin which I didn't need/wanted just because the other side couldn't take a via.

That sounds a bit extreme...maybe try another round of layout 

Where is your schematic?

 

Yes, it's not ordinary board and it's not meant to be robust, more like cramming maximum of stuff into constrained space, the schematic should go public after I'm done with the project.

 

Thanks for the input, but no point doing layouts again, the board is ~12mm in height and barely fits the MCU there, not much extra space for traces (for the nort/south regions of mcu, tired different rotation and no way around it). And using the opposite side and vias is mostly no-go as the other side mostly is capacitive sense planes.

 

So the layout is staying as it is, and either some pins / features will not be available at all (no pins connected), or will be available under critical constrains (pins connected, and sw needs to be super careful). So that's why I asked about the pins and not about the layout.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

schematic should go public after I'm done with the project

That's usually nearly the worst time (worst is when you've already built 5000 boards). 

 

but no point doing layouts again  ... and it's not meant to be robust

 I'd like to purchase 100 as soon as they are available.

 

This is for low volume personal board

Well ok, that might be tenable 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Mon. Feb 10, 2020 - 06:47 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrcandies wrote:

I'd like to purchase 100 as soon as they are available.

 

I know you try to be funny, but I mentioned in the first post that's nothing commercial. And no 5000 boards will not be made, maybe 160 just because it will be the smallest amount the fab will do (but do not intend to populate all of them anyway, so the run is even smaller). And I'm completely fine to do another revision if something surfaces (just needed confirmation if there is something else odd happening with pins even if the software will be 100% correct and careful). I'm not asking to get a guarantee that it will be flawless and perfectly reliable, just if there is something wrong except the very obvious (that bridging pins is not good idea to begin with). Now there are dedicated places to easily cut the bridge between the pins (under the MCU, so it can be done before soldering) and if there is a problem the board can be tweaked to just plain regular small dev board without a need to respin the layout and that can't be shown from schematic only.

 

This board is not about doing things perfectly and by the book, but experiment with few things within very odd constrains.

The schematics is nothing special anyway so sharing it now will not show anything ordinary except the mentioned pins connected together, so from schematic viewpoint, I already communicated what makes it special. The board layout is where the constraints are coming from and driving the desire to bridge the pins.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

truhlik_fredy wrote:
And using the opposite side and vias is mostly no-go as the other side mostly is capacitive sense planes.

No idea how this may affect Cap Sense if two pins (one or both are cap touch capable), will there be an interaction?  Don't know.

So seems like a generally bad idea, but if at least one is an input(default) you may get away with it, until you don't!

 

Jim

 

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DocJC wrote:
I hate hardware that has the ability to destroy itself if the software isn't perfect.

 

So what you would do as HW protection for flying SW (planes/drones), not allow them to lift up at all?

For flying stuff we have strict coding standards to make sure the software is correct, you can't protect everything on the hardware side.

And what about just regular non-flying hw which has FPGAs, you can't put diodes/resistors/protection on everything just because the FPGA can reprogram itself from SW and in essence change partially even board layout, if you have need some high-speed low-voltage traces you need to trust that somebody will not reprogram it to something completely stupid and you will not affect you signal integrity just to expect everything completely wrong everywhere.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ki0bk wrote:

No idea how this may affect Cap Sense if two pins (one or both are cap touch capable), will there be an interaction?  Don't know.

So seems like a generally bad idea, but if at least one is an input(default) you may get away with it, until you don't!

 

The cap sense pins are not bridged and are not exposed to the pinheader, while few of the other GPIOs (with extra features) are bridged and exposed (to be able to use I2C or UART from the pin header). Yes that's the hope, keep others in High-Z and hopefully not regret it :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

truhlik_fredy wrote:

I hate hardware that has the ability to destroy itself if the software isn't perfect.

 

And what about HW with self destruct feature (for IP protection, tamper protection), how you could remedy this on HW level to remedy for a buggy SW?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The schematics is nothing special anyway so sharing it now will not show anything ordinary except the mentioned pins connected together

Well, ok. We'll ignore any missing caps on Vcc & floating gnd pins (seen way many times). 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A few more suggestions:

 

1) Most board houses charge by the square inch.  Even one-time setup charges are going away.  If the board really is that small, it'll be very inexpensive.  So make multiple versions.  If you want one feature on the pin header, use a board with that feature.  If you want a different feature, build up and use a different board.

 

2) Again, if the boards are cheap, consider stacking them if you have any space in the Z axis.  Build one "master CPU" board that sits on top of an "I/O board".

 

3) Lay out the board such that you can razor out the traces you're not using for "this board".  If you want I2C, make it so you can cut off UART.  And vice-versa (I've actually done this in a couple cases, where an optional accessory board required cutting existing 'loopback' traces.  I went to a lot of effort to make them easy to cut).

 

4) Use even smaller components.  Some MCUs (dunno about your AVR) can be had in BGA, which is even smaller than TSOP.  Passives can go down to 0201 or below.  So can pin headers, if you don't mind making adapter cables (make them specific per application).

 

S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

PS - Yes, there are sometimes applications for self-destructing chips.  e.g. when your spy plane crash-lands at a Chinese airport.  Most of these applications involve thermite, and do not exactly fall under the 'low volume personal use' application.  surprise  S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Most board houses charge by the square inch

Mine charge by the square millimetre cheeky

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

Last Edited: Tue. Feb 11, 2020 - 03:42 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

a millimitre? So some tiny bishop's headwear... cheeky

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I had it fixed Ross. cheeky

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

valusoft wrote:
tiny bishop's headwear... 

or a very small saw ?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:
do not exactly fall under the 'low volume personal use' application.  surprise  S.

 

DocJC wrote:
I hate hardware that has the ability to destroy itself if the software isn't perfect.

 

It was an absolute statement and I was showing that there is a lot of stuff which can do damage and depends on good software. I don't know if that's unholy to do something edge case and depend on decently written SW. Yes it better to be safe in various ways, but this is an experiment, it will never be sold to anybody, doesn't have met reliability/life expectations of a safe design. And wanted clarification between 'it will blow up 100% of the time no matter what you do because of X' or 'it's dodgy, but under Y and Z constraints it might work'. 

 

ESCs to control 3-phase drone outrunners are capable to destroy themselves, the FETs can short themselves if timed badly, so it depends on the raise/fall times, depends on testing each batch that the spec is really meet, testing it over time how they degrade, giving it margins in the SW so even if they go outside spec a bit it will not be end of the world, making sure the vendor/product is not changed for something slightly different in middle of a production. But what would be HW way to make it safe, camshaft, carbon contacts on rotor like old hoovers? Yes the SW is then critical and it's dodgy and when SW is wrong, or something minute changes in the HW it can destroy itself, yet it's kinda awesome and does something which wouldn't be doable in such space/consumption/weight/performance if we would stay on 100.00% triple guarantees of safety from every layer and aspect of an application.

 

Why we are using smartphones at all when shitty firmware to the battery controler can burn your house down? Why that's ok (which I think is not), yet some small personal project is so bad.

 

Scroungre wrote:

1) Most board houses charge by the square inch. 

 

2) Again, if the boards are cheap, consider stacking them if you have any space in the Z axis.  Build one "master CPU" board that sits on top of an "I/O board".

 

3) Lay out the board such that you can razor out the traces you're not using for "this board".  If you want I2C, make it so you can cut off UART. 

 

4) Use even smaller components.  Some MCUs (dunno about your AVR) can be had in BGA, which is even smaller than TSOP.  Passives can go down to 0201 or below.  So can pin headers, if you don't mind making adapter cables (make them specific per application).

 

1. This is 4th revision of this form factor so I know how much I get from the fab.

 

2. Yes actually one part is stacked up, because one part has to fit into a connector (and one of the factors why the form factor is so odd) and a stacked PCB improves the fit, however, other side has a connector where vias would risk really damaging it. Stacking it otherwise might not be practical, cost-efficient and might not even fit the form factor.

 

3. Yes, I said that already 6 and 10 messages before yours. So the latest revision has options to cut the bridge already. Good I have under the IC some space left.

 

4. That's an interesting option, I could maybe shrink the passives a bit, it's hand-assembled, so I'm not going 0201 for sure (definitely doesn't sound as the hobby/personal project), but I could go down one or maybe two sizes. BGA is a good option and was considering it for the revision after this one, because I have a surplus of about 100pcs of mega88 chips which I was planning to get rid of some of them on this project. Price is a factor as well, not always all packages are cheap. By any chance, do you know which small mega chip similar to mega88 would be the most cost-effective?  I already mentioned the pin header is 1.27mm pitch and I already have converters and specific cables for this application. Was the first size improvement and probably the major factor to make it work at all. And actually like it a lot, if the cables would be a bit cheaper I think I would use it on PCBs even where there are not such ridiculous space constraints.