??? 07/30/08 18:13 Read: times |
#157144 - Reply specs. Responding to: ???'s previous message |
ok. Actually perhaps BASIC language would be best for future alterations since it is so much easier for us rusty engineers with no experience in this area.
Sampling can be very slow to once every half second really. Buffering/filtering could be wise. We presume that chip hsa 16 separate inputs so we ask would expect 16 channels and no need for mulitplexing. The logic for the outputs (which need to be 0 or 5 volts ) correspond to a software program that compares the inputs and makes decisions based on same. IE Inintially one dispensation is a simple bubble sort , sort all 16 inputs from highest to lowest and then pick of n number of the highest and output them as 5 volts . All other outpus would be 0 (also all outputs start out as 0 initialized). Later we expect to make it more fancy and create different decision making algorythm to achieve it. But having a simple buble sort at first at least gets us started and helps us get something that we can later modify and tailor to our more complex needs as they change over the next few years. So Yes, they output logic needs to be configurable , thus using a easy language such as BASIC is nicer for us who are not able to devote massive time to being expert (relearning c or pascal etc). See above , Actually in the case that all 16 inputs were 0 , the program should buble sort anyway (all 0 ) and then proceed with picking n top highest outputs ( in this case all 0) to turn on the coresponding vout1 , vout2, etc as +5 volts. Of course this is the trival case. When at least one input is higher than zero then it proceeds as normal and turns on highes n vout's and all other vout's = 0. In maximum capacity operation; 16 inputs will all be higher than 0, which will bubble sort from high to low and logic will turn on the highest n vouts and all others set to 0. EXAMPLE: Presuming input vmax is 5 volts (we don't know this) we voltage divied inputs to be below 5 volts (all same diviions so we get prorated relative equality), with 5 non-zero inputs and 11 zero inputs (disconnected or malfunction); vin1 = 4v, vin2 =5, vin3 = 3, vin4 = 3.4, vin5 0 4.6. vin6 - 16 are all 0, Logic bubble sorts them to vin2, vin5, vin1, vin4, vin3 vin6-16 Then LOGIC sends signals to n (= 3 in this case for simple example) that top 3 vins corresponding to the same # vouts will be set to 5 volts . All others set to 0 volts as thus: vout2 =5, vout5 = 5, vout1 = 5, vout4 = 0, vout3 = 0, vout 6-16 = 0 We are requesting BASIC language and any other easy to use from normal pc languages assemblers etc. We presume there must be some kind of hardware connection (testboard) for inputing program and rewriting with cable connection to preferable usb or serial port? Compensation: We are on very tight budget, so yes could in the future make a donation to some charity but that would be in future once we get over the hump. What say you? j. That was probably a language mistake. Most probably, the OP wanted to write: maybe in c++? Anyway, people can't guess how much time it will take unless there are a full specification. How often should the analog inputs be sampled? Should there be any filtering of the inputs to make sure that a short glitch doesn't result in a corresponding spike on the digital output pin? How are the analog inputs connected? If more inputs than there are ADC channels, how are they multiplexed? What is the logic for the individual outputs? Does the logic need to be configurable, or is it fixed decisions? Is every output controlled by decisions from a single input, or will multiple inputs be used to decide the state of an output? Even if you request someone else to do the program, you must decide - beforehand - if some specific tools should be used, so that you can control what tools someone else must have if you want someone to make further changes later down the road. Are your request for donation of time, or would you be ready to pay the volunteer or donate money to a charitable cause or something else? |