KR900002629B1 - Apparatus and method for reading switch settings in micom - Google Patents
Apparatus and method for reading switch settings in micom Download PDFInfo
- Publication number
- KR900002629B1 KR900002629B1 KR1019870011395A KR870011395A KR900002629B1 KR 900002629 B1 KR900002629 B1 KR 900002629B1 KR 1019870011395 A KR1019870011395 A KR 1019870011395A KR 870011395 A KR870011395 A KR 870011395A KR 900002629 B1 KR900002629 B1 KR 900002629B1
- Authority
- KR
- South Korea
- Prior art keywords
- switches
- microcomputer
- bit
- shift
- setting values
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
Abstract
Description
제 1 도는 본 발명에 따른 시스템도.1 is a system diagram according to the present invention.
제 2 도는 본 발명의 흐름도.2 is a flow chart of the present invention.
* 도면의 주요부분에 대한 부호의 설명* Explanation of symbols for main parts of the drawings
100 : 마이크로컴퓨터 201-203 : 레지스터회로100: microcomputer 201-203: register circuit
SW1-SW24 : 스위치 R1-R24 : 저항SW1-SW24: Switch R1-R24: Resistance
본 발명은 마이크로컴퓨터를 이용한 컴퓨터나 프린터 시스템에 관한 것으로 특히 시스템의 작동모드를 선택하는 스위치들의 세팅값을 읽어들이는 장치 및 방법에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a computer or printer system using a microcomputer, and more particularly, to an apparatus and method for reading setting values of switches for selecting an operation mode of a system.
통상적으로 컴퓨터(Computer)나 프린터(Printer)장치를 설계할 때에는 시스템이 작동하는 모드(Mode)나 여러 옵션(Option)장치들을 설치 작동시키는데 있어서 모든 선택에 스위치를 이용하고 있다. 이때 운용자가 원하는 모드의 스위치를 세팅해 놓으면 컴퓨터나 프린터시스템은 그 스위치의 세팅값을 읽어들여 그 모드에 해당하는 소프트웨어(Soft ware)를 사용 시스템을 작동한다.In general, when designing a computer or a printer device, a switch is used for all selections in the mode in which the system operates or in the operation of various option devices. At this time, if the operator sets the desired mode switch, the computer or printer system reads the setting value of the switch and uses the software corresponding to the mode to operate the system.
그러나 종래의 마이크로컴퓨터를 응용하는 시스템은 스위치 세팅값을 읽어들이기 위하여 병렬 인터페이스(Interface) 입출력 칩을 이용 직접스위치의 세팅값을 읽어들이는 방법과 입출력포트와 메모리 어드레스 구간중의 일부를 할당하여 어드레스 디코딩 방식에 따라 읽어들이는 방법이 있으나 상기와 같이 스위치 세팅값을 읽어들이는 방법에는 전원공급시(Power-on time)에 한번 읽어들이면 전원차단시(Power-off time)까지 다시 읽어들일 필요가 없기 때문에 값비싼 입출력 칩을 사용 직접 입출력단자들과 스위치들을 1 : 1로 대응시켜 읽어들이는 것은 원가상승 및 자원의 낭비를 초래하는 문제점과 어드레스 디코딩을 행함으로 많은 메모리를 필요로 하는 시스템에서는 메모리맵 설계상의 제약조건이 되는 문제점이 있었다.However, a system using a conventional microcomputer uses a parallel interface I / O chip to read a switch's setting value directly by using a parallel interface I / O chip, and allocates a portion of an input / output port and a memory address section. There is a method of reading according to the decoding method, but the method of reading the switch setting value as described above does not need to read again until the power-off time when it is read once at power-on time. Using expensive I / O chips, the direct readout of I / O terminals and switches in a one-to-one correspondence can cause cost increases and waste of resources and address decoding. There is a problem that becomes a constraint on the map design.
따라서 본 발명의 목적은 마이크로컴퓨터의 입출력포트중 3개의 입출력포트핀을 이용하여 스위치의 세팅값을 읽어들일 수 있는 장치 및 방법을 제공함에 있다.Accordingly, an object of the present invention is to provide an apparatus and method for reading a setting value of a switch using three input / output port pins of an input / output port of a microcomputer.
이하 본 발명을 첨부한 도면을 참조하여 상세히 설명한다.Hereinafter, the present invention will be described in detail with reference to the accompanying drawings.
제 1 도는 발명에 따른 시스템도로서 100은 마이크로컴퓨터, 201-203은 레지스터회로, SW1-SW24는 스위치, R1-R24는 저항이며, 작동모드를 선택하기 위한 다수의 스위치(SW1-SW24)와, 시스템을 제어하기 위한 클럭펄스와 로오드 및 쉬프트신호를 각각 발생하여 상기 스위치들(SW1-SW24)의 세팅값을 1개씩 순차적으로 읽어들이는 마이크로컴퓨터(100)와, 상기 로오드 및 쉬프트신호를 병렬로오드 및 쉬프트단자로 클럭펄스를 클럭단자로 입력하여 상기 로오드 및 쉬프트신호에 의해 다수의 병렬입력단자에 각각 접속된 다수의 스위치(SW1-SW24)의 세팅값을 로오드한 후 쉬프트모드로 전환 상기 클럭펄스에 의해 한비트씩 쉬프트하므로서 스위치의 세팅값은 마이크로컴퓨터(100)로 출력하는 종속접속된 다수의 제 1-3 레지스터회로(201-203)들로 구성된다.1 is a system diagram according to the invention, 100 is a microcomputer, 201-203 is a register circuit, SW1-SW24 is a switch, R1-R24 is a resistor, a plurality of switches (SW1-SW24) for selecting an operation mode, The
제 2 도는 본 발명의 흐름도로서 마이크로컴퓨터(100)에서 로오드 및 쉬프트신호를 발생하므로서 다수의 스위치(SW1-SW24)의 세팅값을 제 1-3 레지스터(201-203)의 다수 비트에 각각 저장하는 제 1 단계와, 상기 마이크로컴퓨터(100)는 다시 쉬프트신호를 발생하여 제 1- 제 3 레지스터회로(201-203)들을 쉬프트모드로 전환함과 동시에 마이크로컴퓨터(100)내에 있는 카운트의 계수를 다수의 스위치(SW1-SW24)수로 같게 카운팅하는 제 2 단계와, 마이크로컴퓨터(100)로 하여금 클럭펄스들을 발생 제 1-3 레지스트회로(201-203)에 저장된 다수의 스위치(SW1-SW24)의 세팅값을 1비트씩 쉬프트하여 1비트의 데이터를 순차적으로 읽어들이고 1비트의 데이터를 읽어들일 때마다 카운터의 계수를 "1"씩 감산하므로 카운터의 계수가 "0'가 될때까지 반복 수행하여 스위치(SW1-SW24)들의 세팅값을 읽어들이는 제 3 단계와, 제 3 단계중 카운터의 계수가 "0"일시 리드(READ)동작을 종료하게 되는 제 4 단계로 이루어진다.FIG. 2 is a flow chart of the present invention, which generates the load and shift signals in the
따라서 본 발명을 상기 제 1 제 2 도를 참조하여 상세히 설명한다. 먼저 발명의 시스템중 마이크로컴퓨터(100)는 입출력 병렬 인터페이스회로와 입출력포트(Port)를 구비하고 있음을 명시해 둔다.Accordingly, the present invention will be described in detail with reference to the first and second drawings. First, it is noted that the
최초 운용자가 다수의 스위치(SW1-SW24)중 소정스위치(SW1)를 선택조작하였다면 상기 소정 스위치(SW1)는 온(ON)되어 저항(R1)을 통해 공급되는 제 1 전원(VCC)를 제 2 전원(GND)와 도통하여 라인(4) 상에 로우(Low)상태를 유지하게되며 오프(OFF)상태로 남아 있게되면 상기 저항(R1)을 통해 라인(4)에 공급되는 제 1 전원(VCC)와 제 2 전원(GND)는 단락되어 라인(4)상에 하이(High)상태를 발생함으로서 모든작동을 실행케한다.If the first operator selects the predetermined switch SW1 among the plurality of switches SW1-SW24, the predetermined switch SW1 is turned on to supply the first power VCC supplied through the resistor R1 to the second power supply. The first power source VCC supplied to the line 4 through the resistor R1 is maintained in the low state on the line 4 in conduction with the power source GND. ) And the second power supply GND are short-circuited to generate a high state on the line 4 to perform all operations.
그리고 다른스위치(SW2-SW24)들로 상기 스위치(SW1)과 같이 동작한다.The other switches SW2-SW24 operate as the switches SW1.
상기와 같이 동작하는 스위치들(SW1-SW24)중의 어느하나를 선택하여 모든 작동을 운용자가 입력하였을 경우 마이크로컴퓨터(100)는 출력단자(P1)를 통해 라인(1)상에 로오드신호를 발생 출력한다. 상기 라인(1)상의 로오드신호를 로오드 및 쉬프트단자로 입력하는 제 1-3 레지스터회로(201-203)들은 상기 로오드신호에 의해 다수의 병렬 입력단자(PD0-PD23)에 각각 접속된 다수의 스위치(SW1-SW24)의 세팅값을 내부의 다수비트에 각각 로오딩하므로서 저장한다.When the operator inputs all the operations by selecting any one of the switches SW1-SW24 operating as described above, the
이때 마이크로컴퓨터(100)는 다시 출력단자(P1)을 통해 라인(1)상에 쉬프트신호를 발생 출력함과 동시에 자체내에 있는 카운터의 계수를 스위치(SW1-SW24)들의 수량과 같게 카운팅한다. 상기 라인(1)상의 쉬프트신호를 로오드 및 쉬프트단자로 입력하는 제 1-3 레지스트회로(201-203)들은 쉬프트모드로 전환한다.At this time, the
상기와 같이 카운터의 계수를 스위치(SW1-SW24)들의 수량과 같게하고 제 1-3 레지스터회로(201-203)들을 쉬프트모드로 한후 마이크로컴퓨터(100)는 클럭펄스를 출력단자(P2)를 통해 라인(2)상에 발생출력한다.As described above, the counter count is equal to the number of switches SW1-SW24 and the first to third register circuits 201-203 are shifted, and then the
그러면 상기 라인(2)상의 클럭펄스를 클럭단자로 입력하는 제 1-3 레지스터회로(201-203)들은 다수의 비트에 저장한 스위치(SW1-SW24)들의 세팅값을 한비트씩 쉬프트하여 제 3 레지스트회로(203)는 스위치(SW17)의 세팅값을 직렬 출력단자를 통해 출력하고 제 2 레지스터회로(202)는 상기 스위치(SW17)의 세팅값을 직렬입력단자로 입력함과 동시에 스위치(SW9)의 세팅값을 직렬출력 단자를 통해 출력하며 또한 제 1 레지스터회로(201)도 상기 스위치(SW9)의 세팅값을 직렬인력단자로 입력함과 동시에 스위치(SW1)의 세팅값을 직렬출력 단자를 통해 라인(3)상으로 출력한다.Then, the first to
상기 라인(3)상의 스위치(SW1)의 세팅값을 입력단자(P0)로 입력하는 마이크로컴퓨터(100)는 상기 스위치(SW1)의 세팅값을 읽어들여 자체내에 있는 버퍼에 저장하고 카운터의 계수를 "1"만큼 감산하며 카운터의 계수가 "0"이 될때까지 클럭펄스를 출력단자(P2)를 통해 라인(2)상으로 출력하여 스위치(SW2-SW24)들의 세팅값을 순차적으로 순차적으로 한비트씩 읽어들여 버퍼에 저장한다.The
그리고 마이크로컴퓨터(100)는 카운터의 계수가 "0"되면 클럭 펄스의 발생을 중지하여 리드(Read)동작을 종료하게 된다.When the counter count is 0, the
따라서 본 발명은 입출력포트의 3개의 핀(Pin)만을 사용하여 다수의 스위치(SW1-SW24)의 세팅값을 읽어들임으로 효율적인 입출력포트의 사용과 설계를 행할 수 있는 이점과 또한 메모리내에 어드레스공간을 할당하지 않으므로 어드레스공간의 활용영역을 넓힐 수 있는 이점이 있다.Accordingly, the present invention provides an advantage of efficient use and design of the I / O port by reading the setting values of the plurality of switches SW1-SW24 using only three pins of the I / O port, and also provides an address space in the memory. Since there is no allocation, there is an advantage that the utilization area of the address space can be expanded.
Claims (2)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1019870011395A KR900002629B1 (en) | 1987-10-14 | 1987-10-14 | Apparatus and method for reading switch settings in micom |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1019870011395A KR900002629B1 (en) | 1987-10-14 | 1987-10-14 | Apparatus and method for reading switch settings in micom |
Publications (2)
Publication Number | Publication Date |
---|---|
KR890007167A KR890007167A (en) | 1989-06-19 |
KR900002629B1 true KR900002629B1 (en) | 1990-04-21 |
Family
ID=19265167
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1019870011395A KR900002629B1 (en) | 1987-10-14 | 1987-10-14 | Apparatus and method for reading switch settings in micom |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR900002629B1 (en) |
-
1987
- 1987-10-14 KR KR1019870011395A patent/KR900002629B1/en not_active IP Right Cessation
Also Published As
Publication number | Publication date |
---|---|
KR890007167A (en) | 1989-06-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5111079A (en) | Power reduction circuit for programmable logic device | |
US6614259B2 (en) | Configuration memory integrated circuit | |
US6066961A (en) | Individually accessible macrocell | |
US5455923A (en) | Memory system for loading peripherals on power up | |
US5726584A (en) | Virtual high density programmable integrated circuit having addressable shared memory cells | |
US10971237B2 (en) | Semiconductor device | |
US5349670A (en) | Integrated circuit programmable sequencing element apparatus | |
JPH0668732B2 (en) | Sukiyan method for information processing equipment | |
KR960042749A (en) | Programmable binary / interleaved sequence counters | |
US6839783B2 (en) | Programmable state machine interface | |
KR900002629B1 (en) | Apparatus and method for reading switch settings in micom | |
JP2578144B2 (en) | Parallel data port selection method and device | |
EP0254479A2 (en) | Integrated circuit programmable sequencing element apparatus and associated method | |
KR100207511B1 (en) | Method for setting up test mode in semiconductor chip | |
US5850509A (en) | Circuitry for propagating test mode signals associated with a memory array | |
JPS59112334A (en) | Sequence generator | |
KR0121940B1 (en) | Circuit for outputting two-output data of the boundary-scan | |
KR100186320B1 (en) | Dual mode counter | |
JP2546920B2 (en) | Integrated circuit | |
KR200148658Y1 (en) | A circuit selecting input/output card of plc | |
KR0164128B1 (en) | Multi-waiting state for low speed peripheral equipment | |
KR900002433B1 (en) | Circuit of the beginning of a period of automatic of liquid crystal controller | |
JP3117984B2 (en) | Semiconductor nonvolatile memory device | |
KR950010565B1 (en) | Video ram with block selection function | |
JP3281898B2 (en) | Memory mounted semiconductor device and memory test method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
G160 | Decision to publish patent application | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant | ||
FPAY | Annual fee payment |
Payment date: 20030328 Year of fee payment: 14 |
|
LAPS | Lapse due to unpaid annual fee |