This "challenge" covers the provision of an 8 bit output port driven by a single optically coupled digital output line. Constraints such as lowest cost and PCB area add interest to the requirement. I have to produce 4 to 8 digital output lines from an RS232 level "RTS" output. (At least 4 outputs required - more would be useful). The so called RTS line is in fact a general purpose digital output line. The client requires the line (and an accompanying RS232 serial data line) to be optoisolated from the target - mainly to prevent the equipment acting as an earth path for the heavy currents drawn by the target equipment. The final product (which has a other functions not relevant to this "challenge") mounts inside a VHF R/T (radio telephone) immediately above the BNC RF aerial connector. This doesn't seem to pose excessive problems in prior versions of the application. Present final volume is moderate (hundreds) BUT there is a prospect for a very large volume follow up (100k?). Data transfer rate is not critical. Probably a data word sent in 10 to 100 ms when required would suffice. Faster is acceptable. Operation from 5 volts. CMOS (wimpy) output drive levels OK. Key design constraints are - lowest cost - smallest PCB area (within reason). - Doesn't affect R/T operation - works The obvious solution is a UART. All that I have found fail the cost requirement substantially when compared with alternatives. The next most obvious is a single chip microprocessor. These too seem too dear for the task. Even a 12C508 or 16C505 are far dearer than hardware alternatives ($US1+)(Z8PExxx down to about $US0.90). The need for programming adds slightly to the cost. Other brands seem hard pressed to get under about $US1. Some of the more exotic Asian 4 bitters would probably halve this. The anguish of pursuing this path MAY be justified for the 100K solution, maybe. Using the data line plus the accompanying RS232 line and implementing IIC could be a solution. Circuitry to prevent the RS232 line burbling during this time would add to complexity. (A matching return pair of optically isolated data and control lines is present. It had not been expected that these would be used in the output solution but this is a possibility. If so, their existing functionality would have to remain. (RS232 RX and 1 digital input). The current "winner" is a CD4094 serial to parallel shift register plus 3 CD40106 inverters (half a pkg) plus a few R's and C's to derive clock, data and latch signals from a single serial line. Positive going pulses are sent from the controller. Pulses over a certain duration are seen as 1's, less than this are 0's. (0 = nominal 1 ms high, 1 = nominal 3 ms high. Barn door accuracy timing easily separates these. In practice 0's may be much shorter if desired. As the data feed is interrupt driven these timings would be used. Cessation of data for more than a certain period (say 10 ms) results in latching of the data sent. ICs would be SOIC pkgs. Smaller not really needed. The spare inverters will be used in other circuitry. Parts cost is about $US0.40 (4094 + 40106/2 + glue). This solution could be improved for the digital purists by using a local clock and gated timing to replace the nasty analogue delays at the probable expense of several extra ICs. Any better ideas? Russell McMahon -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body