> From: Ross McKenzie > Questions:- > > 1. I am assuming that the RS232 data streams must have dedicated PICs. Most probably, although at the slow speed of 1200bps it may be possible to receive several with one PIC. For example, poll 4 inputs looking for change of state. At each change, determine whether a start bit has been detected. For this input, take timestamps of each transition for at least a period of (1+8+2)*3 bit-times. After this, post-analyse the results to decode the characters received. This may require more memory than is available in a 16C84, but would easily fit in a 16C74. A 10MHz device would be able to execute over 2000 instructions in each bit-time for one input, which I think would be adequate. Of course the 16C74 has a hardware UART, so the other three inputs would be done this way. Note that selection of the correct oscillator frequency for the device would simplify the code -- you would want to set the speed so that the clock_period is some nice fraction of 1/1200 sec, i.e. clk_freq = 1200 * 2^n. E.g. for n = 13, clk_freq = 9.8304MHz. This would allow use of TMR0 as the timestamp generator, with very simple analysis of the results. Alternatively, you could get a reasonable clock by using the compare mode of TMR1, which is basically a divide-by-n counter (n = 1..65536). > > 2. Would a newbie be able to produce this level of processing without going > bald or should a Basic Stamp version be used? Yes, PIC is very easy to learn. Sorry, don't know if a basic stamp would be up to the task (of doing 4 inputs at once) but it should do one input no worries. > > 3. Should the comparator/DAC combination be replaced by a PIC with a PWM > output feeding a filtered OpAmp stage? This would certainly be lower parts count. If you could manage the 4 inputs with one PIC16C74, then this would have no externals apart from an RC filter (for smoothing the PWM) and a 4-20mA converter. > > 4. Which development machine could be used economically for a production of > say 10 units? Never done production, so can't help there Regards, SJH Canberra, Australia