![]() | ![]() | ![]() |
| |||||||
| Chit-Chat Relax for a bit and have a general conversation (off topic is allowed!) with other members. Please be polite and respect your fellow members. |
![]() |
| | Tools |
| | #31 |
|
Well it is always good to know a little bit of everything, you never know that next job interview may require you to know AVR's even if you have been playing with FPGA's. But FPGA is next on my list | |
| |
| | #32 |
|
Psst.. OpenCores Worth your time for opensource FPGA cores. They even have an AVR core in there somewhere. You could take that and tweak it to your hearts content =) Just as a side note cause I'm an Atmel AVR pimp, give the FPSLIC series from Atmel a view, they're big blocks of FPGA material loved up with an AVR core for basic processing can make your own custom peripherals. Opencores is good, but the size for a dedicated chip is so much better than FPGA gate consumption putting the two together is just the perfect solution. Xilinx stuff is nice though free IDE and cheap kits.
__________________ "Because I be what I be. I would tell you what you want to know if I could, mum, but I be a cat, and no cat anywhere ever gave anyone a straight answer, har har." | |
| |
| | #33 |
|
Yeah my brother gave me his old Spartan 3E development board, and I just downloaded the Xilinx ISE webpack. So I'll be using that as a starter system.
| |
| |
| | #34 | ||
| Quote:
Firstly I'm splitting the number up into the exponent and a mantissa (0 to 999) which requires a log and an exponential function. Working out the nearest E24 value (this is corrected later on) only requires an extra multiplication which would be required to index a lookup table anyway. Here's the fragment of code which does all of the above. Code: INPUT "Enter value"; value# lgval# = LOG(value#) / lgb10' Take log10 of the value. ex = INT(lgval#)' Exponent is the integer part of log 10 of the value. dec#= lgval# - ex' store the decimal part of log10. el = dec#* 24' Work out the nearest preferred number. mnt = 10 ^ (2 + dec#)' get the mantissa. ex = ex - 2' Preferred numbers in the array are multiplied by 100 so /100. Quote:
I will eventually convert the program to FreeBASIC which is a compiler and runs on Windows and Linux. The program will probably still be text mode though. I shall make it free under the LGPL so other people can use it as a library and hopefully write a GUI for it.
__________________ I do not answer private messages asking for help because no one else can: benefit from advice I may give or correct me if I'm wrong. Please ask on the open forum if you have a question and I'll be happy to help, if I know the answer. | |||
| |
| | #35 | |
| Quote:
Like I said, I did it for E12 values, but the only difference would be in the size of the tables, and the number of iterations round the loop. Input the value required: Run a nested loop paralleling each value in turn with every other one, and comparing the result with that required. Display the 3 most accurate results, complete with actual value and percentage error. | ||
| |
| | #36 |
|
The input value could theoretically range from anything between 10mΩ to 100MΩ, a dynamic range of 10^9. Without ensuring the values are within a known order of magnitude how can I ensure that the loop doesn't have to go through 10^9 iterations or have an lookup table 10^9 elements long? I could have a loop which multiplies or divides the number until it's >0 <1000 but I'm not sure whether it would be faster than the log and exponential used to work out the mantissa and exponent. Is there another way?
__________________ I do not answer private messages asking for help because no one else can: benefit from advice I may give or correct me if I'm wrong. Please ask on the open forum if you have a question and I'll be happy to help, if I know the answer. | |
| |
| | #37 |
|
Like I said, it's a LONG time since I did it, it was pre-windows on a DOS laptop running a 386SX16 processor. There was no complicated maths, just a lookup table for a single decade - you simply scale for all other decades. It was absolutely instant, you entered the value you wanted, hit enter - and the results appeared LONG before your finger was off the key. | |
| |
| | #38 |
|
How about just using this website hero? It's common when designing software or hardware to make sure no one else has done it first =) Standard Resistor Closest Value Calculator
__________________ "Because I be what I be. I would tell you what you want to know if I could, mum, but I be a cat, and no cat anywhere ever gave anyone a straight answer, har har." | |
| |
| | #39 |
|
Nigel, So with your program, the user had to manually scale the value, mine will do it automatically. Sceadwian, That website just selects the nearest value. My program will do a lot more. Give it any value and it will select a pair of resistors which can be connected in series or parallel to give as near to the specified value as possible. I know of a program which does this but it doesn't include E3, E48 and E192 values. It's also closed source, mine will be open source. Directory of /~rstevew/Public/Software
__________________ I do not answer private messages asking for help because no one else can: benefit from advice I may give or correct me if I'm wrong. Please ask on the open forum if you have a question and I'll be happy to help, if I know the answer. Last edited by Hero999; 30th May 2009 at 09:29 PM. | |
| |
| | #40 |
| No, you just entered the value you wanted, and the program displayed the five nearest combinations, it did any scaling itself.
| |
| |
| | #41 |
|
Just an anorak here, turning this one upside down. My understanding is that the original series (E6) was so that resistors could be made (very badly, with a conductive paint) for a target value (eg 2k). When tested, they could be sorted by their actual values into bins where the values were separated by their tolerances. Eg: 1k (20%) bin would contain 800R to 1k20 1k5 bin goes from 1k20 to 1k80 2k2 - 1k76 to 2k64 3k3 - 2k64 to 3k96 4k7 - 3k76 to 5k64 6k8 - 5k44 to 8k16 10k - 8k0 up These values fitted quite well, but when tolerances improved and the E12 values came along, they wanted to keep the E6 values and intersperse the new values - but they didn't quite fit as well as they might have done had they used the equation as guide rather than stay with the already rounded values. Baldi | |
| |
| | #42 |
|
Nothing to add, but I miss the simple days of Turbo Pascal.
__________________ Mark Higgins | |
| |
| | #43 |
|
Oh Ya. OOPIC, also an interpreted PIC. Object Oriented language, too.
__________________ Mark Higgins | |
| |
| | #44 |
| Great wasn't it - incredibly fast compiling times, and a really nice language to use. I used Microsoft once (both Pascal and C), I thought the computer had crashed it was SOOOOOOO slow | |
| |
|
| Tags |
| e24, values, wrong |
| Thread Tools | |
| Display Modes | |
| |
Similar | ||||
| Title | Starter | Forum | Replies | Latest |
| Resistor Values | MrDEB | Electronic Projects Design/Ideas/Reviews | 5 | 21st May 2008 03:49 AM |
| A/D Values | Omar.M | Micro Controllers | 0 | 16th April 2007 10:56 PM |
| Resistor values...... | madmikejt12 | General Electronics Chat | 12 | 11th October 2005 04:12 PM |
| need a circuti with values | samratyuvi | General Electronics Chat | 15 | 23rd September 2005 11:06 PM |
| How to compare values? | Lac | Micro Controllers | 7 | 26th January 2005 03:45 PM |