Claims (2)
접점 키이를 사용한 키이스캔시스템에 있어서, 마이콤(32)의 입력포트(I0 - I7)에 저항(R1 - R8)을 연결하고, 키이선택시 상기 입력포트(I0 - I7)중 2라인과 전원(B-)측이 동시접속되게 구성하여 된 것을 특징으로 하는 입출력포트 절감형 키이스켄회로.In the case scan system using a contact key, the resistors R1-R8 are connected to the input ports I0-I7 of the microcomputer 32, and when the key is selected, two lines of the input ports I0-I7 and the power supply ( B -) side is reduced input and output ports, it characterized in that a simultaneous access to be configurable Keith Ken circuit.
키이번호 가산데이타(SUM)를 초기화한후 포트수를 감산하여 포트수데이타(ADD)에 저장한 상태에서 포트데이타를 저장하고(102), 상기 포트데이타의 짝수, 홀수를 판별하여(104), 짝수로 되면 상기 가산데이터(SUM)와 포트수데이타(ADD)를 가산연산하여 가산데이타(SUM)로 처리하고(1O5), 상기 포트수데이타(ADD)를 감산한후 상기 포트데이타를 좌로 1비트 쉬프트하여 상키 판별과정(104)을 반복수행하며, 포트데이타가 홀수로되면 이를 좌로 1비트 쉬프트하여 최하위자리 비트를 제거한후(108) 다시 좌로 1비트 쉬프트하여 2번째 포트선택비트를 점검하고(109), 키이수를 증가하여 상기 포트데이타가 “0”으로 될때까지 상기 쉬프트 과정(109) 부터 반복수행하고, 상기 포트데이타가 “0”으로되면 상기 키이번호와 가산데이타(SUM)를 가산연산하여 키이번호로 지정하는 것을 특징으로 하는 입출력포트 절감형 키이스캔방법.After initializing the keyed number addition data SUM, the number of ports is subtracted and stored in the port number data ADD, and the port data is stored (102), and the even and odd numbers of the port data are determined (104). If the number is even, the addition data SUM and the port number data ADD are added and processed as addition data SUM (105). The port number data ADD is subtracted, and then the port data is left 1 bit. Shifting repeats the process of determining the top key, and if the port data becomes odd, shifts it 1 bit to the left to remove the least significant bit (108) and then shifts it to the left 1 bit again to check the second port selection bit (109). ), The number of keys is increased to repeat the shift process 109 until the port data becomes "0". When the port data becomes "0", the key number and the sum data (SUM) are added and calculated. Specified by key number O Port-saving way Keith cans that feature.
※ 참고사항 : 최초출원 내용에 의하여 공개하는 것임.※ Note: The disclosure is based on the initial application.