#'TT' : 'SOT-23-3',
    'LT' : 'SC-70-5'
    }

#generic description
desc = "Low power, analog thermistor temperature sensor, {accuracy} accuracy, {range}, in {package} package"
keys = "temperature sensor thermistor"
docs = "http://ww1.microchip.com/downloads/en/DeviceDoc/21942e.pdf"

parts = []

aliases = []

basename = "MCP{suff}-{temp}/{pack}"

for a in A.keys():
    for t in T.keys():
        for p in P.keys():
            
            name = basename.format(suff=a,temp=t,pack=p)
            aliases.append(name)
            
            description = desc.format(accuracy=A[a],range=T[t],package=P[p])
            
            parts.append(cmp(name,description,keys,docs))

for part in parts:
    print(part)

alias = "ALIAS " + " ".join(aliases[1:])
    for row in reader:

        name = row[0]
        desc = row[1].replace("®","").replace("™","")
        datasheet = "https://www.fairchildsemi.com" + row[2]
        temp = row[3]
        vds = row[4]
        rds = row[5].split("@")[0].replace("?","Ω")
        qg = row[6].split("@")[0]
        vgs = row[7]
        i = row[8]

        description = "{desc}, Vds={vds}V, Rds={r}, Id(const)={current}A, Qg(max)={qg}, Temp={temp}, SON8 5x6mm package".format(
            desc = desc,
            vds = vds,
            r = rds,
            current = i,
            qg = qg,
            temp = temp)

        keys = "-".join([l.lower() for  l in desc.split(" ")[1:-1]]) + " mosfet fairchild"
        part = cmp(name, description, keys, datasheet)

        parts.append(part)
        aliases.append(name)

for part in parts:
    print(part,)

aliases = "ALIAS " + " ".join(aliases[1:])
    #'TT' : 'SOT-23-3',
    'LT': 'SC-70-5'
}

#generic description
desc = "Low power, analog thermistor temperature sensor, {accuracy} accuracy, {range}, in {package} package"
keys = "temperature sensor thermistor"
docs = "http://ww1.microchip.com/downloads/en/DeviceDoc/21942e.pdf"

parts = []

aliases = []

basename = "MCP{suff}-{temp}/{pack}"

for a in A.keys():
    for t in T.keys():
        for p in P.keys():

            name = basename.format(suff=a, temp=t, pack=p)
            aliases.append(name)

            description = desc.format(accuracy=A[a], range=T[t], package=P[p])

            parts.append(cmp(name, description, keys, docs))

for part in parts:
    print(part)

alias = "ALIAS " + " ".join(aliases[1:])
Example #4
0
with open("fdm.csv", 'r') as file:
    reader = csv.reader(file)

    for row in reader:

        name = row[0]
        desc = row[1].replace("®", "").replace("™", "")
        datasheet = "https://www.fairchildsemi.com" + row[2]
        temp = row[3]
        vds = row[4]
        rds = row[5].split("@")[0].replace("?", "Ω")
        qg = row[6].split("@")[0]
        vgs = row[7]
        i = row[8]

        description = "{desc}, Vds={vds}V, Rds={r}, Id(const)={current}A, Qg(max)={qg}, Temp={temp}, SON8 5x6mm package".format(
            desc=desc, vds=vds, r=rds, current=i, qg=qg, temp=temp)

        keys = "-".join([l.lower()
                         for l in desc.split(" ")[1:-1]]) + " mosfet fairchild"
        part = cmp(name, description, keys, datasheet)

        parts.append(part)
        aliases.append(name)

for part in parts:
    print(part, )

aliases = "ALIAS " + " ".join(aliases[1:])