Lucian wrote: > Now I have another problem: a 4x5 matrix > keyboard is interfaced to ports A0-A4 (the rows) and when I energize > column 5 (A4) on the PIC 16F628, the keys from the 5th row won't read... > I've read on the datasheet that pin RA4 is open drain, unlike the other > RA pins... Hi. What does "energize" mean ? Setting to "high" or "1" ? Anyway... You are correct thet RA4 is "open drain". (CMOS has nothing to do with this, the whole PIC is built in a CMOS process.) Open drain mean that you can not *drive* anything high with this port. It's like if you had a switch inside the RA4 pin that could either pa "open" (no connection) or "closed" (connected to ground). The other ports has "switches" both to ground and to the the positive supply (only one of them closed at a time, of course). If you look in the data sheet at the drawings of the different ports, you'll see the difference. RA4 has a single N channel FET transistor (the "switch") on the output between Vss and the port pin. Does that make sense ? Jan-Erik. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.