Author Topic: EXTREME BEGINNER: MCU Library recommended style  (Read 1191 times)

0 Members and 1 Guest are viewing this topic.

Offline DC1MCTopic starter

  • Super Contributor
  • ***
  • Posts: 1886
  • Country: de
EXTREME BEGINNER: MCU Library recommended style
« on: February 18, 2023, 11:04:22 pm »
Hello Kicad profis, I have a very noob question: I want to build a library of Nuvoton Cortex-M MCUs, packaged in 44, 64 and 100 pin QFN packages.
I will use this as a first step in learning a bit of Kicad to be able to make myself some simple PCBs.

My questions are:

 1) What is the proffered style: one big square with pins around in natural QFN order and network names on the wires protruding from the pins to be used later (I've seen this style, where one page is dedicated to the MCU, some net names are define and then on the other pages of the schematic they are used), or a modular/functional concept with their own boxes: like Port A, Port B, USB, Power and so on, where each element (?!?) could be put in separate places or even separate pages but still belong to a device?

 2) If a modular approach is more elegant and recommended, how are the elements called, units maybe, are there any advice/tutorials that you could recommend ?

 Please excuse if this a FA type of Q and any help or even gent RTFM recommendations (with pointer to doc/tutorials) are most appreciated.

Also, if you know of a fairly complete and well done library for Nuvoton Cortex-M devices (google only gave me some other noobs attempts and packages for other  CAD program that I can't import and also don't seem to complete) please let me know I will bother you with questions about schematic editor instead  >:D

 Thanks and cheers,
 DC1MC

 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11723
  • Country: us
    • Personal site
Re: EXTREME BEGINNER: MCU Library recommended style
« Reply #1 on: February 18, 2023, 11:24:35 pm »
This is 100% a matter of personal preference. For 100 pins and less I personally prefer just one rectangle with pins on two sides arranged in logical blocks (example https://github.com/ataradov/free-dap/blob/master/hardware/m484-dap/output/m484-dap.pdf). I don't get that idea with representing entire device as one big square. It takes up a lot of space, makes wiring of power supplies more annoying.

For devices with >100 pins, it starts to make sense to split things into logical blocks. For FPGAs it is usually I/O banks + power suppply bank. For MCUs it usually 1 or 2 ports + power supply section. But I avoid this as much as possible because it really makes things hard to read.

There is only one way to make units in KiCad, in the symbol properties you define the number of units in a symbol and then draw each unit on its own sheet (you will get a drop down unit selector in the toolbar).
« Last Edit: February 18, 2023, 11:26:43 pm by ataradov »
Alex
 
The following users thanked this post: DC1MC, pcprogrammer

Offline DC1MCTopic starter

  • Super Contributor
  • ***
  • Posts: 1886
  • Country: de
Re: EXTREME BEGINNER: MCU Library recommended style
« Reply #2 on: February 18, 2023, 11:40:04 pm »
This is 100% a matter of personal preference. For 100 pins and less I personally prefer just one rectangle with pins on two sides arranged in logical blocks (example https://github.com/ataradov/free-dap/blob/master/hardware/m484-dap/output/m484-dap.pdf). I don't get that idea with representing entire device as one big square. It takes up a lot of space, makes wiring of power supplies more annoying.

For devices with >100 pins, it starts to make sense to split things into logical blocks. For FPGAs it is usually I/O banks + power suppply bank. For MCUs it usually 1 or 2 ports + power supply section. But I avoid this as much as possible because it really makes things hard to read.

There is only one way to make units in KiCad, in the symbol properties you define the number of units in a symbol and then draw each unit on its own sheet (you will get a drop down unit selector in the toolbar).

Thanks Alex for the fast answer, it actually makes sense, probably the "big square" is the laziest option possible, this is maybe why is so often encountered :), but putting it in a rectangle with functionally ordered pins makes sense to me. Also now I've learned about the not so many ways of doing units  :D.

And, if you somehow have time and want stave boredom, maybe you can visit this thread and offer your insights about my pet project - Nanoton++ with a bit more powerful Cortex-M4F but still running at 5V, right now is progressing miserably slowly because even if there is some interest, nobody said: "Hey, I can do your chip on a stick hw design in 5 mins, so what about this...", so until my hw friend has more time for it I have to slowly and painfully shuffle with "Kicad from scratch" (hey, this is a good book name :).

https://www.eevblog.com/forum/projects/improved-performance-5v-arduino-nanomega-compatible/


Cheers,
DC1MC

 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15274
  • Country: fr
Re: EXTREME BEGINNER: MCU Library recommended style
« Reply #3 on: February 18, 2023, 11:44:15 pm »
This is 100% a matter of personal preference. For 100 pins and less I personally prefer just one rectangle with pins on two sides arranged in logical blocks (example https://github.com/ataradov/free-dap/blob/master/hardware/m484-dap/output/m484-dap.pdf). I don't get that idea with representing entire device as one big square. It takes up a lot of space, makes wiring of power supplies more annoying.

For devices with >100 pins, it starts to make sense to split things into logical blocks. For FPGAs it is usually I/O banks + power suppply bank. For MCUs it usually 1 or 2 ports + power supply section. But I avoid this as much as possible because it really makes things hard to read.

There is only one way to make units in KiCad, in the symbol properties you define the number of units in a symbol and then draw each unit on its own sheet (you will get a drop down unit selector in the toolbar).

Agreed.

And do NOT create symbols mimicking actual IC packages - that's the absolute worst thing ever. Makes your schematics completely unreadable usually, and on top of that, makes it impossible to change packages (if said IC comes in various packages, which is common) without having to redo all your schematic. ATROCIOUS.
 
The following users thanked this post: pcprogrammer

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11723
  • Country: us
    • Personal site
Re: EXTREME BEGINNER: MCU Library recommended style
« Reply #4 on: February 18, 2023, 11:48:49 pm »
probably the "big square" is the laziest option possible, this is maybe why is so often encountered :)
I think the most common argument for that is that it is easier to match the board to the schematic. And this is true, but the issue is that you generally don't get a lot of other stuff on the same schematic sheet, so overall it is much harder to work with a schematic like that. You still have to look at multiple sheets at the same time.

maybe you can visit this thread and offer your insights about my pet project - Nanoton++ with a bit more powerful Cortex-M4F but still running at 5V
I'm not the best person to look at Arduino stuff, I really don't care about it. And I care even less about 5V compatibility. There is nothing I use that needs 5 V, so usually 5V stuff is a downside for me, not an upside.

Alex
 

Offline DC1MCTopic starter

  • Super Contributor
  • ***
  • Posts: 1886
  • Country: de
Re: EXTREME BEGINNER: MCU Library recommended style
« Reply #5 on: February 19, 2023, 12:02:56 am »
probably the "big square" is the laziest option possible, this is maybe why is so often encountered :)
I think the most common argument for that is that it is easier to match the board to the schematic. And this is true, but the issue is that you generally don't get a lot of other stuff on the same schematic sheet, so overall it is much harder to work with a schematic like that. You still have to look at multiple sheets at the same time.

