Hi Neil, I'm sorry, but I'll have to download something to open the .tgz file (Linux compression format?) Don't worry about the code -- I know the feeling -- either you never have the time to do it the way you want, or you just realized how much you've grown as a coder when you look at old code and say "did I write that"? Thanks very much. Regards, Ken Pergola -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Picdude Sent: Sunday, August 10, 2003 1:47 AM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [EE]: 1% resistors - How to find exact integer multiples of each other Attached. If you can't open .tgz, I can send a zip instead. There were supposed to be 2 data files of resistance values (with 1 per line) -- the intention was that the primary is the resistors I actually have, and the secondary is what I can get. But IIRC, I never finished implementing the secondary-resistors file. The tolerance you specify is the tolerance to the stated value, and does not take the resistors' tolerances into account. Excuse the coding inefficiency -- it had been a while since I programmed anything serious in C. :-) I'm actually looking at the code now, so give me a couple minutes and I'll see if I can convert it easily. Cheers, -Neil. On Sunday 10 August 2003 00:08, Ken Pergola scribbled: > Hi Neil, > > Thanks. If you don't mind sending it I'd appreciate it greatly. Right now > I'm just playing with this in Excel. > > Thanks kindly, > > Ken Pergola > > > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Picdude > Sent: Sunday, August 10, 2003 1:06 AM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [EE]: 1% resistors - How to find exact integer multiples of > each other > > > I wrote a C program some months ago that asks for a resulting resistance, > then it chooses 2 resistors from a list of standard values and calculates > how > it could come up with the resulting resistance either in parallel or > series. It outputs many possible combinations within a tolerance that you > also enter. > And it sorts in by how close it gets. > > With a few minutes of work, you could adapt it for voltage dividers quite > easily. Let me know if you want it, and I'll forward it. > > Cheers, > -Neil. > > On Saturday 09 August 2003 21:47, Ken Pergola scribbled: > > Sorry guys -- I made a mistake in the text -- I meant 12.0 K ohms for the > > upper leg instead of 6.0 K ohms. Sorry for the confusion and brain lapse. > > Corrected text below. > > > > Regards, > > > > Ken Pergola > > > > > > > > > > > > > > > > > > Hi, > > > > Kind of a strange question but very basic: > > > > Without pulling out the calculator or spreadsheet and doing it manually, > > what is the quickest way to come up with resistors that are exact > > *integer* > > > multiples of each other (from the 1% standard value list)? > > > > Let me elaborate: In other words, say I want to make a 'divide by 4' > > voltage divider using 1% resistors and *only* two resistors (no building > > of > > > new resistance values allowed). > > > > For example, let me pick 2.00 K ohms as the bottom leg of the voltage > > divider. That means I need 12.00 K ohms as the upper leg of the voltage > > divider. Well, 12.00 K ohms is not a standard value, so I need to try > > again: So I'll try the next standard value for the bottom leg -- 2.05 K > > ohms (standard value). This would require 12.3 K ohms as the top resistor > > which is not a standard value. Try again...ad nauseam... > > > > Some values are exact integer multiples of each other -- what's the > > quickest and easiest way to identify them? > > Does anyone have something in their 'toolbox' they'd like to share? > > > > Does anyone know of any existing chart, software, or Excel spreadsheet > > that > > > already exists to do this. I realize this is simple math and I could go > > off > > > and do this myself, but it would be nice having something that already > > exists. I'm sure a lot of people have had a need for this at one time or > > another. > > > > Thanks very much. > > > > Best regards, > > > > Ken Pergola -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads