This one has taken me a better part of the day to figure out, and hoping=20 someone here can help me. I'll try to be brief by putting in only the=20 necessary parts, but feel free to ask for any other details needed. First, I have an app using an 16F872. It's basically a digital clock wit= h a=20 5-column 7-seg display. 4 other I/O's -- one pushbutton switch, 2 extern= al=20 switched signals (connected via transistor switches), and one output to a= =20 buzzer. There are a few issues ... (1) The F872 and the LED display won't fit properly in the given board sp= ace. =20 The board is non-rectangular, so I have room for an equal area of smaller= =20 parts (and I state this for a reason). (2) Poor accuracy with a 5.120 Mhz crystal oscillator. It gains a few mi= nutes=20 every 12 hours. (3) I need to reduce the power consumption. It needs to be in HS mode fo= r the=20 5.120Mhz crystal. Thoughts/ideas I've come up with so far... (1) Replacing the 16F872 with both a 16F628 and 12F629 will fit on the bo= ard. =20 The F628 will use the internal oscillator for driving the display and swi= tch=20 checking, and a secondary oscillator with 32.768khz crystal on Timer1 for= =20 keeping accurate time. The ckt can sleep as needed to save power, since = the=20 display will be blank quite a lot. The 12F629 will run off it's own inte= rnal=20 oscillator just drive the LED columns. It can be configured as a sequenc= er,=20 shift-register, or (my preference) a 3-line to 5-line decoder. Also, I c= an=20 save power on this by letting the display-blanking input signal also cont= rol=20 the power to this device.Price of both chips happens to be 3 cents *less*= =20 than the 16F872. (2) Instead of the 12F629, since I have 3 lines on the F628 to drive the = 5=20 display columns, I thought of a way to multiplex these lines using=20 transistors. I'd need 5 transistors anyway, but this way it would be=20 configured differently, so no additional transistors needed. For 2 digit= s,=20 one output would be used in this manner... - PIC output 1 to a resistor to Q1 base (NPN). Emitter to ground, Collec= tor=20 to common cathode of digit 1. - PIC output 1 (the same output) to another resistor to Q2 base (PNP this= =20 time). Emitter to common cathode of digit 2, collector to ground. Output-high would make digit 1 active, output-low makes digit 2 active, a= nd=20 floating (PIC pin switched as an input) would (should?) leave them both=20 inactive. Another PIC output would handle 2 other digits in a similar=20 fashion, and the third PIC output would directly drive the 5th LED column= =2E I've just mocked it up on a breadboard with a 2N4401, 2N4403, 2 LED's and= some=20 resistors, but can't get this to work. Anyone have a clue what I'm missi= ng=20 here? Or how I can achieve the same result using mosfets perhaps? (3) My third thought is to multiplex the input signals using a comparator= =20 built into the F628. I can put the transistors in "series" across the po= wer=20 rails with resistors between the C and E of each. With careful planning,= I=20 should be able to get a reliable set of input voltages that would indicat= e=20 which switch/signals are on/off. However, the problem with this (on pape= r=20 still) is that I've got to control the comparator voltages which means us= ing=20 the internal Vref. The only mode that I see from the datasheet that allo= ws=20 the internal Vref to feed the comparators, also makes 4 ports analog inpu= ts. =20 If I set only one of these as an input, and the other 3 as outputs, will = they=20 function as full digital outputs? There's got to be a way in here somewhere. Cheers, -Neil. -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics