Manuale di riferimento

Note
This manual is in the process of being revised to cover the latest stable release version of KiCad. It contains some sections that have not yet been completed. We ask for your patience while our volunteer technical writers work on this task, and we welcome new contributors who would like to help make KiCad’s documentation better than ever.

This document is Copyright © 2010-2022 by its contributors as listed below. You may distribute it and/or modify it under the terms of either the GNU General Public License (http://www.gnu.org/licenses/gpl.html), version 3 or later, or the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0/), version 3.0 or later.

Tutti i marchi registrati all’interno di questa guida appartengono ai loro legittimi proprietari.

Collaboratori

Jean-Pierre Charras, Fabrizio Tappero, Graham Keeth

Traduzione

Marco Ciampa <ciampix@posteo.net>, 2014-2018.

Feedback

Si prega di inviare qualsiasi rapporto bug, suggerimento o nuova versione a:

1. Introduction to the KiCad Schematic Editor

1.1. Descrizione

The KiCad Schematic Editor is a schematic capture software distributed as a part of KiCad and available under the following operating systems:

  • Linux

  • Apple macOS

  • Windows

Regardless of the OS, all KiCad files are 100% compatible from one OS to another.

The Schematic Editor is an integrated application where all functions of drawing, control, layout, library management and access to the PCB design software are carried out within the editor itself.

The KiCad Schematic Editor is intended to cooperate with the KiCad PCB Editor, which is KiCad’s printed circuit design software. It can also export netlist files, which lists all the electrical connections, for other packages.

The Schematic Editor includes a symbol library editor, which can create and edit symbols and manage libraries. It also integrates the following additional but essential functions needed for modern schematic capture software:

  • Controllo regole di progettazione (ERC) per il controllo automatico di connessioni errate o sconnesse

  • Esportazione di file del disegno dello schema in molti formati (Postscript, PDF, HPGL e SVG).

  • Generazione della distinta materiali (tramite script Python o XSLT, che consentono di modellarla in molti formati).

1.2. Panoramica tecnica

The Schematic Editor is limited only by the available memory. There is thus no real limitation to the number of components, component pins, connections or sheets. In the case of multi-sheet schematics, the representation is hierarchical.

The Schematic Editor can use multi-sheet schematics in a few ways:

  • Gerarchie semplici (ogni schema elettrico viene usato solo una volta).

  • Gerarchie complesse (alcuni schemi sono usati più di una volta con istanze multiple).

  • Gerarchie piatte (schemi esplicitamente connessi ad uno schema principale).

2. Generic Schematic Editor commands

I comandi possono essere eseguiti da:

  • Facendo clic sulla barra del menu (in cima allo schermo).

  • Facendo clic sulle icone in cima allo schermo (comandi generali).

  • Facendo clic sulle icone sul lato destro dello schermo (comandi particolari o "strumenti").

  • Facendo clic sulle icone sul lato sinistro dello schermo (opzioni di visualizzazione).

  • Premendo i pulsanti del mouse (comandi complementari importanti). In particolare un clic sul pulsante destro apre un menu contestuale che dipende dall’elemento sottostante il puntatore (zoom, griglia e modifica di elementi).

  • Function keys (F1, F2, F3, F4, Insert and Space). Specifically: Escape cancels the command in progress. Insert allows the duplication of the last element created.

  • Pressing hotkeys. For a list of hotkeys, see the Help→List Hotkeys menu entry or press Ctrl+F1. Many hotkeys select a tool but do not perform the tool’s action until the canvas is clicked. This behavior can be changed by unchecking First hotkey selects tool in the Common Preferences pane. With this option unchecked, pressing a hotkey will select the tool and immediately perform the tool’s action at the current cursor location.

Panoramica comandi

2.1. Comandi da mouse

2.1.1. Comandi di base

Pulsante sinistro

  • Single click: Selects the item under the cursor and displays the item’s characteristics in the status bar.

  • Double click: edits the item if it is editable.

Pulsante destro

  • Opens a pop-up menu. If an item is selected, the items in the menu are related to the selected item. If an item is under the cursor when the right mouse button is clicked, the item is selected.

2.1.2. Selection operations

Schematic editor items can be selected by clicking on them. Multiple items can be selected at once. Add items to the selection with Shift
click, and remove items from the selection with Ctrl+Shift + click.

Note
On macOS, Cmd is used instead of Ctrl.

left mouse button

Select item.

Shift + left mouse button

Add item to selection.

Ctrl+Shift + left mouse button

Remove item from selection.

Ctrl + left mouse button

Highlight net.

Items can also be selected by drawing a box around them using the left mouse button.

Dragging from left to right includes all items fully enclosed by the box. Dragging from right to left includes all items touched by the box, even if they are not fully enclosed.

The Shift and Ctrl+Shift modifiers also work with drag selections to add and remove items from the selection, respectively.

2.2. Comandi da tastiera

  • The Ctrl+F1 displays the current hotkey list.

  • All hotkeys can be redefined using the hotkey editor (PreferencesPreferences…​Hotkeys).

The default hotkey list is below. Many additional actions do not have hotkeys by default, but hotkeys can be assigned to them with the hotkey editor.

Action Default Hotkey Description

Click

Return

Performs left mouse button click

Double-click

End

Performs left mouse button double-click

Cursor Down

Down

Cursor Down Fast

Ctrl+Down

Cursor Left

Left

Cursor Left Fast

Ctrl+Left

Cursor Right

Right

Cursor Right Fast

Ctrl+Right

Cursor Up

Up

Cursor Up Fast

Ctrl+Up

Switch to Fast Grid 1

Alt+1

Switch to Fast Grid 2

Alt+2

Switch to Next Grid

N

Switch to Previous Grid

Shift+N

Reset Grid Origin

Z

Grid Origin

S

Set the grid origin point

New…​

Ctrl+N

Create a new document in the editor

Open…​

Ctrl+O

Open existing document

Pan Down

Shift+Down

Pan Left

Shift+Left

Pan Right

Shift+Right

Pan Up

Shift+Up

Print…​

Ctrl+P

Print

Reset Local Coordinates

Space

Save

Ctrl+S

Save changes

Save As…

Ctrl+Shift+S

Save current document to another location

Always Show Cursor

Ctrl+Shift+X

Display crosshairs even in selection tool

Switch units

Ctrl+U

Switch between imperial and metric units

Update PCB from Schematic…

F8

Update PCB with changes made to schematic

Center

F4

Center

Zoom to Objects

Ctrl+Home

Zoom to Objects

Zoom to Fit

Home

Zoom to Fit

Zoom In at Cursor

F1

Zoom In at Cursor

Zoom Out at Cursor

F2

Zoom Out at Cursor

Refresh

F5

Refresh

Zoom to Selection

Ctrl+F5

Zoom to Selection

Change Edit Method

Ctrl+Space

Change edit method constraints

Copy

Ctrl+C

Copy selected item(s) to clipboard

Cut

Ctrl+X

Cut selected item(s) to clipboard

Delete

Del

Deletes selected item(s)

Duplicate

Ctrl+D

Duplicates the selected item(s)

Find

Ctrl+F

Find text

Find and Replace

Ctrl+Alt+F

Find and replace text

Find Next

F3

Find next match

Find Next Marker

Shift+F3

Paste

Ctrl+V

Paste item(s) from clipboard

Redo

Ctrl+Y

Redo last edit

Select All

Ctrl+A

Select all items on screen

Undo

Ctrl+Z

Undo last edit

List Hotkeys…​

Ctrl+F1

Displays current hotkeys table and corresponding commands

Preferences…​

Ctrl+,

Show preferences for all open tools

Clear Net Highlighting

~

Clear any existing net highlighting

Edit Library Symbol…​

Ctrl+Shift+E

Open the library symbol in the Symbol Editor

Edit with Symbol Editor

Ctrl+E

Open the selected symbol in the Symbol Editor

Highlight Net

`

Highlight net under cursor

Show Datasheet

D

Opens the datasheet in a browser

Add Sheet

S

Add a hierarchical sheet

Add Wire to Bus Entry

Z

Add a wire entry to a bus

Add Global Label

Ctrl+L

Add a global label

Add Hierarchical Label

H

Add a hierarchical label

Add Junction

J

Add a junction

Add Label

L

Add a net label

Add No Connect Flag

Q

Add a no-connection flag

Add Power

P

Add a power port

Add Text

T

Add text

Add Symbol

A

Add a symbol

Add Bus

B

Add a bus

Add Lines

I

Add connected graphic lines

Add Wire

W

Add a wire

Finish Wire or Bus

K

Complete drawing at current segment

Unfold from Bus

C

Break a wire out of a bus

Autoplace Fields

O

Runs the automatic placement algorithm on the symbol or sheet’s fields

Edit Footprint…

F

Displays footprint field dialog

Edit Reference Designator…​

U

Displays reference designator dialog

Edit Value…

V

Displays value field dialog

Mirror Horizontally

X

Flips selected item(s) from left to right

Mirror Vertically

Y

Flips selected item(s) from top to bottom

Properties…

E

Displays item properties dialog

Repeat Last Item

Ins

Duplicates the last drawn item

Rotate Counterclockwise

R

Rotates selected item(s) counter-clockwise

Drag

G

Drags the selected item(s)

Move

M

Moves the selected item(s)

Select Connection

Alt+4

Select a complete connection

Select Node

Alt+3

Select a connection item under the cursor

Leave Sheet

Alt+Back

Display the parent sheet in the schematic editor

Hotkeys are stored in the file user.hotkeys in KiCad’s configuration directory. The location is platform-specific:

  • Windows: %APPDATA%\kicad\6.0\user.hotkeys

  • Linux: ~/.config/kicad/6.0/user.hotkeys

  • macOS: ~/Library/Preferences/kicad/6.0/user.hotkeys

It is possible to import hotkey settings from a user.hotkeys file using menu PreferencesPreferences…​HotkeysImport Hotkeys…​.

2.3. Griglia

In the Schematic Editor the cursor always moves over a grid. The grid can be customized:

  • Size can be changed using the right click menu or using ViewGrid Properties…​.

  • Color can be changed in the Colors page of the Preferences dialog (menu PreferencesGeneral Options).

  • Visibility can be switched using the left-hand toolbar button.

The default grid size is 50 mil (0.050") or 1.27 millimeters.

Questa è la griglia preferita per piazzare simboli e fili in uno schema elettrico, e per piazzare piedini durante la progettazione di un simbolo nell’editor dei simboli.

Si può anche lavorare con una griglia più piccola da 25 mil a 10 mil, ma in genere queste sono usate per la creazione dei corpi dei simboli o per posizionare testi e commenti, non per i fili o piedini.

2.4. Selezione Zoom

Per cambiare il livello di zoom:

  • Fare clic destro per aprire il menu a scomparsa e selezionare il livello di zoom desiderato.

  • Or use hotkeys:

    • F1: Zoom in

    • F2: Zoom out

    • F4: Center the view around the cursor pointer position

    • Home: Zoom and center the view to fit the entire schematic sheet

    • Ctrl+Home: Zoom and center the view to fit all of the objects in the schematic

    • Ctrl+F5: Activate the Zoom to Selection tool

  • Zoom finestra:

    • Rotellina del mouse: zoom avanti/indietro

    • Maiusc+rotellina del mouse: pan su/giù

    • Ctrl+rotellina del mouse: pan sinistra/destra

Mouse scroll gestures are configurable in the Mouse and Touchpad page of the Preferences dialog.

2.5. Visualizzazione coordinate puntatore

The display units are in inches, mils, or millimeters.

Le seguenti informazioni sono mostrate sulla parte in basso a destra della finestra:

  • Fattore di zoom

  • Posizione assoluta del puntatore

  • Posizione relativa del puntatore

  • The grid size

  • The active unit system

  • The active tool

Le coordinate relative possono essere azzerate con la barra spazio. È utile per effettuare misure tra due punti.

][alt="barra di stato"

2.6. Barra menu in cima

La barra menu in cima permette l’apertura e il salvataggio degli schemi elettrici, la configurazione del programma, e la visualizzazione della documentazione.

barra dei menu

2.7. Barra strumenti in alto

This toolbar gives access to the main functions of the Schematic Editor.

If the Schematic Editor is run in standalone mode, this is the available tool set:

images/toolbar_schedit_standalone.png

Si noti che quando KiCad viene eseguito in modalità progetto, le prime due icone non sono disponibili dato che esse lavorano sui singoli file.

New schematic icon

Create a new schematic (only in standalone mode).

Open schematic icon

Open a schematic (only in standalone mode).

Save schematic icon

Save complete schematic project.

Schematic Setup icon

Set the schematic-specific options.

Page Settings icon

Select the sheet size and edit the title block.

Print icon

Open print dialog.

Plot icon

Open plot dialog.

paste icon

Paste a copied/cut item or block to the current sheet.

undo icon

Undo: Revert the last change.

redo icon

Redo: Revert the last undo operation.

search icon

Show the dialog to search symbols and texts in the schematic.

search replace icon

Show the dialog to search and replace texts in the schematic.

refresh icon

Refresh screen.

zoom in icon

Zoom in.

zoom out icon

Zoom out.

zoom to fit icon

Zoom to fit the entire schematic sheet.

zoom fit to objects icon

Zoom to fit all objects in the schematic.

zoom fit to selection icon

Zoom to fit selected items.

hierarchy navigator icon

View and navigate the hierarchy tree.

leave sheet icon

Leave the current sheet and go up in the hierarchy.

rotate counter-clockwise icon

Rotate selected items counter-clockwise.

rotate clockwise icon

Rotate selected items clockwise.

mirror vertical icon

Mirror selected items vertically.

mirror horizontal icon

Mirror selected items horizontally.

symbol editor icon

Call the symbol library editor to view and modify libraries and symbols.

symbol library browser icon

Browse symbol libraries.

footprint editor icon

Open the footprint library editor to view and modify libraries and footprints.

annotate icon

Annotate symbols.

ERC icon

Electrical Rules Checker (ERC), automatically validate electrical connections.

run footprint assignment icon

Open the footprint assignment tool to assign footprints to symbols.

Symbol fields editor icon

Bulk edit symbol fields in a spreadsheet interface.

BOM icon

Generate the Bill of Materials (BOM).

pcb editor icon

Open the PCB editor.

python scripting console icon

Open the Python scripting console.

2.8. Icone della barra strumenti di destra

Questa barra contiene strumenti per:

  • Piazzare simboli, fili, bus, connessioni, etichette, testi, ecc.

  • Creare sotto-fogli gerarchici e simboli di connessione.

Selection tool icon

Cancel the active command or tool and go into selection mode.

Highlight net icon

Highlight a net by marking its wires and net labels with a different color. If the PCB Editor is also open then copper corresponding to the selected net will be highlighted as well.

New Symbol icon

Display the symbol selector dialog to select a new symbol to be placed.

Add Power icon

Display the power symbol selector dialog to select a power symbol to be placed.

Draw Wire icon

Draw a wire.

Draw Bus icon

Draw a bus.

Draw wire to bus icon

Draw wire-to-bus entry points. These elements are only graphical and do not create a connection, thus they should not be used to connect wires together.

draw no connect flag icon

Place a "No Connect" flag. These flags should be placed on symbol pins which are meant to be left unconnected. It is done to notify the Electrical Rules Checker that lack of connection for a particular pin is intentional and should not be reported.

place junction icon

Place a junction. This connects two crossing wires or a wire and a pin, when it can be ambiguous (i.e. if a wire end or a pin is not directly connected to another wire end).

Local label icon

Place a local label. Local label connects items located in the same sheet. For connections between two different sheets, you have to use global or hierarchical labels.

Global label icon

Place a global label. All global labels with the same name are connected, even when located on different sheets.

Hierarchical label icon

Place a hierarchical label. Hierarchical labels are used to create a connection between a subsheet and the parent sheet that contains it.

Hierarchical subsheet icon

Place a hierarchical subsheet. You must specify the file name for this subsheet.

Import hierarchical label icon

Import a hierarchical pin from a subsheet. This command can be executed only on hierarchical subsheets. It will create hierarchical pins corresponding to hierarchical labels placed in the target subsheet.

draw dashed line icon

Draw a line. These are only graphical and do not connect anything.

place text icon

Place a text comment.

place bitmap icon

Place a bitmap image.

interactive delete tool icon

Delete clicked items.

2.9. Icone barra degli strumenti di sinistra

Questa barra strumenti gestisce le opzioni di visualizzazione:

grid visibility icon

Toggle grid visibility.

inch unit icon

Switch units to inches.

mil unit icon

Switch units to mils (0.001 inches).

millimeter unit icon

Switch units to millimeters.

cursor shape icon

Choose the cursor shape (full screen/small).

hidden pin icon

Toggle visibility of "invisible" pins.

free angle wire icon

Toggle free angle/90 degrees wires and buses placement.

2.10. Menu a scomparsa e modifiche veloci

Un click destro apre un menu contestuale per l’elemento selezionato. Quest’ultimo contiene:

  • Fattore di zoom.

  • Regolazione della griglia.

  • Copy/Paste/Delete commands.

  • Add Wire/Bus.

  • Parametri modificati comunemente per l’elemento selezionato.

3. Menu principale in alto

3.1. Menu file

Menu file
New Close current schematic and start a new one (only in standalone mode).

Open

Load a schematic project (only in standalone mode).

Open Recent

Open a schematic project from the list of recently opened files (only in standalone mode).

Save

Save current sheet and all its subsheets.

Save As…​

Save the current sheet under a new name (only in standalone mode).

Save Current Sheet Copy As…​

Save a copy of the current sheet under a new name (only in project mode).

Insert Schematic Sheet Content…​

Insert the contents of another schematic sheet into the current sheet (only in standalone mode).

Import

Import a non-KiCad schematic or a footprint assignment file.

Export

Export a netlist or a drawing of the schematic to the clipboard.

Schematic Setup…​

Set up schematic formatting, electrical rules, net classes, and text variables.

Page Settings…​

Configure page dimensions and title block.

Print

Print schematic project (See also chapter Plot and Print).

Plot

Export to PDF, PostScript, HPGL or SVG format (See chapter Plot and Print).

Quit

Terminate the application.

3.1.1. Schematic Setup

The Schematic Setup window is used to set schematic options that are specific to the currently active schematic. For example, the Schematic Setup window contains formatting options, electrical rule configuration, netclass setup, and schematic text variable setup.

3.2. Menu preferenze

Menu preferenze

Configure Paths…​

Set the default search paths.

Manage Symbol Library Tables…​

Add/remove symbol libraries.

Preferences…​

Preferences (units, grid size, field names, etc.).

Set Language

Select interface language.

3.2.1. Gestione tabelle di librerie di simboli

Tabelle di librerie di simboli

KiCad uses two library tables to store the list of available symbol libraries, which differ by the scope:

Librerie globali

Libraries listed in the Global Library table are available to every project. They are saved in the sym-lib-table in the KiCad configuration directory, which is system-dependent:

  • Windows: %APPDATA%\kicad\6.0\sym-lib-table

  • Linux: ~/.config/kicad/6.0/sym-lib-table

  • macOS: ~/Library/Preferences/kicad/6.0/sym-lib-table

Librerie specifiche del progetto

Libraries listed in Project Specific Libraries table are available to the currently opened project. They are saved in a sym-lib-table file in the project directory.

Both library tables are visible by clicking on Global Libraries or Project Specific Libraries tab in the Manage Library Tables window.

Aggiungi una nuova libreria

Add a library either by clicking the Folder icon button and selecting a file or clicking the Plus icon button and typing a path to a library file. The selected library will be added to the currently opened library table (Global/Project Specific).

Rimuovi libreria

Remove a library by selecting one or more libraries and clicking the Trash icon button.

Proprietà librerie

Ogni riga nella tabella contiene diversi campi che descrivono una libreria:

Active

Enables/disables the library. It is useful to temporarily reduce the loaded library set.

Nickname

Nickname is a short, unique identifier used for assigning symbols to components. Symbols are represented by '<Library Nickname>:<Symbol Name>' strings.

Library Path

Path points to the library location.

Plugin Type

Determines the library file format. KiCad 6.0 libraries use the "KiCad" format, while KiCad 5.x libraries use the "Legacy" format. Legacy libraries are read-only.

Options

Stores library specific options, if used by plugin.

Description

Briefly characterizes the library contents.

3.2.2. Preferences

Common Preferences
Note
TODO: write this section
Common settings
Mouse and Touchpad

Center and warp cursor on zoom

If checked, the pointed location is warped to the screen center when zooming in/out.

Use touchpad to pan

When enabled, view is panned using scroll wheels (or touchpad gestures) and to zoom one needs to hold Ctrl. Otherwise scroll wheels zoom in/out and Ctrl/Shift are the panning modifiers.

Pan while moving object

If checked, automatically pans the window if the cursor leaves the window during drawing or moving.

Comandi da tastiera

Redefine hotkeys.

Hotkeys settings

Seleziona un nuovo comando da tastiera facendo doppio clic su un’azione o tasto destro su un’azione per mostrare un menu a scomparsa:

Edit

Define a new hotkey for the action (same as double click).

Undo Changes

Reverts the recent hotkey changes for the action.

Clear Assigned Hotkey

Restore Default

Sets the action hotkey to its default value.

Display Options
Display options

Grid Size

Grid size selection.

It is recommended to work with normal grid (0.050 inches or 1,27 mm). Smaller grids are used for component building.

Bus thickness

Pen size used to draw buses.

Line thickness

Pen size used to draw objects that do not have a specified pen size.

Part ID notation

Style of suffix that is used to denote symbol units (U1A, U1.A, U1-1, etc.)

Icon scale

Adjust toolbar icons size.

Show Grid

Grid visibility setting.

Restrict buses and wires to H and V orientation

If checked, buses and wires are drawn only with vertical or horizontal lines. Otherwise buses and wires can be placed at any orientation.

Show hidden pins:

Display invisible (or hidden) pins, typically power pins.

Show page limits

If checked, shows the page boundaries on screen.

Footprint previews in symbol chooser

Displays a footprint preview frame and footprint selector when placing a new symbol.

Note: it may cause problems or delays, use at your own risk.

Editing Options
Impostazioni di modifica

Measurement units

Select the display and the cursor coordinate units (inches or millimeters).

Horizontal pitch of repeated items

Increment on X axis during element duplication (default: 0) (after placing an item like a symbol, label or wire, a duplication is made by the Insert key)

Vertical pitch of repeated items

Increment on Y axis during element duplication (default: 0.100 inches or 2,54 mm).

Increment of repeated labels

Increment of label value during duplication of texts ending in a number, such as bus members (usual value 1 or -1).

Default text size

Text size used when creating new text items or labels.

Auto-save time interval

Time in minutes between saving backups.

Automatically place symbol fields

If checked, symbol fields (e.g. value and reference) in newly placed symbols might be moved to avoid collisions with other items.

Allow field autoplace to change justification

Extension of 'Automatically place symbol fields' option. Enable text justification adjustment for symbol fields when placing a new part.

Always align autoplaced fields to the 50 mil grid

Extension of 'Automatically place symbol fields' option. If checked, fields are autoplaced using 50 mils grid, otherwise they are placed freely.

Colori

Schemi di colore per vari elementi grafici. Fare clic su uno qualsiasi dei campioni di colore per selezionare un nuovo colore per quel particolare elemento.

Impostazioni di colore
Campi predefiniti

Definisce campi aggiuntivi personalizzati e valori corrispondenti che appariranno nei nuovi simboli piazzati.

Impostazioni campi predefinite

3.3. Menu di aiuto

Accedere alla guida in linea (questo documento) per accedere ad un vasto tutorial su KiCad.

Use the Report a Bug item to report a bug online. Full KiCad version and user system information is available via the Copy Version Info button in the About KiCad window.

4. Barra degli strumenti in alto generale

4.1. Gestione del foglio

The Sheet Settings icon (Sheet Settings icon) allows you to define the sheet size and the contents of the title block.

Impostazioni di pagina

La numerazione dei fogli è automaticamente aggiornata. È possibile impostare la data ad oggi premendo il pulsante con la freccia a sinistra di "Data versione", visto che questa non viene cambiata automaticamente.

4.2. Strumento di ricerca

The Find icon (Find icon) can be used to access the search tool.

Finestra di dialogo trova

È possibile cercare un riferimento, un valore o una stringa di testo nel foglio corrente o in tutta la gerarchia. Una volta trovato, il puntatore del mouse verrà posizionato sull’elemento trovato nel sotto-foglio in questione.

4.3. Lo strumento netlist

The Netlist icon (Netlist icon) opens the netlist generation tool.

Lo strumento crea un file che descrive tutte le connessioni dell’intera gerarchia.

In una gerarchia multifoglio, ogni etichetta locale è visibile solo dentro il foglio al quale appartiene. Per esempio l’etichetta LABEL1 del foglio 3 è diversa dall’etichetta TOTO del foglio 5 (se non è stata introdotta intenzionalmente una connessione per collegarle). Ciò è dovuto al fatto che il nome del percorso del foglio è associato internamente all’etichetta locale.

Note
Even though there is no text length limit for labels in KiCad, please take into account that other programs reading the generated netlist may have such constraints.
Note
Avoid spaces in labels, because they will appear as separated words in the generated file. It is not a limitation of KiCad, but of many netlist formats, which often assume that a label has no spaces.
Finestra di dialogo netlist

Opzioni:

Formato predefinito

Imposta per selezionare Pcbnew come formato predefinito.

Si possono generare anche altri formati:

  • Orcad PCB2

  • CadStar

  • Spice (simulatori)

Plugin esterni possono essere aggiunti per estendere l’elenco dei formati di netlist (nell’immagine precedente è stato aggiunto un plugin per PadsPcb).

Si possono trovare ulteriori informazioni sulla creazione delle netlist nel capitolo Creazione di una netlist.

4.4. Strumento di annotazione

The icon Annotate icon launches the annotation tool. This tool assigns references to components.

Per componenti multiparte (come l’integrato TTL 7400 che contiene 4 porte), viene assegnato anche un suffisso per ogni parte (perciò un TTL 7400 identificato come U3 sarà diviso in U3A, U3B, U3C e U3D).

Si può annotare incondizionatamente tutti i componenti, o solamente quelli nuovi, cioè quelli che non erano stati annotati in precedenza.

annotate-dialog_img

Ambito

Use the entire schematic All sheets are re-annotated (default).

Use the current page only

Only the current sheet is re-annotated (this option is to be used only in special cases, for example to evaluate the amount of resistors in the current sheet.).

Keep existing annotation

Conditional annotation, only the new components will be re-annotated (default).

Reset existing annotation

Unconditional annotation, all the components will be re-annotated (this option is to be used when there are duplicated references).

Reset, but do not swap any annotated multi-unit parts

Keeps all groups of multiple units (e.g. U2A, U2B) together when reannotating.

Ordine di annotazione

Seleziona l’ordine nel quale i componenti verranno numerati (sia orizzontalmente che verticalmente).

Scelte di annotazione

Seleziona il formato di riferimento assegnato.

4.5. Strumento di controllo regole elettriche (ERC)

The icon ERC icon launches the electrical rules check (ERC) tool.

Questo strumento esegue la verifica del progetto ed è in grado di rivelare connessioni mancanti o errate.

Once you have run the ERC, KiCad places markers to highlight problems. The error description is displayed after left clicking on the marker. An error report file can also be generated.

4.5.1. La finestra di dialogo ERC principale

Finestra di dialogo ERC

Gli errori vengono mostrati nella finestra del controllo regole elettriche:

  • Totale errori e avvertimenti.

  • Totale errori.

  • Totale avvertimenti.

Opzioni:

Crea file di rapporto ERC

selezionare questa opzione per generare un file di rapporto ERC.

Comandi:

Cancella marcatori

Rimuove tutti i marcatori di avvertimento/errore ERC.

Esegui

Avvia il controllo regole elettriche.

Chiudi

Chiude la finestra.

  • Facendo clic su un messaggio di errore si salta sul marcatore corrispondente nello schema elettrico.

4.5.2. Finestra di dialogo delle opzioni ERC

Finestra di dialogo delle opzioni ERC

Questa scheda permette di definire le regole di connettività tra pin; si può scegliere tra 3 opzioni per ogni caso:

  • Nessun errore

  • Attenzione

  • Errore

Ogni riquadro della matrice può essere modificato facendo clic su di esso.

Opzioni:

Controllo etichette simili

Segnala le etichette che differiscono solo per le maiuscole (per es. label/Label/LaBeL). I nomi dei collegamenti sono case-sensitive quindi etichette come quelle dell’esempio sono considerate collegamenti separati.

Controllo etichette globali uniche

Segnala le etichette globali che ricorrono solo una volta per un singolo collegamento. Normalmente si richiede che ce ne siano almeno due per fare una connessione.

Comandi:

Inizializza al predefinito

Ripristina le impostazioni originali.

4.6. Strumento per la distinta materiali

The icon BOM icon launches the bill of materials (BOM) generator. This tool generates a file listing the components and/or hierarchical connections (global labels).

Finestra della distinta materiali

The Schematic Editor’s BOM generator makes use of external plugins, either as XSLT or Python scripts. There are a few examples installed inside the KiCad program files directory.

Un utile insieme di proprietà di componenti da usare per una distinta componenti sono:

  • Value - valore: nome univoco per ogni parte usata.

  • Footprint - Impronta: sia inserita manualmente che per back-annotation (vedere sotto).

  • Field1 - Campo1: nome costruttore.

  • Field2 - Campo2: numero parte del costruttore.

  • Field3 - Campo3: numero parte distributore.

Per esempio:

Finestra di dialogo proprietà componente

Su MS Windows, la finestra di dialogo del generatore distinta materiale ha un’opzione speciale (indicata dalla freccia rossa) che controlla la visibilità della finestra del plugin esterno. Per impostazione predefinita, la riga di comando viene eseguita con la finestra della console nascosta e l’output viene reindirizzato al campo Plugin info. Impostare questa opzione per mostrare la finestra del comando in esecuzione. Potrebbe essere necessario se il plugin ha una GUI.

Opzioni extra della finestra di dialogo della distinta materiali in MS Windows

4.7. Strumento di modifica dei campi

The icon Edit Fields icon opens a spreadsheet to view and modify field values for all symbols.

Finestra dei simboli

Una volta modificati i valori dei campi, è necessario accettare i cambiamenti facendo clic sul pulsante 'Applica i cambiamenti' o annullarli facendo clic sul pulsante 'Annulla i cambiamenti'.

4.7.1. Trucchi per semplificare lo riempimento dei campi

Ci sono diversi metodi speciali di copia/incolla nel foglio di calcolo. Essi possono tornare utili quando si inseriscono campi valore ripetuti in diversi componenti.

Questi metodi sono illustrati sotto.

Copy (Ctrl+C) Selection Paste (Ctrl+V)

1copy

1selection

1paste

2copy

2selection

2paste

3copy

3selection

3paste

4copy

4selection

4paste

5copy

5selection

5paste

Note
Queste tecniche sono disponibili anche in altre finestre di dialogo con elementi di controllo a griglia.

4.8. Strumento di importazione per assegnazione impronte

4.8.1. Accesso:

The icon Import Footprint Names icon launches the back-annotate tool.

This tool allows footprint changes made in the PCB Editor to be imported back into the footprint fields in the Schematic Editor.

5. Gestione librerie di simboli

Le librerie di simboli contengono raccolte di simboli utilizzati durante la creazione degli schemi elettrici. Ogni simbolo in uno schema è identificato in modo univoco da un nome completo composto da un nickname di libreria e da un nome di simbolo. Un esempio è Audio: AD1853.

5.1. Tabella librerie di simboli

La tabella della libreria dei simboli contiene un elenco di tutti i file della libreria che KiCad conosce. La tabella della libreria dei simboli è composta dal file della tabella delle librerie di simboli globali e dal file della tabella delle librerie di simboli specifici del progetto.

When a symbol is loaded, KiCad uses the library nickname, Audio in our example, to lookup the library location in the symbol library table.

The image below shows the symbol library table editing dialog which can be opened by invoking the Manage Symbol Libraries…​ entry in the Preferences menu.

finestra tabella librerie di simboli

5.1.1. Tabella librerie di simboli globale

The global symbol library table contains the list of libraries that are always available regardless of the currently loaded project file. The table is saved in the file sym-lib-table in the user’s KiCad configuration folder. The location of this folder is dependent upon the operating system being used.

5.1.2. Tabella librerie di simboli specifiche del progetto

La tabella librerie di simboli specifica del progetto contiene l’elenco delle librerie che sono disponibili specificatamente per il file di progetto caricato in quel momento. La tabella librerie specifiche del progetto può essere modificata solo quando viene caricata assieme al file del progetto. Se non viene caricato alcun file di progetto o non c’è nessun file di tabella librerie di simboli nel percorso del progetto corrente, viene creata una tabella vuota che può essere modificata, ed in seguito salvata, assieme al file del progetto.

5.1.3. Configurazione iniziale

The first time the KiCad Schematic Editor is run and the global symbol table file sym-lib-table is not found in the KiCad configuration folder, KiCad will present the "Configure Global Symbol Library Table" dialog to the user. The dialog presents the user with three options.

  • Copy default global symbol library table (recommended). If this option is selected, KiCad will copy the default symbol library table file stored in the system’s Kicad template folder to the file sym-lib-table in the user’s KiCad configuration folder. If the default template sym-lib-table file cannot be found, this option will be grayed out. The missing default table is usually caused by the KiCad default libraries not being installed (on some systems they are installed by a separate package). If the libraries are installed in a non-standard location, use the second option and browse to the library table location manually.

  • Copy custom global symbol library table. If this option is selected, the user must browse to the desired symbol library table file, which will be copied to the user’s KiCad configuration directory.

  • Create an empty global symbol library table. An empty symbol library table file will be created in the user’s KiCad configuration directory. The user must add libraries to the table manually.

symbol library table initial configuration
Note

La tabella librerie di simboli predefinita include tutte le librerie di simboli installati che fanno parte di KiCad. Ciò può o meno essere desiderabile a seconda dell’uso e della velocità del sistema. Il tempo richiesto per caricare le librerie di simboli è proporzionale al numero di librerie presenti nella tabella librerie di simboli. Se il tempo di caricamento delle librerie di simboli sembra eccessivo, rimuovere le librerie usate raramenteo o mai dalla tabella librerie globale e aggiungerle di volta in volta alla tabella librerie del progetto solo quando necessario.

5.1.4. Aggiungere voci alla tabella

Per usare una librerie di simboli, questa deve essere prima aggiunta alla tabella globale o a quella specifica del progetto. La tabella specifica del progetto è utilizzabile solo quando si è aperto un file di progetto.

Note
Each library entry must have a unique nickname.

The library nickname does not have to be related in any way to the actual library file name or path. The colon : and \ characters cannot be used anywhere in the library nickname. Each library entry must have a valid path and/or file name depending on the type of library. Paths can be defined as absolute, relative, or by environment variable substitution (see section below).

The appropriate library format must be selected in order for the library to be properly read. "KiCad" format is used for KiCad version 6 libraries (.kicad_sym files), while "Legacy" format is used for libraries from older versions of KiCad (.lib files). Legacy libraries are read-only, but can be migrated to KiCad format libraries using the Migrate Libraries button (see section Migrating Legacy Libraries).

C’è anche un campo dedicato alla descrizione della voce di libreria. Il campo opzioni non viene usato al momento perciò aggiungere opzioni non ha alcun effetto sul caricamento delle librerie.

  • Si noti che non si può avere denominatori di librerie duplicati nella stessa tabella. Ma è comunque possibile avere gli stessi denominatori di libreria sia nella tabella di librerie di simboli globale che in quella specifica del progetto.

  • La voce nella tabella specifica del progetto avrà la precedenza sulla corrispondente presente nella tabella globale in caso di identificativi identici.

  • Quando le voci sono definite nella tabella specifica del progetto, un file sym-lib-table contenente le voci verrà scritto nella cartella del file di progetto aperto in quel momento.

5.1.5. Sostituzione delle variabili ambiente

One of the most powerful features of the symbol library table is environment variable substitution. This allows for definition of custom paths to where symbol libraries are stored in environment variables. Environment variable substitution is supported by using the syntax ${ENV_VAR_NAME} in the library path.

By default, at run time KiCad defines two environment variables relevant for locating symbol libraries:

  • the $KIPRJMOD environment variable that always points to the currently open project directory. $KIPRJMOD cannot be modified.

  • the $KICAD6_SYMBOL_DIR environment variable. This points to the path where the default symbol libraries that were installed with KiCad.

You can override $KICAD6_SYMBOL_DIR by redefining it in PreferencesConfigure Paths…​. This is useful for using libraries installed in a nonstandard location.

$KIPRJMOD allows you to store libraries in the project path without having to define the absolute path (which is not always known) to the library in the project specific symbol library table.

5.1.6. Modelli di utilizzo

Symbol libraries can be defined either globally or specifically to the currently loaded project. Symbol libraries defined in the user’s global table are always available and are stored in the sym-lib-table file in the user’s KiCad configuration folder. The project-specific symbol library table is active only for the currently open project file.

Ci sono vantaggi e svantaggi per ogni metodo. Definire tutte le librerie nella tabella globale significa che queste saranno sempre disponibili alla bisogna. Lo svantaggio di ciò è aumenterà che il tempo di caricamento.

Definire tutte le librerie di simboli su base specifica del progetto significa che si avranno solamente le librerie necessarie per quel progetto e ciò diminuirà il tempo di caricamento dei simboli. Lo svantaggio è che sarà sempre necessario ricordarsi di aggiungere ogni libreria di simboli necessaria per ogni progetto.

Uno schema di utilizzo potrebbe essere quello di definire le librerie di uso comune a livello globale e le librerie richieste solo per il progetto nella tabella della libreria specifica del progetto.

5.1.7. Migrating Legacy Libraries

Legacy libraries (.lib files) are read-only, but they can be migrated to KiCad version 6 libraries (.kicad_sym). KiCad version 6 libraries cannot be viewed or edited by KiCad versions older than 6.0.0.

Legacy libraries can be converted to KiCad 6 libraries by selecting them in the symbol library table and clicking the Migrate Libraries button. Multiple libraries can be selected and migrated at once by Ctrl-clicking or shift-clicking.

Libraries can also be converted one at a time by opening them in the Symbol Editor and saving them as a new library.

5.1.8. Rimappatura dei vecchi progetti

When loading a schematic created prior to the symbol library table implementation, KiCad will attempt to remap the symbol library links in the schematic to the appropriate library table symbols. The success of this process is dependent on several factors:

  • le librerie originali usate nello schema sono ancora disponibili e invariate da quando il simbolo è stato aggiunto allo schema.

  • tutte le operazioni di salvataggio sono state eseguite quando sono state rilevate per creare una libreria di salvataggio o mantenere aggiornata la libreria di salvataggio esistente.

  • l’integrità della libreria cache dei simboli del progetto non è stata danneggiata.

Warning

La rimappatura eseguirà un salvataggio di tutti i file che vengono modificati durante l’operazione, nella cartella di salvataggio all’interno della cartella del progetto. Effettuare sempre un salvataggio del progetto prima di rimappare, (N.d.T. per evitare brutte sorprese) nel caso in cui qualcosa vada storto.

Warning

L’operazione di recupero viene eseguita anche se è stata disabilitata per garantire che i simboli corretti siano disponibili per la rimappatura. Non annullare questa operazione o la rimappatura non riuscirà a rimappare correttamente i simboli degli schemi. Eventuali collegamenti a simboli spezzati dovranno essere corretti manualmente.

Note

If the original libraries have been removed and the rescue was not performed, the cache library can be used as a recovery library as a last resort. Copy the cache library to a new file name and add the new library file to the top of the library list using a version of KiCad prior to the symbol library table implementation.

6. Creazione e modifica di schemi elettrici

6.1. Introduzione

Uno schema elettrico può essere rappresentato da un foglio singolo ma, se è grande abbastanza, potrà richiedere molti fogli.

A schematic represented by several sheets is hierarchical, and all its sheets (each one represented by its own file) constitute a complete KiCad schematic. The manipulation of hierarchical schematics will be described in the Hierarchical Schematics chapter.

6.2. Considerazioni generali

A schematic designed with KiCad is more than a simple graphic representation of an electronic device. It is normally the entry point of a development chain that allows for:

Uno schema elettrico consiste principalmente di simboli, fili, etichette, giunzioni, porte bus e di alimentazione. Per chiarezza, negli schemi elettrici, è possibile inserire elementi puramente grafici come elementi bus, commenti, e polilinee.

Symbols are added to the schematic from symbol libraries. After the schematic is made, the set of connections and footprints is imported into the PCB editor for designing a board.

6.3. Modifica e inserimento simboli

6.3.1. Trova e piazza un simbolo

To load a symbol into your schematic you can use the icon New Symbol icon. A dialog box allows you to type the name of the symbol to load.

Finestra di dialogo di scelta del componente

La finestra di dialogo di scelta del simbolo filtrerà i simboli per nome, parolachiave, e descrizione secondo quanto si inserirà nel campo di ricerca. Filtri avanzati possono essere usati semplicemente digitandoli:

  • Caratteri jolly: usare i caratteri ? e * rispettivamente per significare qualsiasi carattere'' e qualsiasi carattere in qualsiasi numero''.

  • Relazionali: se la descrizione di un componente di libreria o parola chiave contiene un marcatore del formato chiave:123'', è possibile corrispondere relativamente a quello battendo chiave>123'' (maggiore di), ``chiave<123'' (minore di), ecc. I numeri possono includere uno dei seguenti suffissi indipendenti da maiuscole o minuscole:

    p

    n

    u

    m

    k

    meg

    g

    t

    10-12

    10-9

    10-6

    10-3

    103

    106

    109

    1012

    ki

    mi

    gi

    ti

    210

    220

    230

    240

  • Espressioni regolari: se si ha familiarità con le espressioni regolari, si possono usare anch’esse. Il tipo di espressione regolare usato è di stile espressione regolare avanzato dei wxWidgets, che è simile alle espressioni regolari Perl.

If the symbol specifies a default footprint, this footprint will be previewed in the lower right. If the symbol includes footprint filters, alternate footprints that satisfy the footprint filters can be selected in the footprint dropdown menu at right.

After selecting a symbol to place, the symbol will be attached to the cursor. Left clicking the desired location in the schematic places the symbol into the schematic. Before placing the symbol in the schematic, you can rotate it, mirror it, and edit its fields, by either using the hotkeys or the right-click context menu. These actions can also be performed after placement.

Ecco un simbolo durante il piazzamento:

componente durante il piazzamento

If the "Place repeated copies" option is checked, after placing a symbol KiCad will start placing another copy of the symbol. This process continues until the user presses Esc.

For symbols with multiple units, if the "Place all units" option is checked, after placing the symbol KiCad will start placing the next unit in the symbol. This continues until the last unit has been placed or the user presses Esc.

6.3.2. Placing power ports

A power port symbol is a symbol representing a connection to a power net. The symbols are grouped in the power library, so they can be placed using the symbol chooser. However, as power placements are frequent, the Add Power icon tool is available. This tool is similar, except that the search is done directly in the power library.

6.3.3. Modifica di simboli (piazzati)

Ci sono due modi per modificare un simbolo:

  • La modifica del simbolo stesso: posizione, orientamento, selezione unità di un simbolo multi-unità.

  • La modifica di uno dei campi del simbolo: riferimento, valore, impronta, ecc.

Quando un simbolo è stato appena piazzato, si può doverne modificarne i valori (in particolare per le resistenze, condensatori, ecc.), mentre non serve assegnare un numero di riferimento direttamente, o selezionare l’unità (eccetto per simboli con unità bloccate, che devono essere assegnate manualmente). Ciò può essere svolto automaticamente dalla funzione di annotazione.

Modifica di un simbolo

Per modificare delle caratteristiche di un simbolo, posizionare il puntatore sul simbolo e fare:

  • Fare doppio clic sul simbolo per aprire la finestra di dialogo di modifica.

  • Clic destro per aprire il menu contestuale e usare uno dei comandi: sposta, orienta, modifica, cancella, ecc.

  • Use a hotkey to perform an action on the symbol (E to open the properties dialog, R to rotate, etc.). Note that hotkeys act on the selected symbol; if no symbol is selected hotkeys act on the symbol under the cursor.

Symbols can also be selected by clicking on them or drag-selecting them. Selected symbols can be modified by clicking relevant buttons in the top toolbar or using a hotkey.

Modifiche dei campi di testo

Si possono modificare i riferimenti, valori, posizioni, orientamenti, dimensioni del testo e visibilità dei campi:

  • Doppio clic sul campo testo per modificarlo.

  • Clic destro per aprire il menu contestuale e usare uno de comandi: sposta, ruota, modifica, cancella, ecc.

  • Position the cursor over the field (if nothing is selected) or select the field and press E to edit the field.

  • Position the cursor over the symbol (if nothing is selected) or select the symbol and press V, U, or F hotkeys to directly edit the symbol’s value, reference designator, or footprint fields, respectively.

Per ottenere ulteriori opzioni, o per creare altri campi, doppio clic sul simbolo per aprire la finestra di dialogo delle proprietà del simbolo.

Finestra di dialogo proprietà componente

Ogni campo può essere visibile o nascosto, e mostrato orizzontalmente o verticalmente. La posizione mostrata è sempre indicata per un simbolo mostrato normalmente (nessuna rotazione o ribaltamento speculare) ed è relativa al punto di ancoraggio del simbolo.

The position and orientation properties of each field may be hidden in this dialog. They can be shown by right-clicking on the column header of the fields table and enabling the "Orientation", "X Position", and/or "Y Position" columns. Other columns can be shown or hidden as desired.

The "Update Symbol from Library…​" button is used to update the schematic’s copy of the symbol to match the copy in the library. The "Change Symbol…​" button is used to swap the current symbol to a different symbol in the library.

"Edit Symbol…​" opens the Symbol Editor to edit the copy of the symbol in the schematic. Note that the original symbol in the library will not be modified. The "Edit Library Symbol…​" button opens the Symbol Editor to edit the original symbol in the library. In this case, the symbol in the schematic will not be modified until the user clicks the "Update Symbol from Library…​" button.

6.4. Electrical Connections

6.4.1. Introduzione

There are a number of elements that can be added to a schematic to electrically connect components. All of these elements can be placed with the buttons on the vertical right toolbar or using hotkeys.

Questi elementi sono:

  • Wires: direct connection between pins.

  • Buses: connections for a group of signals.

  • Bus entries: connections between wires and buses.

  • No-connection flags: terminations for pins or wires that are intentionally unconnected. These flags prevent ERC violations for unconnected pins.

  • Junctions: connections between crossing wires or buses.

  • Net labels: local name for a signal. Signals within a sheet that have the same net label are connected.

  • Global labels: global name for a signal. Signals with the same global label are connected even if they are not in the same sheet.

  • Hierarchical labels: a label for a signal in a subsheet that enables the signal to be accessed in a parent sheet. See the Hierarchical Schematics section for more information about hierarchical labels, sheets, and pins.

  • Hierarchical sheets: an instantiation of a subsheet within a parent sheet. The parent sheet can connect to the subsheet through the subsheet’s hierarchical pins.

  • Hierarchical pins: connection points between a parent sheet and a subsheet. Hierarchical pins appear at the parent sheet’s level and correspond to hierarchical labels in the subsheet.

Several other types of items can be placed on the schematic but do not affect connectivity:

  • Graphical lines: graphical lines for presentation.

  • Text: textual comments and annotations.

  • Bitmap images: raster graphics from an external file.

This section will also discuss two special types of symbols that can be added with the "Power port" button on the right toolbar:

  • Power ports: symbols for connecting wires to a power or ground net.

  • PWR_FLAG: a specific symbol for indicating that a net is powered when it is not connected to a power output pin (for example, a power net that is supplied by an off-board connector).

6.4.2. Connessioni (fili ed etichette)

Ci sono due metodi per instaurare connessioni:

  • Fili tra pin.

  • Etichette.

La figura seguente mostra i due metodi:

Etichette fili
Label Connections

The point of "contact" of a label is the small square in the corner of the label. The square disappears when the label is connected. The position of the connection point relative to the label text can be changed by choosing a different label orientation in the label properties, or by mirroring/rotating the label.

The label’s connection point must be in contact with a wire or the end of a pin for the label to be connected.

Wire Connections

Per stabilire una connessione, un segmento di filo deve essere connesso ai suoi capi ad un altro segmento o a un piedino.

Se c’è una sovrapposizione (se un filo passa sopra un pin, ma senza essere connesso alla fine del piedino) non c’è connessione.

Note
Wires connect with other wires or pins only if their ends conincide exactly. Therefore it is important to keep symbol pins and wires aligned to the grid. It is recommended to always use a 50 mil grid when placing symbols and drawing wires because the KiCad standard symbol library and all libraries that follow its style also use a 50 mil grid.
Note
Symbols, wires, and other elements that are not aligned to the grid can be snapped back to the grid by selecting them, right clicking, and selecting "Align Elements to Grid."
Wire Junctions

Wires that cross are not implicitly connected. It is necessary to join them with a junction dot if a connection is desired. Junction dots will be automatically added to wires that start or end on top of an existing wire.

Junction dots are used in the previous figure on the wires connected to P1 pins 18, 19, 20, 21, 22, and 23.

Nets with Multiple Names

A signal can only have one name. If two different labels are placed on the same net, an ERC violation will be generated. Only one of the net names will be used in the netlist.

Hidden Power Pins

When the power pins of a symbol are visible, they must be connected, as with any other signal.

However, symbols such as gates and flip-flops are sometimes drawn with hidden power input pins which are connected implicitly.

KiCad automatically connects invisible pins with type "power input" to a global net with the same name as the pin. For example, if a symbol has a hidden power input pin named VCC, this pin will automatically be connected to the global VCC net.

Note
Care must be taken with hidden power input pins because they can create unintentional connections. By nature, hidden pins are invisible and do not display their pin name. This makes it easy to accidentally connect two power pins to the same net. For this reason, the use of invisible power pins in symbols is not recommended outside of power port symbols, and is only supported for compatibility with legacy designs and symbols.
Note
Hidden pins can be shown in the schematic by checking the Show hidden pins option in the Schematic EditorDisplay Options section of the preferences, or by selecting ViewShow hidden pins. There is also a toggle icon hidden pin 24 on the left (options) toolbar.

It may be necessary to join power nets of different names (for example, GND in TTL components and VSS in MOS components). To accomplish this, add a <<power-ports,power port symbol> for each net and connect them with a wire.

It is not recommended to use labels for power connection. These only have a "local" connection scope, and will not connect to invisible power pins.

6.4.3. Wiring

To begin connecting elements, you may either use the 'Wire' or 'Bus' tools from the right-hand toolbar, or you can auto-start a new wire from any existing pin or unconnected wire.

The wire drag action will drag the entire wire if you start dragging from the middle of the wire. Alternatively, it will drag just one corner if you start the drag action over a corner where two wires connect

6.4.4. Connessioni (Bus)

Nello schema elettrico seguente, molti piedini sono connessi a dei bus.

Esempio di schema elettrico con bus
Membri di bus

I bus sono un modo per raggruppare segnali in relazione tra loro in uno schema elettrico, in modo da semplificare i progetti complessi. I bus possono essere disegnati come i fili usando lo strumento bus, e i loro nomi vengono assegnati usando le etichette allo stesso modo di come si fa con i fili dei segnali. Ci sono due tipi di bus in KiCad 6.0 e successivi: bus vettoriali e bus di gruppo.

Un bus vettoriale è un insieme di segnali che cominciano con un prefisso comune e finiscono con un numero. I bus vettoriali hanno nome nella forma <PREFISSO>[M..N] dove PREFISSO è un qualsiasi nome di segnale valido, M è il primo numero del suffisso, e N è l’ultimo numero del suffisso. Per esempio, il bus DATA[0..7] contiene i segnali DATA0, DATA1, e così via fino a DATA7. Non importa in quale ordine M ed N vengono specificati, ma entrambi devono essere positivi.

Un bus di gruppo è un insieme di uno o più segnali e/o bus vettoriali. I bus di gruppo possono essere usati per tenere assieme segnali correlati anche quando questi hanno nomi diversi. I bus di gruppo usano una sintassi etichetta speciale:

<NOME_OPZIONALE>{SEGNALE1 SEGNALE2 SEGNALE3}

I membri del gruppo sono elencati dentro parentesi graffe ({}) separati da spazi. Il nome opzionale del gruppo va prima della prima parentesi. Se il bus di gruppo è anonimo, i collegamenti risultanti sul C.S. saranno semplicemente i nomi dei segnali dentro il gruppo. Se il bus di gruppo possiede un nome, i collegamenti risultanti avranno il nome come prefisso, con un punto (.) di separazione tra il prefisso e il nome del segnale.

Per esempio, il bus {SCL SDA} ha due segnali membri, e nella netlist questi segnali saranno SCL e SDA. Il bus USB1{DP DM} genererà collegamenti chiamati USB1.DP e USB1.DM. Per progetti con bus grandi, ripetuti tra diversi circuiti simili, l’uso di questa tecnica può far risparmiare tempo.

I bus di gruppo possono contenere anche bus vettoriali. Per esempio, il bus MEMORY{A[7..0] D[7..0] OE WE} contiene sia bus vettoriali che segnali normali, il ché porterà a del collegamenti del tipo MEMORY.A7 e MEMORY.OE sul C. S. .

Bus wires can be drawn and connected in the same manner as signal wires, including using junctions to create connections between crossing wires. Like signals, buses cannot have more than one name — if two conflicting labels are attached to the same bus, an ERC violation will be generated.

Connessioni tra membri di bus

Pins connected between the same members of a bus must be connected by labels. It is not possible to connect a pin directly to a bus; this type of connection will be ignored by KiCad.

Nell’esempio sopra, le connessioni vengono effettuate dalle etichette piazzate sui fili connessi ai piedini. Le voci di bus (segmenti di filo a 45 gradi) sono solo elementi grafici, e non sono necessarie per formare connessioni logiche.

In fact, using the repetition command (Insert), connections can be very quickly made in the following way, if component pins are aligned in increasing order (a common case in practice on components such as memories, microprocessors…​):

  • Place the first label (for example PCA0)

  • Use the repetition command as much as needed to place members. KiCad will automatically create the next labels (PCA1, PCA2…​) vertically aligned, theoretically on the position of the other pins.

  • Disegnare il filo sotto la prima etichetta. Usare poi il comando di ripetizione per piazzare gli altri fili sotto le etichette.

  • Se necessario, piazzare le voci di bus allo stesso modo (piazzare la prima voce, poi usare il tasto di ripetizione).

Note

In the Schematic EditorEditing Options section of the Preferences menu, you can set the repetition parameters:

  • Horizontal pitch.

  • Vertical pitch.

  • Label increment (labels can be incremented or decremented by 1, 2, 3, etc.).

Dispiegamento bus

The unfold tool allows you to quickly break out signals from a bus. To unfold a signal, right-click on a bus object (a bus wire, etc) and choose Unfold from Bus. Alternatively, use the Unfold Bus hotkey (default: C) when the cursor is over a bus object. The menu allows you to select which bus member to unfold.

Dopo aver selezionato il membro del bus, il successivo clic posizionerà l’etichetta del membro del bus alla posizione desiderata. Lo strumento genera automaticamente una voce bus ed un filo in direzione della posizione dell’etichetta. Dopo il posizionamento dell’etichetta, si può continuare a posizionare altri segmenti di filo (per esempio, per connetterli ai pin di un componente) e completare il collegamento in uno qualsiasi dei normali metodi.

Alias di bus

Gli alias di bus sono scorciatoie che permettono di lavorare con grandi insiemi di bus in modo più efficiente. Essi permettono di definire un gruppo di bus e dare ad esso un nome corto che può essere usato poi al posto del nome completo in tutto lo schema elettrico.

To create bus aliases, open the Bus Definitions dialog in the Tools menu.

Finestra di dialogo di definizione dei bus

Ad un alias si può dare come nome un qualsiasi nome di segnale valido. Usando la finestra di dialogo, si possono aggiungere segnali o bus vettoriali all’alias. Come scorciatoia, si può battere o incollare dentro un’elenco di segnali e/o buse separati da spazi, e questi verranno aggiunti alla definizione di alias. In questo esempio, definiamo un alias chiamato USB con membri DP, DM, e VBUS.

Dopo la definizione di un alias, esso può essere usato in una etichetta di bus di gruppo mettendo il nome dell’alias dentro le parentesi graffe del bus di gruppo: {USB}. Ciò ha lo stesso effetto dell’etichettare il bus {DP DM VBUS}. Si può anche aggiungere un nome prefisso al gruppo, come USB1{USB}, il che da come risultati collegamenti come USB1.DP come descritto sopra. Per bus complessi, l’uso di alias può rendere l’etichettatura dello schema elettrico molto più corta. Si faccia attenzione al fatto che gli alias sono solo scorciatoie, e che il nome dell’alias non viene incluso nella netlist.

Gli alias dei bus vengono salvati nel file dello schema elettrico. Qualunque alias creato in un dato foglio dello schema elettrico è disponibile all’uso in qualunque altro foglio della gerarchia dello progetto.

Bus con più di una etichetta

KiCad 5.0 e versioni precedenti permettevano la connessione di bus con diverse etichette assieme, e collegavano assieme i membri di detti bus durante la creazione della netlist. Questo comportamento è stato eliminato in KiCad 6.0 perché è incompatibile con i bus di gruppo, e anche perché tendeva a creare confusione nelle netlist perché il nome che un dato segnale avrebbe ricevuto non era facilmente predicibile.

Se si apre un progetto che faceva uso di questa caratteristica in una versione moderna di KiCad, si potrà osservare la finestra di dialogo di ``Migrazione bus'' che vi guiderà attraverso la procedura di aggiornamento dello schema in modo tale da garantire l’esistenza di una sola etichetta per un dato insieme di collegamenti bus.

Finestra di dialogo di migrazione bus

Per ogni insieme di fili di bus che ha più di una etichetta, è necessario scegliere l’etichetta da tenere. Il menu a discesa permette di scegliere tra le etichette che esistono nel progetto, oppure è anche possibile scegliere un nome ancora diverso inserendolo manualmente nel campo del nuovo nome.

6.4.5. Power Ports

Power port symbols are conventionally used to connect pins to power nets. Power port symbols have a single pin which is invisible and marked as a power input. As described in the hidden power pins section, any wire connected to the pin of a power port is therefore automatically connected to the power net with the same name as the port’s pin.

In the KiCad standard library, power ports are found in the power library, but power port symbols can be created in any library. To create a custom power port, make a new symbol with a hidden pin marked as a power input. Name the pin according to the desired power net.

La figura sottostante mostra un esempio di connessioni di porte di alimentazione.

Esempio di porte di alimentazione

In this example, power ports symbols are used to connect the positive and negative terminals of the capacitors to the VCC and GND nets, respectively.

Power port symbols are found in the power symbol library. They can also be created by drawing a symbol with a hidden "power input" pin that has the name of the desired power net.

6.4.6. PWR_FLAG

Two PWR_FLAG symbols are visible in the screenshot above. They indicate to ERC that the two power nets VCC and GND are actually connected to a power source, as there is no explicit power source such as a voltage regulator output attached to either net.

Without these two flags, the ERC tool would diagnose: Error: Input Power pin not driven by any Output Power pins.

The PWR_FLAG symbol is found in the power symbol library. The same effect can be achieved by connecting any "Power Output" pin to the net.

6.4.7. No-connection flag

No-connection flags (No-connection icon) are used to indicate that a pin is intentionally unconnected. These flags do not have any effect on the schematic’s connectivity, but they prevent "unconnected pin" ERC warnings for pins that are intentionally unconnected.

6.5. Complementi grafici

6.5.1. Text comments and graphic lines

It can be useful to place annotations such as text fields and frames to aid in understanding the schematic. Text fields (text 24) and graphic lines (add dashed line 24) are intended for this use, as opposed to labels and wires, which are connection elements.

The image below shows graphic lines and text in addition to wires, local labels, and hierarchical labels.

Esempio di riquadro con testo

6.5.2. Blocco del titolo del foglio

The title block is edited with the Page Settings tool (Page Settings tool).

Finestra di dialogo delle impostazioni pagina

Each field in the title block can be edited, as well as the paper size and orientation. If the "Export to other sheets" option is checked for a field, that field will be updated in the title block of all sheets, rather than only the current sheet.

A drawing sheet template file can also be selected.

Blocco del titolo

The sheet number (Sheet X/Y) is automatically updated, but sheet page numbers can also be manually set using EditEdit Sheet Page Number…​.

6.6. Recupero di simboli dalla cache

By default, KiCad loads symbols from the project libraries according to the set paths and library order. This can cause a problem when loading a very old project: if the symbols in the library have changed or have been removed or the library no longer exists since they were used in the project, the ones in the project would be automatically replaced with the new versions. The new versions might not line up correctly or might be oriented differently leading to a broken schematic.

When a project is saved, a cache library with the contents of the current library symbols is saved along with the schematic. This allows the project to be distributed without the full libraries. If you load a project where symbols are present both in its cache and in the system libraries, KiCad will scan the libraries for conflicts. Any conflicts found will be listed in the following dialog:

Finestra di dialogo di conflitti nel recupero

Si può vedere in questo esempio che il progetto in origine aveva usato un diodo con il catodo verso l’alto, ma ora la libreria ne contiene uno con il catodo verso il basso. Questo cambiamento può danneggiare il progetto! Premendo OK qui farà in modo di salvare il vecchio simbolo in una speciale libreria di ``recupero'', e tutti i componenti che usano quel simbolo verranno rinominati per evitare conflitti di nome.

If you press Cancel, no rescues will be made, so KiCad will load all the new components by default. If you save the schematic at this point, your cache will be overwritten and the old symbols will not be recoverable. If you have saved the schematic, you can still go back and run the rescue function again by selecting "Rescue Cached Components" in the "Tools" menu to call up the rescue dialog again.

Se si preferisce non visualizzare questa finestra di dialogo, è possibile premere ``Non mostrare più''. L’impostazione predefinita non farà nulla e permetterà di caricare i nuovi componenti. Questa opzione può essere ripristinata nelle preferenze delle librerie.

7. Schemi elettrici gerarchici

7.1. Introduzione

Una rappresentazione gerarchica è in genere una buona soluzione al problema dei progetti consistenti in più di qualche foglio. Se si vuole gestire questa tipologia di progetti, è necessario:

  • Usare fogli grandi, con il risultato di avere poi problemi di stampa e di gestione dei fogli.

  • Usare diversi fogli gerarchici, che portano ad una struttura gerarchica.

Lo schema elettrico completo consisterà quindi in un foglio principale, chiamato foglio radice, e dei sotto-fogli costituenti la gerarchia. Inoltre, una attenta suddivisione del progetto in fogli separati migliora la sua leggibilità.

From the root sheet, you must be able to find all sub-sheets. Hierarchical schematics management is very easy with KiCad, thanks to an integrated "hierarchy navigator" accessible via the icon Hierarchy navigator icon of the top toolbar.

Ci sono due tipi di gerarchie che possono esistere simultaneamente: la prima è stata appena menzionata ed è di uso generale. La seconda consiste nella creazione simboli nella libreria che appaiono come simboli tradizionali nello schema, ma che effettivamente consistono a loro volta di uno schema elettrico che descrive la loro struttura interna.

Questo secondo tipo viene usato per sviluppatr circuiti integrati, dato che in questo caso è necessario usare funzioni di libreria nello schema che si sta progettando.

KiCad currently doesn’t treat this second case.

Una gerarchia può essere:

  • semplice: un dato foglio è usato solo una volta

  • complessa: un dato foglio viene usato più di una volta (istanze multiple)

  • piatta: che consiste in una gerarchia semplice, ma le connessioni tra fogli non sono disegnate.

KiCad can deal with all these hierarchies.

La creazione di uno schema elettrico gerarchico è semplice, l’intera gerarchia viene gestita partendo dallo schema radice, come se si trattasse di un unico schema elettrico.

Due passi importanti da comprendere sono:

  • Come creare un sotto-foglio.

  • Come creare connessioni elettriche tra sotto-fogli.

Navigation among sub-sheets is acheived by using the navigator tool accessible via the button Hierarchy navigator icon on the top toolbar.

hierarchy_navigator_dialog_png

Ogni foglio è raggiungibile facendo clic sul suo nome. Per accedere velocemente, clic destro su un nome foglio, e scegliere Accedi al foglio o fare doppio clic all’interno dei limiti del foglio.

Per uscire dal foglio corrente sul foglio genitore, fare clic con il tasto destro del mouse ovunque sullo schema in cui non vi siano oggetti e selezionare la voce del menu di scelta rapida ``Lascia il foglio'' o premere Alt+Backspace.

7.3. Locale, etichette gerarchiche e globali

7.3.1. Proprietà

Local labels, tool Local label icon, are connecting signals only within a sheet. Hierarchical labels (tool Hierarchical label icon) are connecting signals only within a sheet and to a hierarchical pin placed in the parent sheet.

Global labels (tool Global label icon) are connecting signals across all the hierarchy. Power pins (type power in and power out) invisible are like global labels because they are seen as connected between them across all the hierarchy.

Note
Dentro una gerarchia (semplice o complessa) si può usare sia etichette gerarchiche, assieme o in alternativa a, etichette globali.

7.4. Riepilogo della creazione della gerarchia

Si deve:

  • Piazzare nel foglio radice un simbolo gerarchico chiamato "simbolo foglio".

  • Inserire nel nuovo schema (sotto-foglio) con il navigatore e disegnarlo, come ogni altro schema elettrico.

  • Disegnare le connessioni elettriche tra due schemi piazzando etichette globali (hlabel) nel nuovo schema (sotto-foglio), ed etichette con lo stesso nome nel foglio radice, queste ultime conosciute anche come EtichetteFoglio. Queste EtichetteFoglio saranno connesse al simbolo del foglio, del foglio radice, ad altri elementi dello schema come normali pin di simboli.

7.5. Simbolo di foglio

Disegna un rettangolo definito dai due punti diagonali che simboleggiano il sotto-foglio.

La dimensione di questo rettangolo deve consentire di piazzare in seguito etichette particolari, piedini gerarchici, corrispondenti alle etichette globali (hlabel) nel sotto-foglio.

These labels are similar to usual symbol pins. Select the tool Add hierarchical subsheet icon.

Fare clic per piazzare l’angolo sinistro alto del rettangolo. Fare clic nuovamente per piazzare l’angolo destro basso, verificando di creare un rettangolo sufficientemente dimensionato.

Verrà richiesto di inserire un nome file e un nome foglio per questo sotto-foglio (in modo da poter raggiungere lo schema corrispondente, usando il navigatore della gerarchia).

hsheet_properties_1_png

Bisogna per lo meno dare un nome file. Se non c’è un nome foglio, il nome file verrà usato come nome foglio (solitamente si lascia così).

7.6. Connessioni - piedini gerarchici

Qui si devono creano i punti di connessione (punti gerarchici) per il simbolo appena creato.

Questi punti di connessione sono simili ai piedini di normali simboli, ma con la possibilità di connettere un bus completo con solo un punto di connessione.

7.6.1. Importing Hierarchical Sheet Pins

  • Select the tool Import hierarchical pin icon.

  • Click on the hierarchical sheet from where you want to import the pins corresponding to hierarchical labels placed in the corresponding schematic. A hierarchical pin appears, if a new hierarchical label exists, i.e. not corresponding to an already placed pin.

  • Fare clic dove si vuole piazzare questo piedino.

All necessary pins can thus be placed quickly and without error. Their aspect is in accordance with corresponding hierarchical labels.

7.7. Connessioni - etichette gerarchiche

Each pin of the sheet symbol just created, must correspond to a label called hierarchical Label in the sub-sheet. Hierarchical labels are similar to labels, but they provide connections between sub-sheet and root sheet. The graphical representation of the two complementary labels (pin and hierarchical labels) is similar. Hierarchical labels are made with the tool Add hierarchical label icon.

Di seguito un esempio di foglio radice:

hierarchical_label_root_png

Si noti il pin VCC_PIC, collegato al connettore JP1.

Ecco le connessioni corrispondenti nel sotto-foglio:

hierarchical_label_sub_png

Si troverà ancora, le due corrispondenti etichette gerarchiche, che forniscono connessione tra i due fogli gerarchici.

Note
Si può usare etichette gerarchiche e pin gerarchici per connettere due bus, secondo la sintassi (Bus [N. .m]) descritta in precedenza.

7.7.1. Etichette, etichette gerarchiche, etichette globali e pin di alimentazione invisibili

Ecco alcune note sulle varie modalità di fornire connessioni, a parte le connessioni tramite i semplici fili disegnati.

Etichette semplici

Le etichette semplici hanno una capacità di connessione locale, cioè limitata al foglio dello schema dove sono collocate. Ciò è dovuto al fatto che:

  • Ogni foglio ha un numero di foglio.

  • Questo numero di foglio è associato ad una etichetta.

Perciò, se si piazza l’etichetta "TOTO" nel foglio n° 3, in effetti l’etichetta vera è "TOTO_3". Se si piazza anche un’etichetta "TOTO" nel foglio n° 1 (foglio radice) si piazza in effetti un’etichetta di nome "TOTO_1", differente da "TOTO_3". Ciò si verifica sempre, anche quando c’è un solo foglio.

Etichette gerarchiche

Quanto detto per le etichette semplici risulta vero anche per le etichette gerarchiche.

Perciò nello stesso foglio, un’etichetta gerarchica "TOTO" viene considerata connessa ad un’etichetta locale "TOTO", ma non connessa ad un’etichetta gerarchica o un’etichetta di nome "TOTO" in un altro foglio.

Comunque, un’etichetta gerarchica viene considerata connessa al corrispondente simbolo di piedino foglio nel simbolo gerarchico piazzato nel foglio genitore.

Pin di alimentazione invisibili

Si era visto che i piedini di alimentazione invisibili sono connessi assieme se posseggono lo stesso nome. Perciò tutti i piedini di alimentazione dichiarati ``Piedini di alimentazione invisibili'' e chiamati VCC sono interconnessi e formano la connessione VCC, ma solo nel foglio dove essi siano stati piazzati.

Ciò significa che se si piazza un’etichetta VCC in un sotto-foglio, essa non verrà connessa ai piedini VCC, dato che questa etichetta è in realtà VCC_n, dove n è il numero di foglio.

Se si desidera che questa etichetta VCC sia veramente connessa alla VCC dell’intero foglio, essa dovrà essere esplicitamente connessa ad un piedino di alimentazione invisibile, grazie ad una porta di alimentazione VCC.

7.7.2. Etichette globali

Le etichette globali che posseggono un nome identico sono connesse attraverso l’intera gerarchia.

(etichette di alimentazione come vcc …​ sono etichette globali)

7.8. Gerarchia complessa

Ecco un esempio. Lo stesso schema viene usato due volte (due istanze). I due fogli condividono lo stesso schema perché il nome del file è lo stesso per i due fogli (``other_sheet.sch''). Ma i nomi dei fogli devono essere univoci.

Gerarchia Eeschema complessa

7.9. Gerarchia piatta

Si può creare un progetto usando molti fogli, senza creare connessioni tra questi fogli (gerarchia piatta) se le seguenti regole vengono rispettate:

  • Creare un foglio radice contenente gli altri fogli, che agisce come un collegamento tra gli altri fogli.

  • Non sono necessarie connessioni esplicite.

  • Usare etichette globali invece di etichette gerarchiche in tutti i fogli.

Ecco un esempio di un foglio radice.

Gerarchia Eeschema piatta

Ecco le due pagine, connesse tramite etichette globali.

Ecco il pic_programmer.sch.

Gerarchia Eeschema piatta 1

Ecco il pic_sockets.sch.

Gerarchia Eeschema piatta 2

Guardare le etichette globali.

Gerarchia Eeschema piatta 3

8. Strumento di annotazione simboli

8.1. Introduzione

The annotation tool allows you to automatically assign a designator to symbols in your schematic. Annotation of symbols with multiple units will assign a unique suffix to minimize the number of these symbols. The annotation tool is accessible via the icon Annotate icon. Here you find its main window.

annotate-dialog_img

Schemi di annotazione disponibili:

  • Annota tutti i simboli (reimpostando le opzioni di annotazione esistenti)

  • Annota tutti i simboli, ma non scambiare nessuna unità multipla annotata precedentemente.

  • Annota solo i simboli che al momento non sono annotati. I simboli che non sono annotati avranno un designatore che termina con un '?' carattere.

  • Annota l’intera gerarchia (usa l’opzione schema intero).

  • Annota solo il foglio attuale (usa l’opzione solo pagina corrente).

L’opzione ``Reimposta, ma non scambiare nessuna parte multipla annotata'' mantiene tutte le associazioni esistenti tra simboli con più unità. Per esempio, se si ha U2A e U2B, queste possono essere riannotate rispettivamente a U1A e U1B, ma non saranno mai riannotate a U1A e U2A, né a U2B e U2A. Utile se ci si vuole assicurare che i raggruppamenti di pin vengano mantenuti.

La scelta dell’ordine di annotazione fornisce il metodo usato per impostare il numero di riferimento dentro ogni foglio della gerarchia.

Ad eccezione di casi particolari, l’annotazione automatica si applica all’intero progetto (tutti i fogli) e ad i nuovi componenti, se non si vuole modificare le annotazioni precedenti.

La scelta annotazione fornisce il metodo usato per calcolare il riferimento:

  • Usa il primo numero libero nello schema: i componenti vengono annotati da 1 (per ogni prefisso di riferimento). Se esiste una precedente annotazione, verranno usati i numeri non ancora in uso.

  • Comincia dal foglio numero*100 e usa il primo numero libero: l’annotazione comincia da 101 per il foglio numero 1, da 201 per il foglio numero 2, ecc. Se ci sono più di 99 elementi con lo stesso prefisso di riferimento (U, R) nel foglio 1, lo strumento di annotazione usa il numero 200 e più, e l’annotazione per il foglio 2 comincerà dal prossimo numero libero.

  • Comincia dal foglio numero*1000 e usa il primo numero libero. L’annotazione comincia da 1001 per il foglio 1, 2001 per il foglio 2.

8.2. Alcuni esempi

8.2.1. Ordine di annotazione

Questo esempio mostra 5 elementi piazzati, ma non annotati.

eeschema_annotation_order_none_png

Dopo che lo strumento di annotazione viene eseguito, viene ottenuto il seguente risultato.

Ordinato per posizione X.

eeschema_annotation_order_x_png

Ordinato per posizione Y.

eeschema_annotation_order_y_png

Si può osservare che quattro porte 74LS00 sono state distribuite nel contenitore U1, e che la quinta 74LS00 è stata assegnata al successivo U2.

8.2.2. Scelte di annotazione

Ecco un’annotazione nel foglio 2 dove è stata impostata l’opzione usa il primo numero libero nello schema.

eeschema_annotation_choice_free_png

L’optione comincia dal foglio numero*100 e usa il prino numero libero produce il seguente risultato.

eeschema_annotation_choice_x100_png

L’opzione comincia dal numero*1000 e usa il primo numero libero produce il seguente risultato.

eeschema_annotation_choice_x1000_png

9. Verifica della progettazione con il Controllo Regole Elettriche (ERC)

9.1. Introduzione

Lo strumento per il controllo regole elettriche (ERC) esegue un controllo automatico dello schema elettrico. L’ERC segnala gli errori presenti nel foglio, come piedini sconnessi, simboli gerarchici sconnessi, uscite in corto-circuito, ecc. Naturalmente, un controllo automatico non è infallibile, ed il software che rende possibile la rilevazione di tutti gli errori di progettazione non è completo al 100%. Un tale controllo è molto utile, perché permette di rilevare molte sviste e piccoli errori.

In pratica tutti gli errori rilevati devono essere controllati e corretti prima di poter procedere. La qualità dell’ERC è direttamente proporzionale alla cura presa nel dichiarare le proprietà elettriche dei piedini durante la creazione delle librerie. I risultati dell’ERC vengono riportati come errori'' o avvertimenti''.

Finestra di dialogo ERC

9.2. Come usare l’ERC

ERC can be started by clicking on the icon ERC icon.

Gli avvertimenti vengono piazzati sugli elementi dello schema elettrico che provocano gli errori ERC (piedini o etichette).

Note
  • In questa finestra di dialogo, facendo clic su un messaggio di errore, si salta direttamente al corrispettivo marcatore sullo schema elettrico.

  • Sullo schema elettrico, facendo clic destro su un marcatore si accedere al corrispondente messaggio diagnostico.

You can also delete error markers from the dialog and set specific ERC messages to be suppressed by using the right-click context menu.

Ignore ERC warning

9.3. Esempio di ERC

Puntatori ERC

Qui si può osservare quattro errori:

  • Due uscite sono state erroneamente collegate assieme (freccia rossa).

  • Due ingressi sono stati lasciati sconnessi (freccia verde).

  • C’è un errore su un ingresso di alimentazione invisibile, manca la segnalazione di alimentazione (freccia verde in cima).

9.4. Mostrare i messaggi diagnostici

Facendo clic destro su un marcatore si apre un menu che permette di accedere alla finestra diagnostica del marcatore ERC.

Informazioni sui puntatori ERC

e se si fa clic su 'Info errore marcatore' si ottiene una descrizione dell’errore.

ERC pointers message

9.5. Piedini e segnalazioni di alimentazione

Succede spesso di avere una segnalazione o un errore su un piedino di alimentazione, anche se sembra tutto normale. Si osservi l’esempio sovrastante. Ciò succede perché, in molti progetti, l’alimentazione viene fornita da connettori che non sono sorgenti di alimentazione (diversamente dall’uscita di un regolatore, che viene dichiarata come sorgente di alimentazione).

L’ERC perciò non individuerà nessun piedino di alimentazione che controlla questo filo e lo dichiarerà non alimentato da nessuna sorgente di alimentazione.

Per evitare questo avvertimento è necessario piazzare un ``PWR_FLAG'' su questa porta. Si osservi il seguente esempio:

Power pins and flags

Il marcatore d’errore allora sparirà.

Il più delle volte, un PWR_FLAG deve essere connesso a GND, dato che normalmente i regolatori hanno uscite dichiarate come uscite di alimentazione ma i piedini di massa non sono mai dichiarati in tal modo (l’attributo normale è invece come ingresso di alimentazione), perciò le masse non appaiono mai connesse ad una sorgente di alimentazione senza un pwr_flag.

9.6. Configurazione

The Pin Conflicts Map panel in Schematic Setup allows you to configure connectivity rules to define electrical conditions for errors and warnings based on what types of pins are connected to each other

Schematic ERC Pin Conflicts Map

Le regole possono essere cambiate facendo clic sul riquadro desiderato della matrice, in modo da selezionare la scelta desiderata: normale, avvertimento, errore.

Schematic ERC severity settings

The Violation Severity panel in Schematic Setup lets you configure what types of ERC messages should be reported as Errors, Warnings or ignored.

9.7. File rapporto ERC

Un file di rapporto ERC può essere generato e salvato selezionando l’opzione “Scrivi rapporto ERC”. L’estensione del file per i file di rapporto ERC è “.erc”. Ecco un esempio di file rapporto ERC:

ERC control (4/1/1997-14:16:4)

***** Sheet 1 (INTERFACE UNIVERSAL)
ERC: Warning Pin input Unconnected @ 8.450, 2.350
ERC: Warning passive Pin Unconnected @ 8.450, 1.950
ERC: Warning: BiDir Pin connected to power Pin (Net 6) @ 10.100, 3.300
ERC: Warning: Power Pin connected to BiDir Pin (Net 6) @ 4.950, 1.400

>> Errors ERC: 4

10. Creazione di una netlist

10.1. Panoramica

Una netlist (elenco di net) è un file che descrive le connessioni elettriche (net) tra simboli. Nel file di netlist si possono trovare:

  • L’elenco dei simboli

  • L’elenco delle connessioni (net) tra simboli.

Esistono diversi formati di netlist. A volte, l’elenco simboli e l’elenco dei collegamenti, sono due file separati. La netlist è fondamentale per uso di software di progettazione elettronica, dato che la netlist è anche un mezzo di collegamento con gli altri software di CAD elettronico, come:

  • Software per circuiti stampati.

  • Simulazione di circuiti elettrici e circuiti stampati.

  • Compilatori di CPLD (e di altri chip programmabili).

The KiCad Schematic Editor supports several netlist formats.

  • Formato PCBNEW (circuiti stampati).

  • Formato ORCAD PCB2 (circuiti stampati).

  • Formato CADSTAR (circuiti stampati).

  • Formato Spice, per vari simulatori (di questa famiglia ma il formato Spice viene usato anche da altri simulatori).

10.2. Formati di netlist

Selezionare lo strumento Icona netlist per aprire la finestra di dialogo di creazione della netlist.

Selezionato Pcbnew

eeschema_netlist_dialog_pcbnew_png

Selezionato Spice

eeschema_netlist_dialog_spice_png

Usando le diverse schede è possibile selezionare il formato desiderato. Nel formato Spice si può generare netlist sia con nomi di collegamenti (sono più leggibili) o con numeri di collegamento (le vecchie versioni di Spice accettano solo numeri). Facendo clic sul pulsante Netlist, verrà richiesto un nome file per la netlist.

Note
La generazione della netlist può impiegare diversi minuti con schemi elettrici estesi.

10.3. Esempi netlist

In basso si può osservare uno schema che usa la libreria PSPICE:

eeschema_netlist_schematic_png

Esempio di file di netlist PCBNEW:

# Eeschema Netlist Versione 1.0 generato il 21/1/1997-16:51:15
(
(32E35B76 $noname C2 1NF {Lib=C}
(1 0)
(2 VOUT_1)
)
(32CFC454 $noname V2 AC_0.1 {Lib=VSOURCE}
(1 N-000003)
(2 0)
)
(32CFC413 $noname C1 1UF {Lib=C}
(1 INPUT_1)
(2 N-000003)
)
(32CFC337 $noname V1 DC_12V {Lib=VSOURCE}
(1 +12V)
(2 0)
)
(32CFC293 $noname R2 10K {Lib=R}
(1 INPUT_1)
(2 0)
)
(32CFC288 $noname R6 22K {Lib=R}
(1 +12V)
(2 INPUT_1)
)
(32CFC27F $noname R5 22K {Lib=R}
(1 +12V)
(2 N-000008)
)
(32CFC277 $noname R1 10K {Lib=R}
(1 N-000008)
(2 0)
)
(32CFC25A $noname R7 470 {Lib=R}
(1 EMET_1)
(2 0)
)
(32CFC254 $noname R4 1K {Lib=R}
(1 +12V)
(2 VOUT_1)
)
(32CFC24C $noname R3 1K {Lib=R}
(1 +12V)
(2 N-000006)
)
(32CFC230 $noname Q2 Q2N2222 {Lib=NPN}
(1 VOUT_1)
(2 N-000008)
(3 EMET_1)
)
(32CFC227 $noname Q1 Q2N2222 {Lib=NPN}
(1 N-000006)
(2 INPUT_1)
(3 EMET_1)
)
)
# End

In formato PSPICE, la netlist è la seguente:

* Eeschema Netlist Versione 1.1 (formato Spice) data creazione: 18/6/2008-08:38:03

.model Q2N2222 npn (bf=200)
.AC 10 1Meg \*1.2
.DC V1 10 12 0.5


R12   /VOUT N-000003 22K
R11   +12V N-000003 100
L1   N-000003 /VOUT 100mH
R10   N-000005 N-000004 220
C3   N-000005 0 10uF
C2   N-000009 0 1nF
R8   N-000004 0 2.2K
Q3   /VOUT N-000009 N-000004 N-000004 Q2N2222
V2   N-000008 0 AC 0.1
C1   /VIN N-000008 1UF
V1   +12V 0 DC 12V
R2   /VIN 0 10K
R6   +12V /VIN 22K
R5   +12V N-000012 22K
R1   N-000012 0 10K
R7   N-000007 0 470
R4   +12V N-000009 1K
R3   +12V N-000010 1K
Q2   N-000009 N-000012 N-000007 N-000007 Q2N2222
Q1   N-000010 /VIN N-000007 N-000007 Q2N2222

.print ac v(vout)
.plot ac v(nodes) (-1,5)

.end

10.4. Note sulla netlist

10.4.1. Precauzioni sul nomi netlist

Molti strumenti software che usano le netlist non accettano spazi nei nomi dei simboli, pin, collegamenti o altri elementi. Si consiglia di evitare sistematicamente l’uso degli spazi nelle etichette, o nei campi nome o valore dei simboli o dei loro piedini per assicurare sempre la piena compatibilità.

In the same way, special characters other than letters and numbers can cause problems. Note that this limitation is not related to KiCad, but to the netlist formats that can then become untranslatable to software that uses netlist files.

10.4.2. Netlist PSPICE

Per il simulatore Pspice, è necessario includere alcune linee di comando nella netlist stessa (.PROBE, .AC, ecc.).

Ogni linea di testo inclusa nello schema elettrico che cominci con la parola chiave -pspice o -gnucap sarà inserita (senza la parola chiave) in cima alla netlist.

Ogni linea di testo inclusa nello schema elettrico che cominci con la parola chiave +pspice o +gnucap verrà inserita (senza parola chiave) alla fine della netlist.

Ecco un esempio di testo con molte linee singole e una multilinea:

eeschema_pspice_netlist_png

Per esempio, se si batte il testo seguente (non usate un’etichetta!):

-PSPICE .PROBE

verrà inserita nella netlist una linea .PROBE .

Nell’esempio precedente, tre linee erano state inserite all’inizio della netlist e due alla fine, con questa tecnica.

Se si usano testi multilinea, le parole chiave +pspice o +gnucap sono necessarie solo una volta:

+PSPICE .model NPN NPN
.model PNP PNP
.lib C:\Program Files\LTC\LTspiceIV\lib\cmp\standard.bjt
.backanno

crea le quattro linee:

.model NPN NPN
.model PNP PNP
.lib C:\Program Files\LTC\LTspiceIV\lib\cmp\standard.bjt
.backanno

Si noti anche che il collegamento GND deve essere chiamato 0 (zero) per Pspice.

10.5. Altri formati

For other netlist formats you can add netlist converters in the form of plugins. These converters are automatically launched by KiCad. Chapter 14 gives some explanations and examples of converters.

A converter is a text file (xsl format) but one can use other languages like Python. When using the xsl format, a tool (xsltproc.exe or xsltproc) read the intermediate file created by KiCad, and the converter file to create the output file. In this case, the converter file (a sheet style) is very small and very easy to write.

10.5.1. La finestra di dialogo di inizializzazione

Per aggiungere un nuovo plugin di netlist si usa il pulsante Aggiungi plugin.

eeschema_netlist_dialog_add_plugin_png

Ecco la finestra di impostazione del plugin PadsPcb:

eeschema_netlist_dialog_padspcb_png

L’impostazione richiederà:

  • Un titolo (per esempio, il nome del formato della netlist).

  • Il plugin la lanciare.

Quando la netlist viene generata:

  1. KiCad creates an intermediate file *.tmp, for example test.tmp.

  2. KiCad runs the plug-in, which reads test.tmp and creates test.net.

10.5.2. Formato a linea di comando

Ecco un esempio, che usa xsltproc.exe come strumento per convertire dei file .xsl, e un file netlist_form_pads-pcb.xsl come foglio di stile di conversione:

f:/kicad/bin/xsltproc.exe -o %O.net f:/kicad/bin/plugins/netlist_form_pads-pcb.xsl %I

Con:

f:/kicad/bin/xsltproc.exe A tool to read and convert xsl file

-o %O.net

Output file: %O will define the output file.

f:/kicad/bin/plugins/netlist_form_pads-pcb.xsl

File name converter (a sheet style, xsl format).

%I

Will be replaced by the intermediate file created by KiCad (*.tmp).

Per lo schema elettrico test.sch, la riga di comando sarà:

f:/kicad/bin/xsltproc.exe -o test.net f:/kicad/bin/plugins/netlist_form_pads-pcb.xsl test.tmp.

10.5.3. Convertitore e foglio di stie (plugin)

Questo è un software molto semplice, dato che il suo scopo è esclusivamente di convertire un testo in ingresso (il file di testo intermedio) in un altro file di testo. Inoltre, dal file di testo intermedio, è possibile creare una distinta materiali.

Quando si usa xsltproc come strumento di conversione, viene generato solo il foglio di stile.

10.5.4. Formato file netlist intermedio

Consultare il capitolo 14 per ottenere ulteriori informazioni su xslproc, sulle descrizioni del formato file intermedio, e alcuni esempi di fogli di stile per convertitori.

11. Traccia e stampa

11.1. Introduzione

Si accede ai comandi di stampa e di tracciamento (N.d.T. ovvero una stampa esportata in un formato vettoriale) tramite il file menu.

eeschema_file_menu_plot_png

I formati in uscita supportati sono Postscript, PDF, SVG, DXF e HPGL. È anche possibile mandare la stampa direttamente alla stampante.

11.2. Comandi di stampa comuni

Traccia pagina corrente

stampa solo un file solo per il foglio corrente.

Traccia tutte le pagine

permette di tracciare l’intera gerarchia (viene generato un file di stampa per ogni foglio).

11.3. Traccia in Postscript

Questo comando permette di creare file in formato Postscritp.

eeschema_plot_postscript_png

Il nome file è il nome del foglio con estensione .ps. È possibile disabilitare l’opzione "Traccia squadratura e riquadro iscrizioni". È utile se si vuole creare un file postscript per incapsulato (formato .eps) usato spesso per inserire uno schema per esempio in un programma di videoscrittra. La finestra messaggi mostra i nomi (con i percorsi) dei file creati.

11.4. Traccia in PDF

eeschema_plot_pdf.png

Permette di creare file di tracciature usando il formato PDF. Il nome file è in nome del foglio con estensione .pdf .

11.5. Traccia in SVG

eeschema_plot_svg_png

Permette di creare file di tracciatura usando il formato SVG. Il nome del file è il nome del foglio con estensione .svg .

11.6. Traccia in DXF

eeschema_plot_dxf_png

Permette di creare un file di tracciatura in formato DXF. Il nome del file è il nome del foglio con estensione .dxf .

11.7. Traccia in HPGL

Questo comando permette di creare un file HPGL. Per questo formato è possibile impostare:

  • Dimensione pagina.

  • Origine.

  • Dimensione penna (in mm).

La finestra di dialogo di impostazione del plotter appare come questa:

eeschema_plot_hpgl_png

Il nome del file risultante avrà il nome del foglio più estensione .plt .

11.7.1. Selezione dimensione foglio

La dimensione del foglio normalmente viene controllata. In questo caso, verrà usata la dimensione del foglio definita nel menu del blocco del titolo e la scala scelta sarà di 1. Se viene selezionata una diversa dimensione del foglio (A4 con A0, o A con E), la scala viene automaticamente regolata per riempire la pagina.

11.7.2. Regolazioni di posizionamento

Per tutte le dimensioni standard, è possibile regolare la posizione per centrare il più possibile il disegno. Dato che i plotter hanno il punto di origine al centro o nell’angolo in basso a sinistra del foglio, è necessario poter introdurre uno spostamento in maniera tale da permettere una tracciatura regolare.

Parlando in generale:

  • Per plotter con il punto di origine al centro del foglio lo spostamento deve essere negativo e impostato a metà delle dimensioni del foglio.

  • Per plotter con punto di origine nell’angolo in basso a sinistra del foglio lo spostamento deve essere impostato a 0.

Per impostare uno spostamento:

  • Selezionare la dimensione del foglio.

  • Impostare lo spostamento X e Y.

  • Fare clic per accettare lo spostamento.

This command, available via the icon Print icon, allows you to visualize and generate design files for the standard printer.

finestra di dialogo stampa

L’opzione “Stampa squadratura e riquadro iscrizioni del foglio" abilita o disabilita la stampa di questi particolari.

L’opzione “Stampa in bianco e nero” imposta la stampante come monocromatica. Questa opzione è in genere necessaria se si usa una stampante laser in bianco e nero, dato che i colori vengono stampati come mezzi-toni e spesso non sono molto leggibili.

12. Symbol Editor

12.1. Informazioni generali sulle librerie di simboli

A symbol is a schematic element which contains a graphical representation, electrical connections, and text fields describing the symbol. Symbols used in a schematic are stored in symbol libraries. KiCad provides a symbol editing tool that allows you to create libraries, add, delete or transfer symbols between libraries, export symbols to files, and import symbols from files. The symbol editing tool provides a simple way to manage symbols and symbol libraries.

12.2. Panoramica delle librerie di simboli

Una libreria di simboli è composta da uno o più simboli. Generalmente i simboli sono raggruppati per funzione, tipo e/o produttore.

Un simbolo è composto di:

  • Graphical items (lines, circles, arcs, text, etc.) that determine how symbol looks in a schematic.

  • Pins which have both graphic properties (line, clock, inverted, low level active, etc.) and electrical properties (input, output, bidirectional, etc.) used by the Electrical Rules Check (ERC) tool.

  • Campi come riferimenti, valori, nomi impronte corrispondenti per la progettazione del circuito stampato, ecc.

Symbols can be derived from another symbol in the same library. Derived symbols share the base symbol’s graphical shape and pin definitions, but can override the base symbol’s property fields (value, footprint, footprint filters, datasheet, description, etc.). Derived symbols can be used to define symbols that are similar to a base part. For example, 74LS00, 74HC00, and 7437 symbols could all be derived from a 7400 symbol. In previous versions of KiCad, derived symbols were referred to as aliases.

La corretta progettazione di simboli richiede:

  • Specificare se il simbolo è formato da più di un’unità.

  • Defining if the symbol has an alternate body style (also known as a De Morgan representation).

  • La progettazione della sua rappresentazione simbolica usando linee, rettangoli, cerchi, poligoni e testo.

  • L’aggiunta di pin definendo con cura l’elemento grafico di ogni pin, il nome, il numero, e le sue proprietà elettriche (ingresso, uscita, tri-state, alimentazione, ecc.).

  • Determining if the symbol should be derived from another symbol with the same graphical design and pin definition.

  • L’aggiunta di campi opzionali come il nome dell’impronta usata dal software di progettazione di circuiti stampati e/o la definizione della loro visibilità.

  • La documentazione del simbolo aggiungendo una stringa di descrizione, collegamenti ai datasheet, ecc.

  • Il salvataggio nella libreria scelta.

12.3. Panoramica dell’editor dei simboli di libreria

Di seguito si può osservare la finestra principale dell’editor di librerie di simboli. Esso consiste in tre barre degli strumenti che servono a velocizzare l’accesso alle funzioni più comuni, e un’area di visualizzazione/modifica del simbolo. Sulle barre degli strumenti non sono disponibili tutti comandi, ma quelli che mancano sono comunque accessibili tramite i menu.

Symbol Editor main window

12.3.1. Barra strumenti principale

The main tool bar is located at the top of the main window. It consists of the undo/redo commands, zoom commands, symbol properties dialogs, and unit/representation management controls.

Symbol Editor toolbar

New symbol icon

Create a new symbol in the selected library.

Save icon

Save the currently selected library. All modified symbols in the library will be saved.

Undo icon

Undo last edit.

Redo icon

Redo last undo.

Refresh icon

Refresh display.

Zoom in icon

Zoom in.

Zoom out icon

Zoom out.

Zoom to fit page icon

Zoom to fit symbol in display.

Zoom to selection icon

Zoom to fit selection.

Rotate counterclockwise icon

Rotate counter-clockwise.

Rotate clockwise icon

Rotate clockwise.

Mirror horizontally icon

Mirror horizontally.

Mirror vertically icon

Mirror vertically.

Symbol properties icon

Edit the current symbol properties.

Pin table icon

Edit the symbol’s pins in a tablular interface.

Datasheet icon

Open the symbol’s datasheet. The button will be disabled if no datasheet is defined for the current symbol.

ERC icon

Test the current symbol for design errors.

Normal body style icon

Select the normal body style. The button is disabled if the current symbol does not have an alternate body style.

Alternate body style icon

Select the alternate body style. The button is disabled if the current symbol does not have an alternate body style.

Unit dropdown

Select the unit to display. The drop down control will be disabled if the current symbol is not derived from a symbol with multiple units.

Synchronized pin edit mode icon

Enable synchronized pins edit mode. When this mode is enabled, any pin modifications are propagated to all other symbol units. Pin number changes are not propagated. This mode is automatically enabled for symbols with multiple interchangable units and cannot be enabled for symbols with only one unit.

12.3.2. Barra strumenti elementi

The vertical toolbar located on the right hand side of the main window allows you to place all of the elements required to design a symbol.

Cursor icon

Select tool. Right-clicking with the select tool opens the context menu for the object under the cursor. Left-clicking with the select tool displays the attributes of the object under the cursor in the message panel at the bottom of the main window. Double-left-clicking with the select tool will open the properties dialog for the object under the cursor.

Pin icon

Pin tool. Left-click to add a new pin.

Text icon

Graphical text tool. Left-click to add a new graphical text item.

Add rectangle icon

Rectangle tool. Left-click to begin drawing the first corner of a graphical rectangle. Left-click again to place the opposite corner of the rectangle.

Add circle icon

Circle tool. Left-click to begin drawing a new graphical circle from the center. Left-click again to define the radius of the circle.

Add arc icon

Arc tool. Left-click to begin drawing a new graphical arc item from the first arc end point. Left-click again to define the second arc end point. Adjust the radius by dragging the arc center point.

Add line icon

Connected line tool. Left-click to begin drawing a new graphical line item in the current symbol. Left-click for each additional connected line. Double-left-click to complete the line.

Anchor icon

Anchor tool. Left-click to set the anchor position of the symbol.

Delete icon

Delete tool. Left-click to delete an object from the current symbol.

12.3.3. Barra opzioni

The vertical tool bar located on the left hand side of the main window allows you to set some of the editor drawing options.

Grid icon

Toggle grid visibility on and off.

Inch unit icon

Set units to inches.

Millimeter unit icon

Set units to mils (0.001 inch).

Millimeter unit icon

Set units to millimeters.

Cursor shape icon

Toggle full screen cursor on and off.

Show pintype icon

Toggle display of pin electrical types.

Symbol tree icon

Toggle display of libraries and symbols.

12.4. Selezione e manutenzione librerie

The selection of the current library is possible via the Symbol tree icon icon which shows you all available libraries and allows you to select one. When a symbol is loaded or saved, it will be put in this library. The library name of a symbol is the contents of its Value field.

12.4.1. Selezione e salvataggio di un simbolo

Selezione simboli

Clicking the Symbol tree icon icon on the left tool bar toggles the treeview of libraries and symbols. Clicking on a symbol opens that symbol.

Note
Some symbols are derived from other symbols. Derived symbol names are displayed in italics in the treeview. If a derived symbol is opened, its symbol graphics will not be editable. Its symbol fields will be editable as normal. To edit the graphics of a base symbol and all of its derived symbols, open the base symbol.
Salvare un simbolo

After modification, a symbol can be saved in the current library or a different library.

To save the modified symbol in the current library, click the Save icon icon. The modifications will be written to the existing symbol.

Note
Saving a modified symbol also saves all other modified symbols in the same library.

To save the symbol changes to a new symbol, click FileSave As…​. The symbol can be saved in the current library or a different library. A new name can be set for the symbol.

To create a new file containing only the current symbol, click FileExportSymbol…​. This file will be a standard library file which will contain only one symbol.

12.5. Creare simboli di libreria

12.5.1. Creare un nuovo simbolo

A new symbol can be created by clicking the New symbol icon icon. You will be asked for a number of symbol properties.

  • A symbol name (this name is used as the default value for the Value field in the schematic editor)

  • An optional base symbol to derive the new symbol from. The new symbol will use the base symbol’s graphical shape and pin configuration, but other symbol information can be modified in the derived symbol. The base symbol must be in the same library as the new derived symbol.

  • The reference designator prefix (U, C, R…​).

  • The number of units per package, and whether those units are interchangeable (for example a 7400 is made of 4 units per package).

  • If an alternate body style (sometimes referred to as a "De Morgan equivalent") is desired.

  • Whether the symbol is a power symbol. Power symbols appear in the "Add Power Port" dialog in the Schematic editor, their Value fields are not editable in the schematic, they cannot be assigned a footprint and they are not added to the PCB, and they are not included in the bill of materials.

  • Whether the symbol should be excluded from the bill of materials.

  • Whether the symbol should be excluded from the PCB.

There are also several graphical options.

  • The offset between the end of each pin and its pin name.

  • Whether the pin number and pin name should be displayed.

  • Whether the pin names should be displayed alongside the pins or at the ends of the pins inside the symbol body.

These properties can also be changed later in the Symbol Properties window.

New symbol properties

Un nuovo simbolo verrà creato usando le proprietà sopraesposte e apparirà nell’editor come mostrato sotto.

Newly created symbol

The blue cross in the center is the symbol anchor, which specifies the symbol origin i.e. the coordinates (0, 0). The anchor can be repositioned by selecting the Anchor icon icon and clicking on the new desired anchor position.

12.5.2. Creare un simbolo da un altro simbolo

Spesso, il simbolo che si vuole creare è simile ad un altro già presente in una libreria componenti. In questo caso risulta più facile caricare e modificare un simbolo esistente (N.d.T. piuttosto che ricrearne uno nuovo da zero).

  • Caricare il simbolo che verrà usato come punto di partenza.

  • Save a new copy of the symbol using FileSave As…​. The Save As dialog will prompt for a name for the new symbol and the library to save it in.

  • Modifica il nuovo simbolo come richiesto.

  • Save the modified symbol.

12.5.3. Proprietà del simbolo

Symbol properties are set when the symbol is created but they can be modified at any point. To change the symbol properties, click on the Symbol properties icon icon to show the dialog below.

Proprietà del simbolo

It is important to correctly set the number of units per package and the alternate symbolic representation, if enabled, because when pins are edited or created the corresponding pins for each unit will be affected. If you change the number of units per package after pin creation and editing, there will be additional work to specify the pins and graphics for the new unit. Nevertheless, it is possible to modify these properties at any time.

The graphic options "Show pin number" and "Show pin name" define the visibility of the pin number and pin name text. The option "Place pin names inside" defines the pin name position relative to the pin body. The pin names will be displayed inside the symbol outline if the option is checked. In this case the "Pin Name Position Offset" property defines the shift of the text away from the body end of the pin. A value from 0.02 to 0.05 inches is usually reasonable.

L’esempio sottostante mostra un simbolo con l’opzione ``Nome piedino interno'' non selezionata. Si noti la posizione dei nomi e dei numeri di pin.

Place pin name inside unchecked
Symbol Name, Description, and Keywords

The symbol’s name is the same as the Value field. When the symbol name is changed the value also changes, and vice versa. The symbol’s name in the library also changes accordingly.

The symbol description should contain a brief description of the component, such as the component function, distinguishing features, and package options. The keywords should contain additional terms related to the component. Keywords are used primarily to assist in searching for the symbol.

Searching for a symbol in the add a symbol dialog

A symbol’s name, description, and keywords are all used when searching for symbols in the Symbol Editor and Add a Symbol dialog. The description and keywords are displayed in the Symbol Library Browser and Add a Symbol dialog.

Footprint Filters

The footprint filters tab is used to define which footprints are appropriate to use with the symbol. The filters can be applied in the Footprint Assignment tool so that only appropriate footprints are displayed for each symbol.

Multiple footprint filters can be defined. Footprints that match any of the filters will be displayed; if no filters are defined, then all footprints will be displayed.

Filters can use wildcards: * matches any number of characters, including zero, and ? matches zero or one characters. For example, SOIC-* would match the SOIC-8_3.9x4.9mm_P1.27mm footprint as well as any other footprint beginning with SOIC-. The filter SOT?23 matches SOT23 as well as SOT-23.

Footprint filters

12.5.4. Definizione piedini per simboli multipli e rappresentazioni simboliche alternative

If the symbol has an alternate body style defined, one body style must be selected for editing at a time. To edit the normal representation, click the Normal representation icon icon.

To edit the alternate representation, click on the Alternate representation icon icon. Use the images/toolbar_libedit_part.png dropdown shown below to select the unit you wish to edit.

Selecting a symbol unit

12.6. Elementi grafici

Graphical elements create the visual representation of a symbol and contain no electrical connection information. Graphical elements are created with the following tools:

  • Linee e poligoni definiti da punti di inizio e fine.

  • Rettangoli definiti da due angoli diagonali.

  • Cerchi definiti da centro e raggio.

  • Archi definiti da punti di inizio e fine dell’arco ed il suo centro. Un arco va da 0° a 180°.

La barra strumenti verticale sul lato destro della finestra principale permette di piazzare tutti gli elementi grafici richiesti per progettare la rappresentazione di un simbolo.

12.6.1. Appartenenza di elementi grafici

Ogni elemento grafico (linea, arco, cerchio, ecc.) può essere definito come comune a tutte le unità e/o stili di corpi o specifico di una data unità e/o stile corpo. Le opzioni dell’elemento sono accessibili facilmente facendo clic destro sull’elemento per mostrare il menu contestuale per l’elemento selezionato. Di seguito è mostrato il menu contestuale per un elemento linea.

Graphic line context menu

Si può anche fare doppio clic sinistro su un elemento per modificare le sue proprietà. Di seguito viene mostrata la finestra di dialogo delle proprietà di un elemento poligono.

Graphic line properties

Le proprietà di un elemento grafico sono:

  • "Line width" defines the width of the element’s line in the current drawing units.

  • "Fill Style" determines if the shape defined by the graphical element is to be drawn unfilled, background filled, or foreground filled.

  • "Common to all units in symbol" determines if the graphical element is drawn for each unit in symbol with more than one unit per package or if the graphical element is only drawn for the current unit.

  • "Common to all body styles (De Morgan)" determines if the graphical element is drawn for each symbolic representation in symbols with an alternate body style or if the graphical element is only drawn for the current body style.

12.6.2. Elementi di testo grafico

The Text icon icon allows for the creation of graphical text. Graphical text is automatically oriented to be readable, even when the symbol is mirrored. Please note that graphical text items are not the same as symbol fields.

12.7. Unità multiple per simbolo e stili di corpo alternativi

Symbols can have up to two body styles (a standard symbol and an alternate symbol often referred to as a "De Morgan equivalent") and/or have more than one unit per package (logic gates for example). Some symbols can have more than one unit per package each with different symbols and pin configurations.

Consider for instance a relay with two switches, which can be designed as a symbol with three different units: a coil, switch 1, and switch 2. Designing a symbol with multiple units per package and/or alternate body styles is very flexible. A pin or a body symbol item can be common to all units or specific to a given unit or they can be common to both symbolic representation so are specific to a given symbol representation.

By default, pins are specific to a unit and body style. When a pin is common to all units or all body styles, it only needs to be created once. This is also the case for the body style graphic shapes and text, which may be common to each unit, but typically are specific to each body style).

12.7.1. Example of a Symbol With Multiple Noninterchangeable Units

For an example of a symbol with multiple units that are not interchangeable, consider a relay with 3 units per package: a coil, switch 1, and switch 2.

The three units are not all the same, so "All units are interchangeable" should be deselected in the Symbol Properties dialog. Alternatively, this option could have been specified when the symbol was initially created.

Uncheck all units are interchangeable
Unit A
Relay unit A
Unit B
Relay unit B
Unit C
Relay unit C

Unit A does not have the same symbol and pin layout as Units B and C, so the units are not interchangeable.

Note
"Synchronized Pins Edit Mode" can be enabled by clicking the Synchronized pins edit mode icon icon. In this mode, pin modifications are propagated between symbol units; changes made in one unit will be reflected in the other units as well. When this mode is disabled, pin changes made in one unit do not affect other units. This mode is enabled automatically when "All units are interchangeable" is checked, but it can be disabled. The mode cannot be enabled when "All units are interchangeable" is unchecked or when the symbol only has one unit.
Elementi simbolici grafici

Shown below are properties for a graphic body element. In the relay example above, the three units have different symbolic representations. Therefore, each unit was created separately and the graphical body elements have the "Common to all units in symbol" setting disabled.

Disable common to all units in symbol

12.8. Creazione e modifica di piedini

You can click on the Pin icon icon to create and insert a pin. The editing of all pin properties is done by double-clicking on the pin or right-clicking on the pin to open the pin context menu. Pins must be created carefully, because any error will have consequences on the PCB design. Any pin already placed can be edited, deleted, and/or moved.

12.8.1. Panoramica piedino

A pin is defined by its graphical representation, its name and its number. The pin’s name and number can contain letters, numbers, and symbols, but not spaces. For the Electrical Rules Check (ERC) tool to be useful, the pin’s electrical type (input, output, tri-state…​) must also be defined correctly. If this type is not defined properly, the schematic ERC check results may be invalid.

Note importanti:

  • Symbol pins are matched to footprint pads by number. The pin number in the symbol must match the corresponding pad number in the footprint.

  • Do not use spaces in pin names and numbers. Spaces will be automatically replaced with underscores (_).

  • To define a pin name with an inverted signal (overline) use the ~ (tilde) character followed by the text to invert in braces. For example ~{FO}O would display FO O.

  • If the pin name is empty, the pin is considered unnamed.

  • Pin names can be repeated in a symbol.

  • Pin numbers must be unique in a symbol.

12.8.2. Proprietà piedino

Pin properties

La finestra di dialogo delle proprietà del pin permette di modificare tutte le caratteristiche di un pin. Questa finestra di dialogo salta fuori automaticamente quando si crea un pin o facendo doppio clic su un pin già esistente. Questa finestra di dialogo permette di modificare:

  • The pin name and text size.

  • The pin number and text size.

  • The pin length.

  • The pin electrical type and graphical style.

  • Unità e appartenenza a rappresentazioni alternative.

  • Pin visibility.

  • Alternate pin definitions.

12.8.3. Pin Graphic Styles

Shown in the figure below are the different pin graphic styles. The choice of graphic style does not have any influence on the pin’s electrical type.

Pin graphic styles

12.8.4. Tipi elettrici del pin

Choosing the correct electrical type is important for the schematic ERC tool. ERC will check that pins are connected appropriately, for example ensuring that input pins are driven and power inputs receive power from an appropriate source.

Pin Type

Description

Input

A pin which is exclusively an input.

Output

A pin which is exclusively an output.

Bidirectional

A pin that can be either an input or an output, such as a microcontroller data bus pin.

Tri-state

A three state output pin (high, low, or high impedance)

Passive

A passive symbol pin: resistors, connectors, etc.

Free

A pin that can be freely connected to any other pin without electrical concerns.

Unspecified

A pin for which the ERC check does not matter.

Power input

A symbol’s power pin. As a special case, power input pins that are marked invisible are automatically connected to the net with the same name. See the Power Ports section for more information.

Power output

A pin that provides power to other pins, such as a regulator output.

Open collector

An open collector logic output.

Open emitter

An open emitter logic output.

Unconnected

A pin that should not be connected to anything.

12.8.5. Pushing Pin Properties to Other Pins

You can apply the length, name size, or number size of a pin to the other pins in the symbol by right clicking the pin and selecting Push Pin Length, Push Pin Name Size, or Push Pin Number Size, respectively.

Pin context menu

12.8.6. Definizione piedini per componenti multipli e rappresentazioni simboliche alternative

Symbols with multiple units and/or graphical representations are particularly problematic when creating and editing pins. The majority of pins are specific to each symbol unit (because each unit has a different set of pins) and to each body style (because the form and position is different between the normal body style and the alternate form).

The symbol library editor allows the simultaneous creation of pins. By default, changes made to a pin are made for all units of a multiple unit symbol and to both representations for symbols with an alternate symbolic representation. The only exception to this is the pin’s graphical type and name, which remain unlinked between symbol units and body styles. This dependency was established to allow for easier pin creation and editing in most cases. This dependency can be disabled by toggling the Synchronized pin edit mode icon icon on the main tool bar. This will allow you to create pins for each unit and representation completely independently.

Pins can be common or specific to different units. Pins can also be common to both symbolic representations or specific to each symbolic representation. When a pin is common to all units, it only has to drawn once. Pins are set as common or specific in the pin properties dialog.

An example is the output pin in the 7400 quad dual input NAND gate. Since there are four units and two symbolic representations, there are eight separate output pins defined in the symbol definition. When creating a new 7400 symbol, unit A of the normal symbolic representation will be shown in the library editor. To edit the pin style in the alternate symbolic representation, it must first be enabled by clicking the Alternate representation icon button on the tool bar. To edit the pin number for each unit, select the appropriate unit using the images/toolbar_libedit_alias.png drop down control.

12.8.7. Pin Table

Another way to edit pins is to use the Pin Table, which is accessible via the Pin table icon icon. The Pin Table displays all of the pins in the symbol and their properties in a table view, so it is useful for making bulk pin changes.

Any pin property can be edited by clicking on the appropriate cell. Pins can be added and removed with the Plus icon and Trash icon icons, respectively.

Note
Columns of the pin table can be shown or hidden by right-clicking on the header row and checking or unchecking additional columns. Some columns are hidden by default.

The screenshot below shows the pin table for a quad opamp.

Pin table

12.8.8. Alternate Pin Definitions

Pins can have alternate pin definitions added to them. Alternate pin definitions allow a user to select a different name, electrical type, and graphical style for a pin when the symbol has been placed in the schematic. This can be used for pins that have multiple functions, such as microcontroller pins.

Alternate pin definitions are added in the Pin Properties dialog as shown below. Each alternate definition contains a pin name, electrical type, and graphic style. This microcontroller pin has all of its peripheral functions defined in the symbol as alternate pin names.

Alternate pin definitions

Alternate pin definitions are selected in the Schematic Editor once the symbol has been placed in the schematic. The alternate pin is assigned in the Alternate Pin Assignments tab of the Symbol Properties dialog. Alternate definitions are selectable in the dropdown in the Alternate Assignment column.

Selecting an alternate pin definition

12.9. Campi del simbolo

All library symbols are defined with four default fields. The reference designator, value, footprint assignment, and datasheet link fields are created whenever a symbol is created or copied. Only the reference designator and value fields are required.

Symbols defined in libraries are typically defined with only these four default fields. Additional fields such as vendor, part number, unit cost, etc. can be added to library symbols but generally this is done in the schematic editor so the additional fields can be applied to all of the symbols in the schematic.

Note
A convenient way to create additional empty symbol fields is to use define field name templates. Field name templates define empty fields that are added to each symbol when it is inserted into the schematic. Field name templates can be defined globally (for all schematics) in the Schematic Editor Preferences, or they can be defined locally (specific to each project) in the Schematic Setup dialog.

12.9.1. Modifica campi del simbolo

Per modificare un campo simbolo esistente, fare clic destro sul testo del campo per mostrare il menu contestuale mostrato sotto.

Symbol field context menu

To add new fields, delete optional fields, or edit existing fields, use the Component properties icon icon on the main tool bar to open the Symbol Properties dialog.

Fields are text information associated a the symbol. Do not confuse them with text in the graphic representation of a symbol.

Note importanti:

  • Modifying the Value field changes the name of the symbol. The symbol’s name in the library will change when the symbol is saved.

  • The Symbol Properties dialog must be used to edit a field that is empty or has the invisible attribute enabled because such fields cannot be clicked on.

  • The footprint is defined as an absolute footprint using the LIBNAME:FOOTPRINTNAME format where LIBNAME is the name of the footprint library defined in the footprint library table (see the "Footprint Library Table" section in the PCB Editor manual) and FOOTPRINTNAME is the name of the footprint in the library LIBNAME.

12.10. Power Ports

Power ports, or power symbols, are conventionally used to label a wire as part of a power net, like VCC, +5V, or GND. In the schematic below, the +3.3V and GND symbols are power ports. In addition to acting as a visual indicator that a net is a power rail, a power port will determine the name of the net it is attached to. This is true even if there is another net label attached to the net; the net name determined by the power symbol overrides any other net names.

Power port example

It may be useful to place power symbols in a dedicated library. KiCad’s symbol library places power symbols in the power library, and users may create libraries to store their own power symbols. If the "Define as power symbol" box is checked in a symbol’s properties, that symbol will appear in the Schematic Editor’s "Add Power Port" dialog for convenient access.

Power symbols are handled and created the same way as normal symbols, but there are several additional considerations described below. They consist of a graphical symbol and a pin of the type "Power input" that is marked hidden.

Below is an example of a GND power symbol.

Editing a power symbol

12.10.1. Creating a Power Port Symbol

Power Port symbols consist of a pin of type "Power input" that is marked invisible. Invisible power input pins have a special property of automatically connecting to a net with the same name as the pin name. A net that is wired to an invisible power input pin will therefore be named after the pin, even if there are other net labels on the net. This connection is global.

Note
If the power symbol has the "Define as power symbol" property checked, the power input pin does not need to be marked invisible. However, the convention is to make these pins invisible anyway.
Power symbol pin

Per creare un simbolo di alimentazione, seguire questi passi:

  • Add a pin of type "Power input", with "Visible" unchecked, and the pin named according to the desired net. Make the pin number 1, the length 0, and set the graphic style to "Line". The pin name establishes the connection to the net; in this case the pin will automatically connect to the net GND. The pin number, length, and line style do not matter electrically.

  • Place the pin on the symbol anchor.

  • Use the shape tools to draw the symbol graphics.

  • Set the symbol value. The symbol value does not matter electrically, but it is displayed in the schematic. To eliminate confusion, it should match the pin name (which determines the connected net name).

  • Check the "Define as power symbol" box in Symbol Properties window. This makes the symbol appear in the "Add Power Port" dialog, makes the Value field read-only in the schematic, prevents the symbol from being assigned a footprint, and excludes the symbol from the board, BOM, and netlists.

  • Set the symbol reference and uncheck the "Show" box. The reference text is not important except for the first character, which should be #. For the power port shown above, the reference could be #GND. Symbols with references that begin with # are not added to the PCB, are not included in Bill of Materials exports or netlists, and they cannot be assigned a footprint in the footprint assignment tool. If a power port’s reference does not begin with #, the character will be inserted automatically when the annotation or footprint assignment tools are run.

An easier method to create a new power port symbol is to use another symbol as a starting point, as described earlier.

Note
When modifying an existing power port symbol, make sure to rename the pin name so that the new symbol connects to the appropriate power net.

13. Esploratore libreria di simboli

13.1. Introduzione

The Symbol Library Browser allows you to quickly examine the content of symbol libraries. The Symbol Library Viewer can be accessed by clicking Library viewer icon icon on the main toolbar, ViewSymbol Library Browser…​, or clicking Select With Browser in the "Choose Symbol" window.

eeschema_viewlib_choose_png

13.2. Viewlib - schermo principale

eeschema_viewlib_select_library_png

Per esaminare i contenuti della libreria, selezionare la libreria desiderata dall’elenco sul lato sinistro. I simboli disponibili appariranno nel secondo pannello. Selezionare il nome di un simbolo per visualizzarlo.

eeschema_viewlib_select_component_png

13.3. Barra alta dell’esploratore delle librerie di simboli

La barra in alto dell’esploratore di librerie di simboli viene mostrata di seguito.

images/it/toolbar_viewlib.png

I comandi disponibili sono:

Symbol selection icon

Selection of the symbol which can be also selected in the displayed list.

Previous symbol icon

Display previous symbol.

Next symbol icon

Display next symbol.

refresh 24 zoom in 24 zoom out 24 zoom fit in page 24

Zoom tools.

morgan1 24 morgan2 24

Selection of the representation (normal or alternate) if an alternate representation exists.

images/toolbar_viewlib_part.png

Selection of the unit for symbols that contain multiple units.

icons/datasheet_png

If they exist, display the associated documents.

Add symbol to schematic icon

Close the browser and place the selected symbol in the schematic.

14. Creazione di netlist personalizzate e distinte materiali

14.1. File di netlist intermedio

BOM files and netlist files can be converted from an Intermediate netlist file created by KiCad.

Questo file usa la sintassi XML e si chiama netlist intermedia. La netlist intermedia include una grande quantità di dati sulla scheda e perciò, può essere usata tramite elaborazione successiva per generare distinte materiali o altri rapporti.

A seconda del risultato (distinta materiali o netlist), differenti sottoinsiemi dell’intero file di netlist intermedia saranno usati nella post-elaborazione.

14.1.1. Campione di schema

Campione di schema

14.1.2. Campione di file di netlist intermedia

La corrispondente netlist intermedia (sintassi XML) del circuito precedente viene mostrata di seguito.

<?xml version="1.0" encoding="utf-8"?>
<export version="D">
  <design>
    <source>F:\kicad_aux\netlist_test\netlist_test.sch</source>
    <date>29/08/2010 20:35:21</date>
    <tool>eeschema (2010-08-28 BZR 2458)-unstable</tool>
  </design>
  <components>
    <comp ref="P1">
      <value>CONN_4</value>
      <libsource lib="conn" part="CONN_4"/>
      <sheetpath names="/" tstamps="/"/>
      <tstamp>4C6E2141</tstamp>
    </comp>
    <comp ref="U2">
      <value>74LS74</value>
      <libsource lib="74xx" part="74LS74"/>
      <sheetpath names="/" tstamps="/"/>
      <tstamp>4C6E20BA</tstamp>
    </comp>
    <comp ref="U1">
      <value>74LS04</value>
      <libsource lib="74xx" part="74LS04"/>
      <sheetpath names="/" tstamps="/"/>
      <tstamp>4C6E20A6</tstamp>
    </comp>
    <comp ref="C1">
      <value>CP</value>
      <libsource lib="device" part="CP"/>
      <sheetpath names="/" tstamps="/"/>
      <tstamp>4C6E2094</tstamp>
    </comp>
    <comp ref="R1">
      <value>R</value>
      <libsource lib="device" part="R"/>
      <sheetpath names="/" tstamps="/"/>
      <tstamp>4C6E208A</tstamp>
    </comp>
  </components>
  <libparts>
    <libpart lib="device" part="C">
      <description>Condensateur non polarise</description>
      <footprints>
        <fp>SM*</fp>
        <fp>C?</fp>
        <fp>C1-1</fp>
      </footprints>
      <fields>
        <field name="Reference">C</field>
        <field name="Value">C</field>
      </fields>
      <pins>
        <pin num="1" name="~" type="passive"/>
        <pin num="2" name="~" type="passive"/>
      </pins>
    </libpart>
    <libpart lib="device" part="R">
      <description>Resistance</description>
      <footprints>
        <fp>R?</fp>
        <fp>SM0603</fp>
        <fp>SM0805</fp>
        <fp>R?-*</fp>
        <fp>SM1206</fp>
      </footprints>
      <fields>
        <field name="Reference">R</field>
        <field name="Value">R</field>
      </fields>
      <pins>
        <pin num="1" name="~" type="passive"/>
        <pin num="2" name="~" type="passive"/>
      </pins>
    </libpart>
    <libpart lib="conn" part="CONN_4">
      <description>Symbole general de connecteur</description>
      <fields>
        <field name="Reference">P</field>
        <field name="Value">CONN_4</field>
      </fields>
      <pins>
        <pin num="1" name="P1" type="passive"/>
        <pin num="2" name="P2" type="passive"/>
        <pin num="3" name="P3" type="passive"/>
        <pin num="4" name="P4" type="passive"/>
      </pins>
    </libpart>
    <libpart lib="74xx" part="74LS04">
      <description>Hex Inverseur</description>
      <fields>
        <field name="Reference">U</field>
        <field name="Value">74LS04</field>
      </fields>
      <pins>
        <pin num="1" name="~" type="input"/>
        <pin num="2" name="~" type="output"/>
        <pin num="3" name="~" type="input"/>
        <pin num="4" name="~" type="output"/>
        <pin num="5" name="~" type="input"/>
        <pin num="6" name="~" type="output"/>
        <pin num="7" name="GND" type="power_in"/>
        <pin num="8" name="~" type="output"/>
        <pin num="9" name="~" type="input"/>
        <pin num="10" name="~" type="output"/>
        <pin num="11" name="~" type="input"/>
        <pin num="12" name="~" type="output"/>
        <pin num="13" name="~" type="input"/>
        <pin num="14" name="VCC" type="power_in"/>
      </pins>
    </libpart>
    <libpart lib="74xx" part="74LS74">
      <description>Dual D FlipFlop, Set &amp; Reset</description>
      <docs>74xx/74hc_hct74.pdf</docs>
      <fields>
        <field name="Reference">U</field>
        <field name="Value">74LS74</field>
      </fields>
      <pins>
        <pin num="1" name="Cd" type="input"/>
        <pin num="2" name="D" type="input"/>
        <pin num="3" name="Cp" type="input"/>
        <pin num="4" name="Sd" type="input"/>
        <pin num="5" name="Q" type="output"/>
        <pin num="6" name="~Q" type="output"/>
        <pin num="7" name="GND" type="power_in"/>
        <pin num="8" name="~Q" type="output"/>
        <pin num="9" name="Q" type="output"/>
        <pin num="10" name="Sd" type="input"/>
        <pin num="11" name="Cp" type="input"/>
        <pin num="12" name="D" type="input"/>
        <pin num="13" name="Cd" type="input"/>
        <pin num="14" name="VCC" type="power_in"/>
      </pins>
    </libpart>
  </libparts>
  <libraries>
    <library logical="device">
      <uri>F:\kicad\share\library\device.lib</uri>
    </library>
    <library logical="conn">
      <uri>F:\kicad\share\library\conn.lib</uri>
    </library>
    <library logical="74xx">
      <uri>F:\kicad\share\library\74xx.lib</uri>
    </library>
  </libraries>
  <nets>
    <net code="1" name="GND">
      <node ref="U1" pin="7"/>
      <node ref="C1" pin="2"/>
      <node ref="U2" pin="7"/>
      <node ref="P1" pin="4"/>
    </net>
    <net code="2" name="VCC">
      <node ref="R1" pin="1"/>
      <node ref="U1" pin="14"/>
      <node ref="U2" pin="4"/>
      <node ref="U2" pin="1"/>
      <node ref="U2" pin="14"/>
      <node ref="P1" pin="1"/>
    </net>
    <net code="3" name="">
      <node ref="U2" pin="6"/>
    </net>
    <net code="4" name="">
      <node ref="U1" pin="2"/>
      <node ref="U2" pin="3"/>
    </net>
    <net code="5" name="/SIG_OUT">
      <node ref="P1" pin="2"/>
      <node ref="U2" pin="5"/>
      <node ref="U2" pin="2"/>
    </net>
    <net code="6" name="/CLOCK_IN">
      <node ref="R1" pin="2"/>
      <node ref="C1" pin="1"/>
      <node ref="U1" pin="1"/>
      <node ref="P1" pin="3"/>
    </net>
  </nets>
</export>

14.2. Conversione in un nuovo formato di netlist

Applicando un filtro di post-elaborazione al file di netlist intermedia è possibile generare file di netlist per altre applicazioni o file di distinta materiali. Dato che questa conversione è in effetti una trasformazione da un formato testo ad un altro, si può scrivere questo filtro di post-elaborazione usando Python, XSLT, o qualsiasi altro strumento in grado di ricevere in ingresso dati XML.

XSLT itself is an XML language very suitable for XML transformations. There is a free program called xsltproc that you can download and install. The xsltproc program can be used to read the Intermediate XML netlist input file, apply a style-sheet to transform the input, and save the results in an output file. Use of xsltproc requires a style-sheet file using XSLT conventions. The full conversion process is handled by KiCad, after it is configured once to run xsltproc in a specific way.

14.3. Approccio XSLT

Il documento che descrive le trasformazioni XSL (XSLT) è qui disponibile:

14.3.1. Creare un file netlist Pads-Pcb

Il formato pads-pcb comprende due sezioni.

  • L’elenco impronte.

  • La netslist: raggruppando riferimenti a piazzole per collegamenti.

Di seguito c’è un foglio di stile che converte il file di netlist intermedio in formato netlist pads-pcb:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!--XSL style sheet to Eeschema Generic Netlist Format to PADS netlist format
    Copyright (C) 2010, SoftPLC Corporation.
    GPL v2.

    How to use:
        https://lists.launchpad.net/kicad-developers/msg05157.html
-->

<!DOCTYPE xsl:stylesheet [
  <!ENTITY nl  "&#xd;&#xa;"> <!--new line CR, LF -->
]>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" omit-xml-declaration="yes" indent="no"/>

<xsl:template match="/export">
    <xsl:text>*PADS-PCB*&nl;*PART*&nl;</xsl:text>
    <xsl:apply-templates select="components/comp"/>
    <xsl:text>&nl;*NET*&nl;</xsl:text>
    <xsl:apply-templates select="nets/net"/>
    <xsl:text>*END*&nl;</xsl:text>
</xsl:template>

<!-- for each component -->
<xsl:template match="comp">
    <xsl:text> </xsl:text>
    <xsl:value-of select="@ref"/>
    <xsl:text> </xsl:text>
    <xsl:choose>
        <xsl:when test = "footprint != '' ">
            <xsl:apply-templates select="footprint"/>
        </xsl:when>
        <xsl:otherwise>
            <xsl:text>unknown</xsl:text>
        </xsl:otherwise>
    </xsl:choose>
    <xsl:text>&nl;</xsl:text>
</xsl:template>

<!-- for each net -->
<xsl:template match="net">
    <!-- nets are output only if there is more than one pin in net -->
    <xsl:if test="count(node)>1">
        <xsl:text>*SIGNAL* </xsl:text>
        <xsl:choose>
            <xsl:when test = "@name != '' ">
                <xsl:value-of select="@name"/>
            </xsl:when>
            <xsl:otherwise>
                <xsl:text>N-</xsl:text>
                <xsl:value-of select="@code"/>
            </xsl:otherwise>
        </xsl:choose>
        <xsl:text>&nl;</xsl:text>
        <xsl:apply-templates select="node"/>
    </xsl:if>
</xsl:template>

<!-- for each node -->
<xsl:template match="node">
    <xsl:text> </xsl:text>
    <xsl:value-of select="@ref"/>
    <xsl:text>.</xsl:text>
    <xsl:value-of select="@pin"/>
    <xsl:text>&nl;</xsl:text>
</xsl:template>

</xsl:stylesheet>

Ed ecco il file pads-pcb in uscita dopo l’esecuzione di xsltproc:

*PADS-PCB*
*PART*
P1 unknown
U2 unknown
U1 unknown
C1 unknown
R1 unknown
*NET*
*SIGNAL* GND
U1.7
C1.2
U2.7
P1.4
*SIGNAL* VCC
R1.1
U1.14
U2.4
U2.1
U2.14
P1.1
*SIGNAL* N-4
U1.2
U2.3
*SIGNAL* /SIG_OUT
P1.2
U2.5
U2.2
*SIGNAL* /CLOCK_IN
R1.2
C1.1
U1.1
P1.3

*END*

La riga di comando per effettuare questa conversione è:

kicad\\bin\\xsltproc.exe -o test.net kicad\\bin\\plugins\\netlist_form_pads-pcb.xsl test.tmp

14.3.2. Creazione di un file netlist Cadstar

Il formato Cadstar è formato da due sezioni.

  • L’elenco impronte.

  • La netslist: raggruppando riferimenti a piazzole per collegamenti.

Ecco il file del foglio di stile per effettuare questa specifica conversione:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!--XSL style sheet to Eeschema Generic Netlist Format to CADSTAR netlist format
    Copyright (C) 2010, Jean-Pierre Charras.
    Copyright (C) 2010, SoftPLC Corporation.
    GPL v2.

<!DOCTYPE xsl:stylesheet [
  <!ENTITY nl  "&#xd;&#xa;"> <!--new line CR, LF -->
]>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" omit-xml-declaration="yes" indent="no"/>

<!-- Netlist header -->
<xsl:template match="/export">
    <xsl:text>.HEA&nl;</xsl:text>
    <xsl:apply-templates select="design/date"/>  <!-- Generate line .TIM <time> -->
    <xsl:apply-templates select="design/tool"/>  <!-- Generate line .APP <eeschema version> -->
    <xsl:apply-templates select="components/comp"/>  <!-- Generate list of components -->
    <xsl:text>&nl;&nl;</xsl:text>
    <xsl:apply-templates select="nets/net"/>          <!-- Generate list of nets and connections -->
    <xsl:text>&nl;.END&nl;</xsl:text>
</xsl:template>

 <!-- Generate line .TIM 20/08/2010 10:45:33 -->
<xsl:template match="tool">
    <xsl:text>.APP "</xsl:text>
    <xsl:apply-templates/>
    <xsl:text>"&nl;</xsl:text>
</xsl:template>

 <!-- Generate line .APP "eeschema (2010-08-17 BZR 2450)-unstable" -->
<xsl:template match="date">
    <xsl:text>.TIM </xsl:text>
    <xsl:apply-templates/>
    <xsl:text>&nl;</xsl:text>
</xsl:template>

<!-- for each component -->
<xsl:template match="comp">
    <xsl:text>.ADD_COM </xsl:text>
    <xsl:value-of select="@ref"/>
    <xsl:text> </xsl:text>
    <xsl:choose>
        <xsl:when test = "value != '' ">
            <xsl:text>"</xsl:text> <xsl:apply-templates select="value"/> <xsl:text>"</xsl:text>
        </xsl:when>
        <xsl:otherwise>
            <xsl:text>""</xsl:text>
        </xsl:otherwise>
    </xsl:choose>
    <xsl:text>&nl;</xsl:text>
</xsl:template>

<!-- for each net -->
<xsl:template match="net">
    <!-- nets are output only if there is more than one pin in net -->
    <xsl:if test="count(node)>1">
    <xsl:variable name="netname">
        <xsl:text>"</xsl:text>
        <xsl:choose>
            <xsl:when test = "@name != '' ">
                <xsl:value-of select="@name"/>
            </xsl:when>
            <xsl:otherwise>
                <xsl:text>N-</xsl:text>
                <xsl:value-of select="@code"/>
        </xsl:otherwise>
        </xsl:choose>
        <xsl:text>"&nl;</xsl:text>
        </xsl:variable>
        <xsl:apply-templates select="node" mode="first"/>
        <xsl:value-of select="$netname"/>
        <xsl:apply-templates select="node" mode="others"/>
    </xsl:if>
</xsl:template>

<!-- for each node -->
<xsl:template match="node" mode="first">
    <xsl:if test="position()=1">
       <xsl:text>.ADD_TER </xsl:text>
    <xsl:value-of select="@ref"/>
    <xsl:text>.</xsl:text>
    <xsl:value-of select="@pin"/>
    <xsl:text> </xsl:text>
    </xsl:if>
</xsl:template>

<xsl:template match="node" mode="others">
    <xsl:choose>
        <xsl:when test='position()=1'>
        </xsl:when>
        <xsl:when test='position()=2'>
           <xsl:text>.TER     </xsl:text>
        </xsl:when>
        <xsl:otherwise>
           <xsl:text>         </xsl:text>
        </xsl:otherwise>
    </xsl:choose>
    <xsl:if test="position()>1">
        <xsl:value-of select="@ref"/>
        <xsl:text>.</xsl:text>
        <xsl:value-of select="@pin"/>
        <xsl:text>&nl;</xsl:text>
    </xsl:if>
</xsl:template>

</xsl:stylesheet>

Ecco il file Cadstar in uscita.

.HEA
.TIM 21/08/2010 08:12:08
.APP "eeschema (2010-08-09 BZR 2439)-unstable"
.ADD_COM P1 "CONN_4"
.ADD_COM U2 "74LS74"
.ADD_COM U1 "74LS04"
.ADD_COM C1 "CP"
.ADD_COM R1 "R"


.ADD_TER U1.7 "GND"
.TER     C1.2
         U2.7
         P1.4
.ADD_TER R1.1 "VCC"
.TER     U1.14
         U2.4
         U2.1
         U2.14
         P1.1
.ADD_TER U1.2 "N-4"
.TER     U2.3
.ADD_TER P1.2 "/SIG_OUT"
.TER     U2.5
         U2.2
.ADD_TER R1.2 "/CLOCK_IN"
.TER     C1.1
         U1.1
         P1.3

.END

14.3.3. Creazione di un file netlist OrcadPCB2

Questo formato ha solo una sezione che consiste nell’elenco impronte. Ogni impronta include il suo elenco di piazzole con un riferimento alla corrispondente connessione.

Ecco il foglio di stile per questa specifica conversione:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!--XSL style sheet to Eeschema Generic Netlist Format to CADSTAR netlist format
    Copyright (C) 2010, SoftPLC Corporation.
    GPL v2.

    How to use:
        https://lists.launchpad.net/kicad-developers/msg05157.html
-->

<!DOCTYPE xsl:stylesheet [
  <!ENTITY nl  "&#xd;&#xa;"> <!--new line CR, LF -->
]>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" omit-xml-declaration="yes" indent="no"/>

<!--
    Netlist header
    Creates the entire netlist
    (can be seen as equivalent to main function in C
-->
<xsl:template match="/export">
    <xsl:text>( { Eeschema Netlist Version 1.1  </xsl:text>
    <!-- Generate line .TIM <time> -->
<xsl:apply-templates select="design/date"/>
<!-- Generate line eeschema version ... -->
<xsl:apply-templates select="design/tool"/>
<xsl:text>}&nl;</xsl:text>

<!-- Generate the list of components -->
<xsl:apply-templates select="components/comp"/>  <!-- Generate list of components -->

<!-- end of file -->
<xsl:text>)&nl;*&nl;</xsl:text>
</xsl:template>

<!--
    Generate id in header like "eeschema (2010-08-17 BZR 2450)-unstable"
-->
<xsl:template match="tool">
    <xsl:apply-templates/>
</xsl:template>

<!--
    Generate date in header like "20/08/2010 10:45:33"
-->
<xsl:template match="date">
    <xsl:apply-templates/>
    <xsl:text>&nl;</xsl:text>
</xsl:template>

<!--
    This template read each component
    (path = /export/components/comp)
    creates lines:
     ( 3EBF7DBD $noname U1 74LS125
      ... pin list ...
      )
    and calls "create_pin_list" template to build the pin list
-->
<xsl:template match="comp">
    <xsl:text> ( </xsl:text>
    <xsl:choose>
        <xsl:when test = "tstamp != '' ">
            <xsl:apply-templates select="tstamp"/>
        </xsl:when>
        <xsl:otherwise>
            <xsl:text>00000000</xsl:text>
        </xsl:otherwise>
    </xsl:choose>
    <xsl:text> </xsl:text>
    <xsl:choose>
        <xsl:when test = "footprint != '' ">
            <xsl:apply-templates select="footprint"/>
        </xsl:when>
        <xsl:otherwise>
            <xsl:text>$noname</xsl:text>
        </xsl:otherwise>
    </xsl:choose>
    <xsl:text> </xsl:text>
    <xsl:value-of select="@ref"/>
    <xsl:text> </xsl:text>
    <xsl:choose>
        <xsl:when test = "value != '' ">
            <xsl:apply-templates select="value"/>
        </xsl:when>
        <xsl:otherwise>
            <xsl:text>"~"</xsl:text>
        </xsl:otherwise>
    </xsl:choose>
    <xsl:text>&nl;</xsl:text>
    <xsl:call-template name="Search_pin_list" >
        <xsl:with-param name="cmplib_id" select="libsource/@part"/>
        <xsl:with-param name="cmp_ref" select="@ref"/>
    </xsl:call-template>
    <xsl:text> )&nl;</xsl:text>
</xsl:template>

<!--
    This template search for a given lib component description in list
    lib component descriptions are in /export/libparts,
    and each description start at ./libpart
    We search here for the list of pins of the given component
    This template has 2 parameters:
        "cmplib_id" (reference in libparts)
        "cmp_ref"   (schematic reference of the given component)
-->
<xsl:template name="Search_pin_list" >
    <xsl:param name="cmplib_id" select="0" />
    <xsl:param name="cmp_ref" select="0" />
        <xsl:for-each select="/export/libparts/libpart">
            <xsl:if test = "@part = $cmplib_id ">
                <xsl:apply-templates name="build_pin_list" select="pins/pin">
                    <xsl:with-param name="cmp_ref" select="$cmp_ref"/>
                </xsl:apply-templates>
            </xsl:if>
        </xsl:for-each>
</xsl:template>


<!--
    This template writes the pin list of a component
    from the pin list of the library description
    The pin list from library description is something like
          <pins>
            <pin num="1" type="passive"/>
            <pin num="2" type="passive"/>
          </pins>
    Output pin list is ( <pin num> <net name> )
    something like
            ( 1 VCC )
            ( 2 GND )
-->
<xsl:template name="build_pin_list" match="pin">
    <xsl:param name="cmp_ref" select="0" />

    <!-- write pin numner and separator -->
    <xsl:text>  ( </xsl:text>
    <xsl:value-of select="@num"/>
    <xsl:text> </xsl:text>

    <!-- search net name in nets section and write it: -->
    <xsl:variable name="pinNum" select="@num" />
    <xsl:for-each select="/export/nets/net">
        <!-- net name is output only if there is more than one pin in net
             else use "?" as net name, so count items in this net
        -->
        <xsl:variable name="pinCnt" select="count(node)" />
        <xsl:apply-templates name="Search_pin_netname" select="node">
            <xsl:with-param name="cmp_ref" select="$cmp_ref"/>
            <xsl:with-param name="pin_cnt_in_net" select="$pinCnt"/>
            <xsl:with-param name="pin_num"> <xsl:value-of select="$pinNum"/>
            </xsl:with-param>
        </xsl:apply-templates>
    </xsl:for-each>

    <!-- close line -->
    <xsl:text> )&nl;</xsl:text>
</xsl:template>

<!--
    This template writes the pin netname of a given pin of a given component
    from the nets list
    The nets list description is something like
      <nets>
        <net code="1" name="GND">
          <node ref="J1" pin="20"/>
              <node ref="C2" pin="2"/>
        </net>
        <net code="2" name="">
          <node ref="U2" pin="11"/>
        </net>
    </nets>
    This template has 2 parameters:
        "cmp_ref"   (schematic reference of the given component)
        "pin_num"   (pin number)
-->

<xsl:template name="Search_pin_netname" match="node">
    <xsl:param name="cmp_ref" select="0" />
    <xsl:param name="pin_num" select="0" />
    <xsl:param name="pin_cnt_in_net" select="0" />

    <xsl:if test = "@ref = $cmp_ref ">
        <xsl:if test = "@pin = $pin_num">
        <!-- net name is output only if there is more than one pin in net
             else use "?" as net name
        -->
            <xsl:if test = "$pin_cnt_in_net>1">
                <xsl:choose>
                    <!-- if a net has a name, use it,
                        else build a name from its net code
                    -->
                    <xsl:when test = "../@name != '' ">
                        <xsl:value-of select="../@name"/>
                    </xsl:when>
                    <xsl:otherwise>
                        <xsl:text>$N-0</xsl:text><xsl:value-of select="../@code"/>
                    </xsl:otherwise>
                </xsl:choose>
            </xsl:if>
            <xsl:if test = "$pin_cnt_in_net &lt;2">
                <xsl:text>?</xsl:text>
            </xsl:if>
        </xsl:if>
    </xsl:if>

</xsl:template>

</xsl:stylesheet>

Ecco il file OrcadPCB2 risultante.

( { Eeschema Netlist Version 1.1  29/08/2010 21:07:51
eeschema (2010-08-28 BZR 2458)-unstable}
 ( 4C6E2141 $noname P1 CONN_4
  (  1 VCC )
  (  2 /SIG_OUT )
  (  3 /CLOCK_IN )
  (  4 GND )
 )
 ( 4C6E20BA $noname U2 74LS74
  (  1 VCC )
  (  2 /SIG_OUT )
  (  3 N-04 )
  (  4 VCC )
  (  5 /SIG_OUT )
  (  6 ? )
  (  7 GND )
  (  14 VCC )
 )
 ( 4C6E20A6 $noname U1 74LS04
  (  1 /CLOCK_IN )
  (  2 N-04 )
  (  7 GND )
  (  14 VCC )
 )
 ( 4C6E2094 $noname C1 CP
  (  1 /CLOCK_IN )
  (  2 GND )
 )
 ( 4C6E208A $noname R1 R
  (  1 VCC )
  (  2 /CLOCK_IN )
 )
)
*

14.3.4. Netlist plugins interface

Intermediate Netlist converters can be automatically launched within the Schematic Editor.

Inizializzazione della finestra di dialogo

È possibile aggiungere una nuova scheda interfaccia utente di plugin di netlist facendo clic sul pulsante Aggiungi plugin.

eeschema_plugin_add_plugin_png

Ecco come appaiono i dati di configurazione per la scheda PadsPcb:

eeschema_plugin_padspcb_png
Parametri di configurazione plugin

The netlist plug-in configuration dialog requires the following information:

  • Il titolo: per esempio, il nome del formato della netlist.

  • La riga di comando che serve per eseguire il convertitore.

Fatto clic sul pulsante della netlist ecco cosa succede:

  1. KiCad creates an intermediate netlist file *.xml, for instance test.xml.

  2. KiCad runs the plug-in by reading test.xml and creates test.net.

Generazione di file di netlist tramite linea di comando

Assumendo che si stia usando il programma xsltproc.exe per applicare il foglio di stile al file intermedio, xsltproc.exe verrà eseguito tramite il seguente comando:

xsltproc.exe -o <nomefile in uscita> <nomefile foglio di stile> <file XML in ingresso da convertire>

In KiCad sotto Windows la riga di comando è la seguente:

f:/kicad/bin/xsltproc.exe -o "%O" f:/kicad/bin/plugins/netlist_form_pads-pcb.xsl "%I"

Sotto Linux il comando diventa il seguente:

xsltproc -o "%O" /usr/local/kicad/bin/plugins/netlist_form_pads-pcb.xsl "%I"

Where netlist_form_pads-pcb.xsl is the style-sheet that you are applying. Do not forget the double quotes around the file names, this allows them to have spaces after the substitution by KiCad.

Il formato della riga di comando accetta parametri nei nomi di file:

I parametri di formattazione supportati sono:

  • %B ⇒ nome file base e percorso del file di uscita selezionato, senza percorso ed estensione.

  • %I ⇒ il nome del file completo di percorso del file di ingresso temporaneo (il netfile intermedio).

  • %O ⇒ nome e percorso completi del file d’uscita scelto dall’utente.

%I verrà rimpiazzato dall’effettivo nome file intermedio

%O verrà rimpiazzato dall’effettivo nome del file d’uscita.

Formato della riga di comando: esempio per xsltproc

Il formato della riga di comando per xsltproc è il seguente:

<percorso di xsltproc> xsltproc <parametri di xsltproc>

sotto Windows:

f:/kicad/bin/xsltproc.exe -o "%O" f:/kicad/bin/plugins/netlist_form_pads-pcb.xsl "%I"

sotto Linux:

xsltproc -o "%O" /usr/local/kicad/bin/plugins/netlist_form_pads-pcb.xsl "%I"

In tutti gli esempi sopra descritti si presume che xsltproc sia installato sul proprio computer sotto Windows e che tutti i file siano posti in kicad/bin.

14.3.5. Generazione distinta materiali

Dato che il file di netlist intermedio contiene tutte le informazioni sui componenti utilizzati, da esso è possibile estrarre una distinta materiali. Ecco la finestra di impostazioni del plugin (su Linux) per creare un file di distinta materiali personalizzato:

bom-netlist-tab_png

Il percorso del foglio di stile bom2csv.xsl dipende dal sistema operativo in uso. Attualmente il migliore foglio di stile XSLT per la generazione della distinta materiali si chiama bom2csv.xsl. Questo è modificabile liberamente per venire incontro alle proprie esigenze, ma se si sviluppa qualcosa di universalmente utile, chiedete e la comunità degli sviluppatori sarà ben lieta di includere i vostri miglioramenti nel progetto KiCad.

14.4. Formato della riga di comando: esempio di script python

Il formato della riga di comando per python è qualcosa del genere:

python <nome file script> <file in ingresso> <file in uscita>

sotto Windows:

python *.exe f:/kicad/python/mio_script_python.py "%I" "%O"

sotto Linux:

python /usr/local/kicad/python/mio_script_python.py "%I" "%O"

Assumendo che python sia installato nel proprio PC.

14.5. Struttura etlist intermedia

Questo campione dà un’idea del formato del file netlist.

<?xml version="1.0" encoding="utf-8"?>
<export version="D">
  <design>
    <source>F:\kicad_aux\netlist_test\netlist_test.sch</source>
    <date>29/08/2010 21:07:51</date>
    <tool>eeschema (2010-08-28 BZR 2458)-unstable</tool>
  </design>
  <components>
    <comp ref="P1">
      <value>CONN_4</value>
      <libsource lib="conn" part="CONN_4"/>
      <sheetpath names="/" tstamps="/"/>
      <tstamp>4C6E2141</tstamp>
    </comp>
    <comp ref="U2">
      <value>74LS74</value>
      <libsource lib="74xx" part="74LS74"/>
      <sheetpath names="/" tstamps="/"/>
      <tstamp>4C6E20BA</tstamp>
    </comp>
    <comp ref="U1">
      <value>74LS04</value>
      <libsource lib="74xx" part="74LS04"/>
      <sheetpath names="/" tstamps="/"/>
      <tstamp>4C6E20A6</tstamp>
    </comp>
    <comp ref="C1">
      <value>CP</value>
      <libsource lib="device" part="CP"/>
      <sheetpath names="/" tstamps="/"/>
      <tstamp>4C6E2094</tstamp>
    <comp ref="R1">
      <value>R</value>
      <libsource lib="device" part="R"/>
      <sheetpath names="/" tstamps="/"/>
      <tstamp>4C6E208A</tstamp>
    </comp>
  </components>
  <libparts/>
  <libraries/>
  <nets>
    <net code="1" name="GND">
      <node ref="U1" pin="7"/>
      <node ref="C1" pin="2"/>
      <node ref="U2" pin="7"/>
      <node ref="P1" pin="4"/>
    </net>
    <net code="2" name="VCC">
      <node ref="R1" pin="1"/>
      <node ref="U1" pin="14"/>
      <node ref="U2" pin="4"/>
      <node ref="U2" pin="1"/>
      <node ref="U2" pin="14"/>
      <node ref="P1" pin="1"/>
    </net>
    <net code="3" name="">
      <node ref="U2" pin="6"/>
    </net>
    <net code="4" name="">
      <node ref="U1" pin="2"/>
      <node ref="U2" pin="3"/>
    </net>
    <net code="5" name="/SIG_OUT">
      <node ref="P1" pin="2"/>
      <node ref="U2" pin="5"/>
      <node ref="U2" pin="2"/>
    </net>
    <net code="6" name="/CLOCK_IN">
      <node ref="R1" pin="2"/>
      <node ref="C1" pin="1"/>
      <node ref="U1" pin="1"/>
      <node ref="P1" pin="3"/>
    </net>
  </nets>
</export>

14.5.1. Struttura generale del file netlist

La netlist intermedia consta di cinque sezioni.

  • La sezione intestazione.

  • La sezione componenti.

  • La sezione librerie di parti.

  • La sezione librerie.

  • La sezione collegamenti.

Il contenuto del file ha il delimitatore <export>

<export version="D">
...
</export>

14.5.2. Sezione intestazione

L’intestazione ha il delimitatore <design>

<design>
<source>F:\kicad_aux\netlist_test\netlist_test.sch</source>
<date>21/08/2010 08:12:08</date>
<tool>eeschema (2010-08-09 BZR 2439)-unstable</tool>
</design>

Questa sezione può essere considerata una sezione di commento.

14.5.3. La sezione componenti

La sezione componenti ha il delimitatore <componenti>

<components>
<comp ref="P1">
<value>CONN_4</value>
<libsource lib="conn" part="CONN_4"/>
<sheetpath names="/" tstamps="/"/>
<tstamp>4C6E2141</tstamp>
</comp>
</components>

Questa sezione contiene l’elenco dei componente nello schema. Ogni componente viene descritto in questo modo:

<comp ref="P1">
<value>CONN_4</value>
<libsource lib="conn" part="CONN_4"/>
<sheetpath names="/" tstamps="/"/>
<tstamp>4C6E2141</tstamp>
</comp>
libsource name of the lib where this component was found.

part

component name inside this library.

sheetpath

path of the sheet inside the hierarchy: identify the sheet within the full schematic hierarchy.

tstamps (time stamps)

time stamp of the schematic file.

tstamp (time stamp)

time stamp of the component.

Nota sulle marcature temporali per i componenti

Per identificare un componente in una netlist e quindi in una scheda, il marcatempo viene usato come riferimento univoco per ogni componente. Comunque KiCad fornisce in modo alternativo per identificare il corrispondente componente di una impronta sulla scheda. Ciò permette la ri-annotazione di componenti in un progetto di schema elettrico non perdendo il collegamento tra il componente e la sua impronta.

Un marcatore temporale è un identificatore univoco per ogni componente o foglio in un progetto di schema elettrico. Ma in caso di gerarchie complesse, lo stesso foglio viene usato più di una volta, perciò il foglio contiene componenti aventi la stessa marcatura temporale.

Un dato foglio dentro una gerarchia complessa possiede un identificatore univoco: il suo percorso foglio. Un dato componente (dentro una gerarchia complessa) possiede un identificativo univoco: il percorso foglio + la sua marcatura temporale.

14.5.4. La sezione libparts

La sezione libparts ha un delimitatore <libparts>, e il contenuto di questa sezione viene definito nelle librerie di schemi. La sezione libparts contiene:

  • Il delimitatore dei nomi impronte permessi (i nomi usano i caratteri jolly) <fp>.

  • I campi definiti nel delimitatore di libreria <fields>.

  • L’elenco dei delimitatori di pin <pins>.

<libparts>
<libpart lib="device" part="CP">
  <description>Condensateur polarise</description>
  <footprints>
    <fp>CP*</fp>
    <fp>SM*</fp>
  </footprints>
  <fields>
    <field name="Reference">C</field>
    <field name="Valeur">CP</field>
  </fields>
  <pins>
    <pin num="1" name="1" type="passive"/>
    <pin num="2" name="2" type="passive"/>
  </pins>
</libpart>
</libparts>

Le linee come <pin num="1" type="passive"/> descrivono anche il tipo elettrico del pin. I tipi di pin elettrici possibili sono:

Input

Normale pin di ingresso

Output

Normale pin di uscita

Bidirectional

Ingresso o uscita

Tri-state

Bus ingresso/uscita

Passive

Normale capo di componente passivo

Unspecified

Tipo elettrico sconosciuto

Power input

Ingresso di potenza, per es. alimentazione

Power output

Uscita di potenza, per es. in un alimentatore

Open collector

Collettore aperto, comune dei comparatori analogici

Open emitter

Emettitore aperto, presente in alcuni circuiti logici

Not connected

Deve essere lasciato aperto nello schema elettrico

14.5.5. La sezione librerie

La sezione librerie possiede il delimitatore <libraries>. Questa sezione contiene l’elenco delle librerie di schemi elettrici usate nel progetto.

<libraries>
  <library logical="device">
    <uri>F:\kicad\share\library\device.lib</uri>
  </library>
  <library logical="conn">
    <uri>F:\kicad\share\library\conn.lib</uri>
  </library>
</libraries>

14.5.6. La sezione collegamenti

La sezione collegamenti possiede il delimitatore <nets>. Questa sezione contiene le "connessioni" dello schema elettrico.

<nets>
  <net code="1" name="GND">
    <node ref="U1" pin="7"/>
    <node ref="C1" pin="2"/>
    <node ref="U2" pin="7"/>
    <node ref="P1" pin="4"/>
  </net>
  <net code="2" name="VCC">
    <node ref="R1" pin="1"/>
    <node ref="U1" pin="14"/>
    <node ref="U2" pin="4"/>
    <node ref="U2" pin="1"/>
    <node ref="U2" pin="14"/>
    <node ref="P1" pin="1"/>
  </net>
</nets>

Questa sezione elenca tutti i collegamenti presenti nello schema elettrico.

Un tipico collegamento contiene i seguenti elementi.

<net code="1" name="GND">
  <node ref="U1" pin="7"/>
  <node ref="C1" pin="2"/>
  <node ref="U2" pin="7"/>
  <node ref="P1" pin="4"/>
</net>

net code

è un identificatore interno per questo collegamento

name

è un nome per questo collegamento

node

dà un piedino di riferimento connesso per questo collegamento

14.6. Ancora su xsltproc

Fare riferimento alla pagina: http://xmlsoft.org/XSLT/xsltproc.html

14.6.1. Introduzione

xsltproc è uno strumento a riga di comando per l’applicazione di fogli di stile XSLT a documenti XML. Nonostante sia è stato sviluppato come parte del progetto GNOME, esso può operare independentemente dal desktop di GNOME.

xsltproc viene invocato dalla riga di comando con il nome del foglio di stile da usare seguito dal nome del file o dei file ai quali il foglio di stile deve essere applicato. Userà lo standard input se viene fornito il nome file - .

Se un foglio di stile viene incluso in un documento XML con istruzioni di elaborazione del foglio di stile, non è necessario nominare alcun foglio di stile nella riga di comando. xsltproc rileverà automaticamente il foglio di stile incluso e lo userà. Come impostazione predefinita, i risultati finscono nello stdout. È possibile specificare un file per il risultato usando l’opzione -o .

14.6.2. Sinossi

xsltproc [[-V] | [-v] | [-o *file* ] | [--timing] | [--repeat] |
[--debug] | [--novalid] | [--noout] | [--maxdepth *val* ] | [--html] |
[--param *nome* *valore* ] | [--stringparam *nome* *valore* ] | [--nonet] |
[--path *percorsi* ] | [--load-trace] | [--catalogs] | [--xinclude] |
[--profile] | [--dumpextensions] | [--nowrite] | [--nomkdir] |
[--writesubtree] | [--nodtdattr]] [ *stylesheet* ] [ *file1* ] [ *file2* ]
[ *....* ]

14.6.3. Opzioni della riga di comando

-V o --version

Mostra la versione di libxml e libxslt usati.

-v o --verbose

Stampa tutti i passaggi intrapresi da xsltproc nell’elaborazione del foglio di stile e del documento.

-o o --output file

Uscita diretta al file di nome file. Per uscite multiple, tecnica conosciuta anche col nome ``chunking'', -o cartella/ dirige i file di uscita in una specifica cartella. La cartella deve esistere già.

--timing

Mostra il tempo usato per l’analisi del foglio di stile, l’analisi del documento, l’applicazione del foglio di stile e il salvataggio dei risultati. Mostrati in millisecondi.

--repeat

Esegue la trasformazione 20 volte. Usata per i test di tempistica.

--debug

Emette un albero XML del documento trasformato a scopo di debug.

--novalid

Salta il caricamento del DTD del documento.

--noout

Non emettere alcun risultato.

--maxdepth valore

Regola la profondità massima della pila di modelli prima che libxslt concluda che si tratta di un ciclo infinito. Il valore predefinito è 500.

--html

Il file in ingresso è un file HTML.

--param nome valore

Passa un parametro di nome nome e di valore valore al foglio di stile. Si può passare più coppie nome/valore fino ad un massimo di 32. Se il valore passato è una stringa invece che un identificatore di nodo, usare invece --stringparam .

--stringparam nome valore

Passa un parametro di nome nome e valore valore dove valore è una stringa invece che un identificatore di nodo (nota: la stringa deve essere con codifica utf-8).

--nonet

Non usare Internet per recuperare DTD, entità o documenti.

--path percorsi

Usare l’elenco (separato da spazi o colonne) di percorsi di file specificati da paths per caricare le DTD, entità o documenti.

--load-trace

Mostra su stderr tutti i documenti caricati durante l’elaborazione.

--catalogs

Usa il catalogo SGML specificato in SGML_CATALOG_FILES per trovare la posizione di entità esterne. Come impostazione predefinita, xsltproc consulta il catalogo specificato in XML_CATALOG_FILES. Se questo non è specificato, usa /etc/xml/catalog.

--xinclude

Processa il documento in ingresso usando la specifica Xinclude. Maggiori dettagli su questo argomento si possono trovare nella specifica Xinclude: http://www.w3.org/TR/xinclude/

--profile --norman

Fornisce in uscita informazioni di profilazione che dettagliano la quantità di tempo speso in ogni parte del foglio di stile. Utile per l’ottimizzazione del foglio di stile.

--dumpextensions

Scarica l’elenco di tutte le estensioni registrate su stdout.

--nowrite

Non scrive su nessun file o risorsa.

--nomkdir

Non crea nessuna cartella.

--writesubtree percorso

Permette la scrittura file solo all’interno del sotto albero percorso .

--nodtdattr

Nno applica gli attributi predefiniti dal DTD del documento.

14.6.4. Valori di ritorno di xsltproc

xsltproc restituisce un numero di stato che può tornare utile se lo si chiama dall’interno di uno script.

0: normale

1: nessun argomento

2: troppi parametri

3: opzione sconosciuta

4: fallita l’analisi del foglio di stile

5: errore nel foglio di stile

6: errore in uno dei documenti

7: metodo xsl:output non supportato

8: parametro stringa contenente sia apici che virgolette

9: errore interno

10: l’elaborazione è stata interrotta da un messaggio di terminazione

11: impossibile scrivere il risultato sul file di uscita

14.6.5. Ulteriori informazioni su xsltproc

pagina web di libxml: http://www.xmlsoft.org/

Pagina W3C XSLT: http://www.w3.org/TR/xslt

15. Simulatore

KiCad provides an embedded electrical circuit simulator using ngspice as the simulation engine.

Quando si lavora con il simulatore, si può trovare utile la libreria ufficiale pspice. Essa contiene simboli comuni usati per la simulazione come sorgenti di tensione o corrente, o transistor con pin numerati in modo da corrispondere alle specifiche di ordine del nodo di ngspice.

Ci sono anche dei progetti dimostrativi per illustrare le capacità di simulazione. Si trovano nella cartella demos/simulation.

15.1. Assegnazione modelli

Prima di avviare una simulazione, i componenti devono avere assegnato un modello Spice.

Ogni componente può avere solo un modello assegnato, anche se il componente consiste di più unità. In tal caso, la prima unità deve specificare il modello.

I componenti passivi con riferimento all’accoppiamento di un tipo di dispositivo in notazione Spice (R* per le resistenze, C* per i condensatori, L* per le induttanze) avranno modelli assegnati implicitamente e useranno il campo valore per determinare le loro proprietà.

Note
Si faccia presente che nella notazione spice, 'M' sta per milli e 'Meg' per mega. Se si preferisce usare 'M' per indicare il prefisso mega, è possibile indicarlo nella finestra di dialogo delle impostazioni di simulazione.

Le informazioni sui modelli Spice sono memorizzate come testo nei campi dei simboli, perciò li si può definire sia nell’editor dei simboli che in quello dello schema elettrico. Aprire la finestra di dialogo delle proprietà del simbolo e fare clic sul pulsante Modifica modello Spice per aprire la finestra di dialogo dell’editor del modello Spice.

La finestra di dialogo della modifica del modello Spice ha tre linguette corrispondenti a diversi tipi di modello. Ci sono due opzioni comuni a tutti i tipi di modello:

Disabilita simbolo per la simulazione

Quando è abilitato il componente viene escluso dalla simulazione.

Sequenza nodi alternativa

Permette di imporre la mappatura nodi del modello ai pin del simbolo. Per definire una mappatura diversa, specificare i numeri dei pin nell’ordine che si aspetta il modello.

'Esempio:'

* connessioni:
* 1: ingresso non-invertente
* 2: ingresso invertente
* 3: terminale positivo di potenza
* 4: terminale negativo di potenza
* 5: uscita
.subckt tl071 1 2 3 4 5

Simbolo generico di amplificatore operazionale
  Per accoppiare i pin del simbolo ai nodi del modello Spice mostrati sopra,
è necessario usare l'opzione sequenza di nodi alternativa con valore:
"1{nbsp}3{nbsp}5{nbsp}2{nbsp}4". È un elenco di numeri di pin corrispondenti
all'ordine dei nodi del modello Spice.

15.1.1. Passivo

La scheda Passivo permette all’utente di assegnare un modello di dispositivo passivo (resistore, condensatore o induttore) ad un componente. È un’opzione usata raramente, dato che i componenti passivi hanno modelli assegnati implicitamente, a meno che il riferimento del componente non corrisponda all’effettivo tipo di dispositivo.

Note
I modelli di dispositivi passivi esplicitamente definiti hanno la priorità su quelli assegnati implicitamente. Questo significa che una volta che un modello di dispositivo passivo viene assegnato, i campi di riferimento e valore non sono presi in considerazione durante la simulazione. Ciò può portare ad una situazione di confusione dove il valore del modello assegnato non corrisponde con quello mostrato sullo schema elettrico.
Scheda modifica modello dispositivo passivo

Tipo

Seleziona il tipo di dispositivo (resistore, condensatore o induttore).

Valore

Definisce la proprietà del dispositivo (resistenza, capacità o induttanza). Il valore può usare i soliti prefissi di unità di Spice (come elencato sotto il campo di inserimento testo) e dovrebbe usare il punto come separatore decimale. Si noti che Spice non interpreta correttamente i prefissi inseriti nei valori (per es. 1k5).

15.1.2. Modello

La scheda Modello viene usata per assegnare un semiconduttore o un modello complesso definito in un file di libreria esterno. Le librerie del modello Spice vengono spesso fornite dal costruttore del dispositivo.

La finestra di testo principale mostra i contenuti del file di libreria selezionato. È pratica comune mettere la descrizione del modello dentro i file delle librerie, includendo l’ordine dei nodi.

Scheda modifica modello dispositivo a semiconduttore

File

Percorso ad un file di libreria Spice. Questo file verrà usato dal simulatore, come viene aggiunto usando la direttiva .include.

Modello

Il modello di dispositivo selezionato. Quando un file viene selezionato, l’elenco viene riempito con i modelli disponibili tra cui scegliere.

Tipo

Seleziona il tipo di modello (subcircuito, BJT, MOSFET o diodo). Normalmente viene impostato automaticamente quando viene selezionato un modello.

15.1.3. Sorgente

La scheda Sorgente viene usata per assegnare un modello di sorgente di alimentazione o di segnale. Ci sono due sezioni: Analisi DC/AC e Analisi del transiente. Ognuna definisce i parametri sorgente per il tipo di simulazione corrispondente.

L’opzione Tipo sorgente si applica a tutti i tipi di simulazione.

Scheda modifica modello sorgente

Fare riferimento alla documentazione ngspice, capitolo 4 (Sorgenti di tensione e corrente) per ulteriori dettagli sulle sorgenti.

15.2. Direttive Spice

È possibile aggiungere direttive Spice piazzandole nei campi di testo su un foglio dello schema. Questo approccio torna comodo, per esempio, per la definizione del tipo di simulazione predefinita. Questa funzionalità è limitata alle direttive Spice che cominciano con un punto (per es. ".tran 10n 1m"), e non è possibile piazzare componenti aggiuntivi usando i campi di testo.

15.3. Simulazione

Per avviare una simulazione, aprire la finestra della Simulazione Spice selezionando il menu Strumenti→Simulatore nella finestra dell’editor degli schemi elettrici.

La finestra principale di simulazione

La finesta è divisa in diverse sezioni:

15.3.1. Menu

File

Nuovo grafico

Crea una nuova scheda nel pannello del grafico.

Apri libretto di lavoro

Apre un elenco di segnali graficati.

Salva libretto di lavoro

Salva un elenco di segnali graficati.

Salva come immagine

Esporta il grafico attivo in un file .png .

Salva come file .csv

Esporta i punti dei dati grezzi del grafico attivo in un file .csv .

Esci dalla simulazione

Chiude la finestra di dialogo.

Simulazione

Avvia simulazione

Esegue una simulazione usando le impostazioni correnti.

Aggiungi segnali…​

Apre una finestra di dialogo per selezionare i segnali da graficare.

Campiona dallo schema

Avvia lo strumento Sonda sullo schema elettrico.

Regola il valore dei componenti

Avvia lo strumento Regola.

Mostra la netlist SPICE…​

Apre una finestra di dialogo che mostra la netlist generata per il circuito simulato.

Impostazioni…​

Apre la finestra di dialogo delle impostazioni di simulazione.

Vista

Ingrandisci

Ingrandisce il grafico attivo.

Rimpicciolisci

Rimpicciolisce il grafico attivo.

Adatta allo schermo

Regola l’ingrandimento per visualizzare tutto il grafico.

Mostra griglia

Commuta la visibilità della griglia.

Mostra legenda

Commuta la visibilità della legenda.

15.3.2. Barra strumenti

Barra principale della finestra di simulazione

Questa barra strumenti dà accesso alle funzioni utilizzate più frequentemente.

Avvia/Blocca Simulazione

Avvia o blocca la simulazione.

Aggiungi segnali

Apre una finestra di dialogo per selezionare i segnali da graficare.

Sonda

Avvia lo strumento Sonda sullo schema elettrico.

Regola

Avvia lo strumento Regola sullo schema elettrico.

Impostazioni

Apre la finestra delle impostazioni di simulazione.

15.3.3. Il pannello grafico

Visualizza i risultati della simulazione in forma di grafici. Si possono avere più grafici aperti in schede separate ma solo quella attiva viene aggiornata quando viene eseguita una simulazione. In questo modo è possibile confrontare i risultati di simulazione di esecuzioni diverse.

I grafici possono essere personalizzati abilitando o disabilitando la visibilità della griglia e della legenda usando il menu Visualizza. Quando la legenda è visibile, questa può essere trascinata per cambiarne la posizione.

Interazione del pannello del grafico:

  • la rotellina del mouse per ingrandire / rimpicciolire

  • clic destro per aprire il menu a scomparsa e regolare la visualizzazione

  • disegnare un rettangolo di selezione per fare lo zoom sull’area selezionata

  • trascinare un cursore per cambiarne le coordinate

15.3.4. Console d’uscita

La console d’uscita mostra i messsaggi generati dal simulatore. Si consigla di controllare sempre la console di uscita per verificare che non ci siano errori o avvertenze.

15.3.5. Elenco segnali

Mostra l’elenco dei segnali mostrati nel grafico attivo.

Interazione elenco segnali:

  • click destro apre un menu contestuale che consente di nascondere il segnale o commutare il cursore

  • doppio clic per nascondere il segnale

15.3.6. Elenco cursori

Mostra l’elenco dei cursori e delle loro coordinate. Ogni segnale può avere un cursire visualizzato. La visibilità dei cursori viene impostata usando l’elenco Segnali.

15.3.7. Pannello di regolazione

Mostra i componenti prelevati con lo strumento Regola. Il pannello Regola permette all’utente di modificare velocemente i valori del componente e di osservare la loro influenza sui risultati della simulazione - ogni volta che il valore di un componente viene cambiato, la simulazione viene riavviata e i grafici aggiornati.

Per ogni componente ci sono alcuni controlli associati:

  • Il campo di testo in cima imposta il valore massimo del componente.

  • Il campo di testo di mezzo imposta il valore corrente del componente.

  • Il campo di testo in fondo imposta il valore minimo del componente.

  • Il cursore permette all’utente di modificare il valore del componente in modo agevole.

  • Il pulsante Salva modifica il valore del componente sullo schema al valore impostato con il cursore.

  • Il pulsante X rimuove il componente dal pannello di regolazione e ne ripristina il valore originale.

I tre campi di testo riconoscono i prefissi di unità Spice.

15.3.8. Strumento di regolazione

Lo strumento di regolazione permette all’utente di prelevare i componenti per regolarli.

Per selezionare un componente per la regolazione, fare clic su uno sullo schema con lo strumento attivo. I componenti selezionati appariranno nel pannello Regola. Si possono regolare solo i componenti passivi.

15.3.9. Strumento sonda

Lo strumento sonda fornisce un modo semplice per selezionare i segnali da usare per i grafici.

Per aggiungere un segnale al grafico, fare clic su un filo corrispondete nell’editor dell schema elettrico mentre lo strumento è attivo.

15.3.10. Impostazioni di simulazione

Finestra di dialogo delle impostazioni di simulazione

La finestra di impostazione della simulazione permette all’utente di impostare il tipo e i parametri di simulazione. Ci sono quattro schede:

  • AC

  • Trasferimento DC

  • Transiente

  • Personalizzato

Le prime tre schede forniscono dei moduli nei quali si possono specificare i parametri di simulazione. L’ultima scheda permette all’utente di inserire direttive Spice personalizzate per impostare la simulazione. È possibile trovare ulteriori informazioni sui tipi e sui parametri di simulazione nella documentazione ngspice, capitolo 1.2.

Un modo alternativo per configurare una simulazione consiste nel battere le direttive Spice nei campi testo nello schema. Ogni campo testo contenente una direttiva relativa ad un tipo di simulazione viene superata dall’impostazione selezionata nella finestra di dialogo. Significa che una volta che si usa la finestra di dialogo di simulazione, la finestra di dialogo passa sopra alle direttive dello schema elettrico fino alla riapertura della simulazione.

Ci sono due opzioni comuni a tutti i tipi di simulazione:

Regola i valori dei simboli passivi

Rimpiazza i valori dei simboli passivi per convertire la notazione dei valori dei componenti comuni alla notazione Spice.

Aggiungi il percorso completo per la direttiva di libreria .include

Antepone i nomi file delle librerie di modelli Spice con il percorso completo. Normalmente ngspice richiede il percorso completo per accedere ad un file di libreria.