What kind of silicon would you use to solve this problem?
I'm building an LED activity logic block for TTL serial. Inputs are:
INACTIVE: LOW = no link detected, HIGH = link detected
TX / RX: LOW on idle, HIGH/LOW strobe with activity
RTS / CTS: LOW = OK to send, HIGH = flow-control enabled
DTS / DTR: LOW = OK to send, HIGH = flow-control enabled
I will have two bi-color LEDs per port -- one for the TX channel, one for RX. Assume the LEDs are the reverse-parallel 2-pin type. On each channel, the respective flow-control signals will be ANDed together into a signal I'll call FCEN. That is, if both inputs are HIGH, FCEN is HIGH. If either is LOW, FCEN is LOW.
The logic I'm trying to achieve is this:
If INACTIVE is HIGH, LED is off. Otherwise:
If FCEN is LOW, the LED is red. Otherwise:
If TX (or RX) is LOW, the LED is green. If TX (RX) is HIGH, the LED is off.
Essentially, the LED is lit when there's a link, blinks with activity, and stays lit red when flow control is enabled. I've implemented this with four AND gates, two with a single inverting input like so:
/INACTIVE >-------------------+------------------------------------+
| Green |
|\ +---\ | +---\ +--|>|--+ /---+ |
TX/RX >---| )o--| \ +-| \ 470R | \\ | / |--+
|/ | |--+ | |--/\/\--+ +--( |
+--| / +---| / | \\ | \ |--+
| +---/ +---/ +--|<|--+ \---+ |
| Red |
+------+ |
| |
+---\ | |
/RTS >----| \ | |\ |
| |--+----------------------------------| )o-----+
/DTR >----| / |/
+---/
There's a cheap configurable logic IC with three inputs, that can be an AND gate, or an AND gate with one inverted input, meaning I can do the above with 4 of these ICs per channel. Two channels per port. Times 8 ports, plus one management port. That's a grand total of 72 IC's -- quite a lot for some blinky lights. They're cheap, at $0.40 apiece at qty-1, but still... That's a lot of ICs, and a lot of traces.
Is there something on the market that would combine four or eight of these into one package? I'm starting to look at cheap micros, but that seems like a sledgehammer solution. On the other hand, it's simple, would allow configurable behavior, and I could replace 8 logic ICs with an ATtiny or something for the same price or less, and assuming onboard osc, using no external parts beyond decoupling caps (which I would use anyway.)