Exemplo n.º 1
0
        public static Resistor GetResistor(string packageCode)
        {
            Resistor r = new Resistor()
            {
                VendorName = "KOA Speer",

                Tolerance   = 1,
                Voltage     = Packages[packageCode].voltage,
                PackageName = Packages[packageCode].packageName,
                PowerRating = Packages[packageCode].power,

                TableName = "Resistor - " + Packages[packageCode].packageName,
            };

            r.Tags.Add("AEC-Q200");
            return(r);
        }
Exemplo n.º 2
0
        public static void RK73H_Generator()
        {
            Dictionary <string, double> values = new Dictionary <string, double>();

            foreach (string p in Packages.Keys)
            {
                values.Clear();
                string PackageName = Packages[p].packageName;

                ResistorZ rz = new ResistorZ(p);
                ComponentList.Resistors.InsertCmp(rz);

                switch (PackageName)
                {
                case ("01005"):
                {
                    Decade.ValueGenerator(values, Decade.E24Values, new Range <double>(10, 2e6));
                    foreach (string val in values.Keys)
                    {
                        Resistor r = GetResistor(p);
                        r.TemperatureRange = new Range <double>(-55, 125);
                        r.FootprintName    = "01005";
                        r.Value            = values[val];
                        r.VendorPartNumber = "RK73H" + p + "T" + Packages[p].pack + val + "F";

                        if (r.Value >= 10 && r.Value <= 91000)
                        {
                            r.TemperatureCoefficient = 200;
                        }
                        else if (r.Value > 100000 && r.Value <= 2000000)
                        {
                            r.TemperatureCoefficient = 250;
                        }
                        ComponentList.Resistors.InsertCmp(r);
                    }
                }
                break;

                case ("0201"):
                {
                    Decade.ValueGenerator(values, Decade.E24Values, new Range <double>(1, 9.1));
                    Decade.ValueGenerator(values, Decade.E96Values, new Range <double>(10, 1e6 - 1));
                    Decade.ValueGenerator(values, Decade.E24Values, new Range <double>(1e6, 1e7));
                    foreach (string val in values.Keys)
                    {
                        Resistor r = GetResistor(p);
                        r.FootprintName    = "0201";
                        r.Value            = values[val];
                        r.VendorPartNumber = "RK73H" + p + "T" + Packages[p].pack + val + "F";
                        if (r.Value >= 1 && r.Value < 10)
                        {
                            r.TemperatureCoefficient = 400;
                        }
                        else
                        {
                            r.TemperatureCoefficient = 200;
                        }
                        ComponentList.Resistors.InsertCmp(r);
                    }
                }
                break;

                case ("0402"):
                {
                    Decade.ValueGenerator(values, Decade.E96Values, new Range <double>(1, 1e7));
                    foreach (string val in values.Keys)
                    {
                        Resistor r = GetResistor(p);
                        r.FootprintName    = r.PackageName + "_BLUE";
                        r.Value            = values[val];
                        r.VendorPartNumber = "RK73H" + p + "T" + Packages[p].pack + val + "F";
                        if (r.Value >= 1 && r.Value < 10)
                        {
                            r.TemperatureCoefficient = 200;
                        }
                        else if (r.Value >= 10 && r.Value <= 1000000)
                        {
                            r.TemperatureCoefficient = 100;
                        }
                        else if (r.Value > 1000000)
                        {
                            r.TemperatureCoefficient = 200;
                        }
                        ComponentList.Resistors.InsertCmp(r);
                    }
                }
                break;

                case ("0603"):
                {
                    Decade.ValueGenerator(values, Decade.E96Values, new Range <double>(1, 1e7));
                    foreach (string val in values.Keys)
                    {
                        Resistor r = GetResistor(p);
                        r.FootprintName    = r.PackageName + "_BLUE";
                        r.Value            = values[val];
                        r.VendorPartNumber = "RK73H" + p + "T" + Packages[p].pack + val + "F";
                        if (r.Value >= 1 && r.Value < 10)
                        {
                            r.TemperatureCoefficient = 200;
                            r.PowerRating            = 0.125;
                        }
                        else if (r.Value >= 10 && r.Value <= 1000)
                        {
                            r.TemperatureCoefficient = 100;
                            r.PowerRating            = 0.125;
                        }
                        else if (r.Value > 1000 && r.Value <= 1000000)
                        {
                            r.TemperatureCoefficient = 100;
                            r.PowerRating            = 0.1;
                        }
                        else if (r.Value > 1000000)
                        {
                            r.TemperatureCoefficient = 200;
                        }
                        ComponentList.Resistors.InsertCmp(r);
                    }
                }
                break;

                case ("0805"):
                {
                    Decade.ValueGenerator(values, Decade.E96Values, new Range <double>(1, 1e7));
                    foreach (string val in values.Keys)
                    {
                        Resistor r = GetResistor(p);
                        r.FootprintName    = r.PackageName + "_BLUE";
                        r.Value            = values[val];
                        r.VendorPartNumber = "RK73H" + p + "T" + Packages[p].pack + val + "F";
                        if (r.Value >= 1 && r.Value < 10)
                        {
                            r.TemperatureCoefficient = 200;
                        }
                        else if (r.Value >= 10 && r.Value <= 1000000)
                        {
                            r.TemperatureCoefficient = 100;
                        }
                        else if (r.Value > 1000000)
                        {
                            r.TemperatureCoefficient = 400;
                        }
                        ComponentList.Resistors.InsertCmp(r);
                    }
                }
                break;

                case ("1206"):
                case ("1210"):
                case ("2010"):
                case ("2512"):
                {
                    Decade.ValueGenerator(values, Decade.E96Values, new Range <double>(1, 1e7));
                    foreach (string val in values.Keys)
                    {
                        Resistor r = GetResistor(p);
                        r.FootprintName    = r.PackageName + "_BLUE";
                        r.Value            = values[val];
                        r.VendorPartNumber = "RK73H" + p + "T" + Packages[p].pack + val + "F";
                        if (r.Value >= 1 && r.Value < 10)
                        {
                            r.TemperatureCoefficient = 200;
                        }
                        else if (r.Value >= 10 && r.Value <= 1000000)
                        {
                            r.TemperatureCoefficient = 100;
                        }
                        else if (r.Value > 1000000 && r.Value <= 5600000)
                        {
                            r.TemperatureCoefficient = 200;
                        }
                        else
                        {
                            r.TemperatureCoefficient = 400;
                        }
                        ComponentList.Resistors.InsertCmp(r);
                    }
                }
                break;
                }
            }
        }