EXTREME BEGINNER: MCU Library recommended style - Page 1
Forum section: electronics / general

author: DC1MC
author_rank: Super Contributor
timestamp: February 18, 2023, 11:04:22 pm
content: 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 insteadThanks and cheers,DC1MC

author: ataradov
author_rank: Super Contributor
timestamp: February 18, 2023, 11:24:35 pm
content: 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 (examplehttps://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).

author: DC1MC
author_rank: Super Contributor
timestamp: February 18, 2023, 11:40:04 pm
content: Quote from: ataradov on February 18, 2023, 11:24:35 pmThanks 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.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

author: SiliconWizard
author_rank: Super Contributor
timestamp: February 18, 2023, 11:44:15 pm
content: Quote from: ataradov on February 18, 2023, 11:24:35 pmAgreed.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.

author: ataradov
author_rank: Super Contributor
timestamp: February 18, 2023, 11:48:49 pm
content: Quote from: DC1MC on February 18, 2023, 11:40:04 pmI 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.Quote from: DC1MC on February 18, 2023, 11:40:04 pmI'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.

author: DC1MC
author_rank: Super Contributor
timestamp: February 19, 2023, 12:02:56 am
content: Quote from: ataradov on February 18, 2023, 11:48:49 pmThe 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.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 itseem to be recommended it by the SiliconWizard as well, so I will proceed with it.Cheers and thanks,DC1MC

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 19, 2023, 06:53:04 am
content: 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.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: February 19, 2023, 07:22:36 am
content: 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