/* Planar Spiral Inductor Synthesis - main routine - V1.4.1 - Bill Tompkins */ /* This program is based on a paper written by H.M. Greenhouse */ #include #include #include #include /*********************************************/ /* Third party 'include' files */ /*********************************************/ #include "ac.h" /* Program's defines and structures */ #include "external.h" /* Program's external variable definitions */ /*********************************************/ /* NOTE: ac.h must always preceed external.h */ /*********************************************/ main(int argc, char *argv[]) { int stat, i, j, x, y, orientation; int segments, full_turns, units_flag; int pos_mutual_terms, neg_mutual_terms; float gmd, coil_l, m_pos_total, m_neg_total, turns; float width, space, thickness, track_center, total; float inner_lead_width, inner_lead_length, inner_lead_thickness, inner_lead_l; float outer_lead_width, outer_lead_length, outer_lead_thickness, outer_lead_l; float x_length, y_length, length; float q, m1, m2, m2sub; char *str_upr(char *); j = 1; coil_l = 0.0; x_length = 0.0; y_length = 0.0; width = 0.0; thickness = .0004; /* microns */ inner_lead_l = 0.0; outer_lead_l = 0.0; inner_lead_length = 0.0; outer_lead_length = 0.0; inner_lead_width = 0.0; outer_lead_width = 0.0; inner_lead_thickness = 0.0; outer_lead_thickness = 0.0; m_pos_total = 0.0; m_neg_total = 0.0; units_flag = 0; /* 0 = microns, 1 = inches*/ orientation = 0; /* 0 = ID, 1 = OD */ for(i=1; i