maybe you can visit this thread and offer your insights about my pet project - Nanoton++ with a bit more powerful Cortex-M4F but still running at 5V
I'm not the best person to look at Arduino stuff, I really don't care about it. And I care even less about 5V compatibility. There is nothing I use that needs 5 V, so usually 5V stuff is a downside for me, not an upside.

The MCU, as you well know, is a 2.5-5.5V chip, 5V still has its usages and is a "chip on a stick" project and the particularity is that it will have an onboard selector between 5 and 3.3 and the MCU has few pins in its own power domain so one can have mixed voltages, is Arduino-like ( you can consider it a super blue pill or whatever), as I plan on putting on a 50 or 52 DIP format it will be the longest Arduino ever  :-DD.
Of course, if you want to call it a "mini-development" board to not smell too much of Arduino, you could do so ;). But enough of this stuff, if you don't like it, that is it.

On the topic, so the Atardov style so to call it  ;D seem to be recommended it by the SiliconWizard as well, so I will proceed with it.


 Cheers and thanks,
 DC1MC
 

Online pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4301
  • Country: nl
Re: EXTREME BEGINNER: MCU Library recommended style
« Reply #6 on: February 19, 2023, 06:53:04 am »
I agree with both of them, but you already saw that in the example I made in EasyEDA for the chip chosen for your project.

The problem with making a design for someone else is that it is not so easy. I agreed to looking into drawing the PCB, but need a schematic for it. Can also do the schematic in EasyEDA but need some input for it.

You can PM me if you like.

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3822
  • Country: nl
Re: EXTREME BEGINNER: MCU Library recommended style
« Reply #7 on: February 19, 2023, 07:22:36 am »
You could have a look at websites like PCB Libraries, SnapEDA or a handful of others who specialize in libraries for EDA programs.
There are also some side projects around KiCad that can help with extracting data from datasheets such Fped.

I have no personal experience with any of them, so Can't comment on that.

But if you classify yourself as an "EXTREME BEGINNER", then I recommend to do a few simple projects first to get to know KiCad. The reason is that beginners are bound to make "silly mistakes", and when you do that in a more complex design, then this could lead to a lot of wasted effort
« Last Edit: February 19, 2023, 07:24:53 am by Doctorandus_P »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf