Rene, I have been searching the datasheet of the LPC1768 with a fine comb.
Chapter 12 shows the ADC electrical characteristics. It show a parameter called Rvsi.
This is the actual input impedance of the ADC and is about 7.5 kOhm
In electrical terms you will get the following schematic:
Rvsi is fixed and about 7.5 kOhm.
R1 is the value of any resistor(s) between 5 volts (or 3.3 Volts) and the ADC input. The resistors in the keyboard matrix will form a variable resistance (R1) (depending on which key is pressed) and act as a voltage divider with Rvsi and will vary with the keys pressed.
If (just as an example) the keys in the matrix will add up to 3 kOhm and the supply voltage is 3.3 Volt
the voltage fed to the ADC will be 7.5/(3+7.5) = 2,36 Volt.
It means that you will have to drive this input with a voltage source of at least a factor 10 smaller, meaning a 750 Ohm. That will almost force you to use an OpAmp to buffer the voltages from the keyboard, or use a capacitor at the ADC input pin to "buffer" the voltages. This capacitor has a low internal resistance and should be large enough to hold the voltage level and small enough to follow quick key presses.
Just try a C-value of 100 nF as a starter to see what happens...
Regards, Willem
I want to reduce the # of pins needed to detect keys presses from 4x3 and 4x4 keypads with 4 rows and 3 or 4 columns. On input K1 a 7 or 8 pin keypad is connected while on output K2 the pins are 1:GND; 2:Analog input pin with open collector; 3: Vout. The capacitor is used for debouncing and creates a R*C of about 50ms. The complete circuit fits on a 10x20mm PCB using SMDs.
What do you think about it? Is 22k resistor good enough to pull a pin up or down?