delorie.com/archives/browse.cgi   search  
Mail Archives: geda-help/2017/08/28/19:01:37

X-Authentication-Warning: delorie.com: mail set sender to geda-help-bounces using -f
X-Recipient: geda-help AT delorie DOT com
X-Mailer: exmh version 2.8.0 04/21/2012 (debian 1:2.8.0~rc1-2) with nmh-1.5
X-Exmh-Isig-CompType: repl
X-Exmh-Isig-Folder: inbox
From: karl AT aspodata DOT se
To: geda-help AT delorie DOT com
Subject: Re: [geda-help] Symbols for components with extra internally connected pins in the footprint
In-reply-to: <CAHsNvaANy3BWRvRvnXMAso2skWJG8cZyqh8T18CoCxG26s8OqA@mail.gmail.com>
References: <CAHsNvaB61cG5aYuoTO1HVeuDfq=hPfuZ667L0fhEPk6g+k1V_Q AT mail DOT gmail DOT com> <20170828115336 DOT 10A2A804C774 AT turkos DOT aspodata DOT se> <CAHsNvaANy3BWRvRvnXMAso2skWJG8cZyqh8T18CoCxG26s8OqA AT mail DOT gmail DOT com>
Comments: In-reply-to "Graham S (graham DOT seale AT gmail DOT com) [via geda-help AT delorie DOT com]" <geda-help AT delorie DOT com>
message dated "Mon, 28 Aug 2017 21:54:22 +0100."
Mime-Version: 1.0
Message-Id: <20170828230117.896C1804C774@turkos.aspodata.se>
Date: Tue, 29 Aug 2017 01:01:17 +0200 (CEST)
X-Virus-Scanned: ClamAV using ClamSMTP
Reply-To: geda-help AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-help AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

Graham:
...
> The devices in the package do not have to be identical.

From http://wiki.geda-project.org/geda:gschem_ug:slots

  Some integrated circuits provide several identical and interchangeable
  devices in a single package. gschem and gnetlist provide support for
  working with these by using components with slots. 

Soo, the sloting capability is intended for "identical and
interchangeable" devices. Using it for other things isn't supported.

> In this case, one
> might place the actuating (coil) part of a relay in a completely different
> part of a drawing, instead of "forcibly attached" to the contacts part of
> the symbol. Two different symbols, forced together on the same footprint by
> the fact they have the same refdes, but a separate slot.

In your contact symbol, you have theese slot related attributes:

$ grep slot relay-40.61-contact.sym 
numslots=2
slot=2
slotdef=2:11,21,14,24,12,22
$

http://wiki.geda-project.org/geda:master_attributes_list#numslots

says that numslots "is the number of slots that are in a physical
device". You say that you have "2" slots in the symbol/device, but you 
are only defining slot number 2, where do you define slot number 1 ?

If you have package with dissimilar devices in it, you don't use 
slots, you simply use two or more different symbols and use the same 
refdes for them -- or you use a single symbol containing everything in 
it.

Example, identical devices, 7400, four AND gates:

$ grep slot /usr/share/gEDA/sym/74/7400-1.sym
slot=1
numslots=4
slotdef=1:1,2,3
slotdef=2:4,5,6
slotdef=3:9,10,8
slotdef=4:12,13,11
$

numslots=4, i.e. the chip has four identical devices, the first one is 
connected to pin 1, 2, and 3; the 2:nd to pin 4, 5, and 6, etc.

the power pins are not shown, but defined by:

$ grep net /usr/share/gEDA/sym/74/7400-1.sym
net=Vcc:14
net=GND:7

Example, one device with different parts, a mcu, stm32f105 or 107:

All pins:
 http://aspodata.se/git/openhw/share/gschem/mcu/stm32f107.square.LQFP100.sym

Or a multiple symbols with same refdes:
 http://aspodata.se/git/openhw/share/gschem/mcu/stm32f107.syspwr.LQFP100.sym
 http://aspodata.se/git/openhw/share/gschem/mcu/stm32f107.uarts.LQFP100.sym
 http://aspodata.se/git/openhw/share/gschem/mcu/stm32f107.pa.LQFP100.sym
 ...

> In your example, because there is only one pin in the symbol, although four
> physical pins on the package, I take it that is why there is only one
> pinseq=1.

For pinseq, have a look at:
 http://wiki.geda-project.org/geda:master_attributes_list#pinseq

For a symbol with just one pin, it should have pinseq=1; a symbol with 
two pins, the pins should have pinseq=1 and pinseq=2; etc.

> The other thing I need to understand properly is slotdef.
> I guessed at slotdef=2: 11,21,14,24,12,22 because that was the (strange)
> pin names in the order they appear on the package. It was just a blind
> guess, and maybe order is not important, but it seemed to work.

Take a look at the 7400 example, include a few in a test design, and 
then change the slot attribute with Edit->slot.

Compare their pin numbers.

Regards,
/Karl Hammar

-----------------------------------------------------------------------
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019