Keywords: Category:
 
Two Problems in Using Matrix Key
TIME: 2008-9-25
 
When we use AM4E or AM4F to develop projects, two problems must be noted in using matrix key:
1. If two keys connected to one input port are pressed, short circuit will occur between the two scanning output ports. (Short circuit occurs between two scanning output ports)
2. If three keys connected between two input ports and two output ports are pressed simultaneously, the function of the fourth key will be executed unexpectedly. (The fourth key isn’t pressed, but its function is executed)
 
1. Short circuit occurs between two scanning output ports
See figure 1: When K1 and K2 are pressed at the same time, Out1 and Out2 will be connected. And if out1 is high and out2 is low, the out1 will be pulled low by out2, and in1 will be read incorrectly. 
 
Solution:
a) Set the Non-scan Output port as Input through program control. This solution applies to all ports in AM4F (just change the IO mode from Output to input with Weak Pull High) and all the other ports in AM4E except PRB. If we use EzCode to program, this problem won’t occur since it has been dealt with.
 
b) When the port status cannot be changed, a diode needs to be connected between the output port and the key. This method applies to the PRB of the AM4E, which is masked.
 
 
1.   The fourth key isn’t pressed, but its function is executed
 
See figure 1:
For AM4E, when K1, K2, K3 are pressed at the same time and Out2 is high (Out1: input), In2 will be pulled high because the signal of out2 will go through K2, K1and K3, and finally reach in2. As a result, K4 will be mistakenly judged as being pressed. Then the function of K4 is executed.
 
For AM4F, when K1, K2, K3 are pressed at the same time and Out2 is low (Out1: Weak Pull High), In2 will be pulled low and the function of the k4 is executed.
 
Solution:
a) Only three keys should be used to connect between any two input ports and any two output ports. 
b) Connect a diode for each key if you need the fourth key. See the following figures:
Figure 2 shows the solution for AM4E. When K1, K2, K3 are pressed at the same time, the high level signal of Out2 will go through D3, K2, K1, and then be cut off by D1 (diode).
 
 
Figure 3 shows the solution for AM4F. When K1, K2, K3 are pressed at the same time, the low level signal of Out2 will be cut off by D1, too.
 
 
 
ORIGIN: Z.SL
BACK TO TOP PRINT ADD TO FAVORITE SUBMIT CLOSE
 
>>
 OTHERS
 
·Application Note of Recording Modes (EzCode4...
·Using Midi Background
·How to Use General I/O to Drive LCD?
·The Application of One Key One Note
·Making an LED fan by ALPHA MCU
·Using ALPHA IC in Serial Communication
·Application of the Action Function
·Using AM8EB for I2C Communication
 
>>
 RECOMMENDED
 
·About the Recording Duration of AMSR Series ...
·EzCode4E Solutions
·Application Note of Recording Modes (EzCode4...
·Using Midi Background
·The Control of Silicon Controlled Rectifier
·The Application of One Key One Note
·Portamento Effect in AM4F
 
 

About Us Contact Us Disclaimer


ICP Record : 08035793 Prepared Guangdong ICP