KR20050069345A - Micro-computer and rs-232c transmitting/receiving method the same - Google Patents

Micro-computer and rs-232c transmitting/receiving method the same Download PDF

Info

Publication number
KR20050069345A
KR20050069345A KR1020030101344A KR20030101344A KR20050069345A KR 20050069345 A KR20050069345 A KR 20050069345A KR 1020030101344 A KR1020030101344 A KR 1020030101344A KR 20030101344 A KR20030101344 A KR 20030101344A KR 20050069345 A KR20050069345 A KR 20050069345A
Authority
KR
South Korea
Prior art keywords
gpio
microcomputer
baud rate
transmission
terminal
Prior art date
Application number
KR1020030101344A
Other languages
Korean (ko)
Inventor
이상선
Original Assignee
엘지전자 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 엘지전자 주식회사 filed Critical 엘지전자 주식회사
Priority to KR1020030101344A priority Critical patent/KR20050069345A/en
Publication of KR20050069345A publication Critical patent/KR20050069345A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/24Handling requests for interconnection or transfer for access to input/output bus using interrupt
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • G06F13/4286Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus using a handshaking protocol, e.g. RS232C link

Abstract

별도의 RS-232C 처리장치 없이 내부 구성만으로 RS-232C 처리가 가능하도록 한 마이컴 및 그 RS-232C 송/수신방법에 관한 것으로, 단자중 어느 하나에 송신단(Tx)이 연결된 GPIO(범용 입/출력부), 단자중 어느 하나에 수신단(Rx)이 연결된 인터럽트 핸들러, 그리고 송신단(Tx)이 연결된 GPIO 단자 상태(하이/로우) 제어 및 각 상태제어 단계별 송/수신자간에 약속된 보레이트(Baud-rate)에 따른 지연 삽입을 통해 RS-232C 프로토콜에 따른 송신을 수행하고, 송/수신자간에 약속된 보레이트에 따라 삽입된 지연시간을 참조하여 수신단(Rx)이 연결된 인터럽트 핸들러 단자 상태(하이/로우)를 읽어들여 RS-232C 프로토콜에 따른 수신을 수행하는 CPU를 포함하므로 마이컴의 활용도를 높일 수 있고, RS-232C 기능을 요하는 각 전자제품에 적용이 가능하여 제품 가격을 낮출 수 있다.MICOM and RS-232C transmitting / receiving method which enables RS-232C processing by internal configuration only without separate RS-232C processing device, and GPIO (general purpose input / output) connected to one of the terminals with Tx B), an interrupt handler with a receiving terminal (Rx) connected to one of the terminals, and a GPIO terminal state (high / low) control with a transmitting terminal (Tx) and a baud rate promised between the sender / receiver for each state control step. Transmit according to RS-232C protocol through delay insertion according to the protocol, and read interrupt handler terminal status (high / low) connected to receiver Rx by referring to delay time inserted according to the baud rate promised between transmitter / receiver. Including the CPU to perform the reception according to the RS-232C protocol can increase the utilization of the microcomputer, and can be applied to each electronic product that requires the RS-232C function can lower the product price.

Description

마이컴 및 그 RS-232C 송/수신방법{Micro-Computer and RS-232C Transmitting/Receiving Method the Same}MICOM and its RS-232C Transmitting / Receiving Method {Micro-Computer and RS-232C Transmitting / Receiving Method the Same}

본 발명은 별도의 RS-232C 처리장치 없이 내부 구성만으로 RS-232C 처리가 가능하도록 한 마이크로 컴퓨터(Micro-Computer, 이하 마이컴) 및 그 RS-232C 송/수신방법에 관한 것이다. The present invention relates to a micro-computer (Micro-Computer, hereinafter referred to as a microcomputer) and RS-232C transmitting / receiving method for enabling RS-232C processing by only an internal configuration without a separate RS-232C processing apparatus.

대표적인 비동기 통신 프로토콜 중 하나인 RS-232C가 최근에는 티브이 등 가전기기에도 많이 사용되고 있다.RS-232C, one of the representative asynchronous communication protocols, has recently been used in home appliances such as TVs.

그 사용목적은 티브이 마이컴 프로그래머가 프로그램이 제대로 동작하는지 단계별로 확인하기 위하여 프로그램 사이사이에 프린트 문을 삽입하여 메시지를 호스트로 보내도록 하고, 호스트의 터미널에서 상기 메시지를 받아 볼 수 있도록 하는 디버깅(Debugging) 용도와, 홈씨어터용 또는 호텔용 등의 산업용 티브이에서 여러개의 티브이를 개별 제어하기 위해 리모콘이 아닌 유선으로 제어할 경우를 대비한 용도, 최근 홈 네트웍에서 가전기기 간의 통신을 위한 용도, 공장에서 티브이 생산시 영상 자동조정 및 프로그램 다운로드 등의 용도로 사용하기 위함이다.Its purpose is to enable the TV microcomputer programmer to send a message to the host by inserting a print statement between the programs in order to check step by step whether the program works properly. ) For use in case of controlling by TV, not by remote control to control several TVs individually in industrial TV such as home theater or hotel, and for recent communication between home appliances in home network, in factory This is to use for automatic video adjustment and program download during TV production.

따라서 최근에 시판되는 마이컴의 경우 RS-232C를 하드웨어적으로 내장하고 있으나, 여전히 현재 개발되고 있는 대부분의 마이컴 들은 RS-232C 블록이 없는 형태이다.Therefore, recently commercial microcomputers have built-in RS-232C in hardware, but most of the microcomputers currently being developed do not have the RS-232C block.

즉, 도 1에 도시된 바와 같이, RS-232C 블록이 없는 종래의 마이컴(10)은 해당 제품의 동작 및 통신제어를 위한 CPU(11), GPIO(General Purpose Input/Output)(12) 즉, 범용 입/출력 장치, 인터럽트 루틴 수행을 위한 인터럽트 핸들러(13) 및 주변장치(14)를 포함하여 구성된다.That is, as shown in Figure 1, the conventional microcomputer 10 without the RS-232C block is a CPU 11, GPIO (General Purpose Input / Output) 12 for the operation and communication control of the product, It comprises a general purpose input / output device, an interrupt handler 13 for performing an interrupt routine, and a peripheral device 14.

그러나 시장에서는 RS-232C 대응에 대한 수요가 증가하고 있는 추세이므로 이에 대한 해결책이 요구되고 있다.However, as the demand for RS-232C response is increasing in the market, a solution is required.

특히, 디지털 티브이의 경우 메인 마이컴은 고가의 다기능 칩인 관계로 RS-232C 블록이 내장되어 있지만, 스텐바이 제어를 담당하는 서브 마이컴은 여전히 저가의 마이컴이 사용되고 있다.In particular, in the case of digital TV, since the main microcomputer is an expensive multifunction chip, the RS-232C block is built in, but the submicrocom for standby control is still inexpensive.

따라서 종래의 기술에 따른 마이컴은 RS-232C 블록이 구비되어 있지 않아, RS-232C에 따른 통신이 불가능한 문제가 있다.Therefore, the microcomputer according to the related art does not have an RS-232C block, and thus communication with the RS-232C is impossible.

따라서 본 발명은 상기한 종래의 문제점을 해결하기 위하여 안출한 것으로서, 별도의 RS-232C 처리장치 없이 내부 구성만으로 RS-232C 처리가 가능하도록 한 마이컴 및 그 RS-232C 송/수신방법을 제공함에 그 목적이 있다.Accordingly, the present invention has been made to solve the above-described problems, and provides a microcomputer and RS-232C transmission / reception method thereof capable of RS-232C processing using only an internal configuration without a separate RS-232C processing apparatus. There is a purpose.

본 발명에 따른 마이컴은 단자중 어느 하나에 송신단(Tx)이 연결된 GPIO(범용 입/출력부), 단자중 어느 하나에 수신단(Rx)이 연결된 인터럽트 핸들러, 그리고 송신단(Tx)이 연결된 GPIO 단자 상태(하이/로우) 제어 및 각 상태제어 단계별 송/수신자간에 약속된 보레이트(Baud-rate)에 따른 지연 삽입을 통해 RS-232C 프로토콜에 따른 송신을 수행하고, 송/수신자간에 약속된 보레이트에 따라 삽입된 지연시간을 참조하여 수신단(Rx)이 연결된 인터럽트 핸들러 단자 상태(하이/로우)를 읽어들여 RS-232C 프로토콜에 따른 수신을 수행하는 CPU를 포함함을 특징으로 한다.According to the present invention, a microcomputer has a GPIO (general purpose input / output) connected to one of the terminals (Tx), an interrupt handler connected to one of the terminals (Rx), and a GPIO terminal connected to the transmitter (Tx). Transmit according to RS-232C protocol through (high / low) control and delay insertion according to the baud-rate promised between senders and receivers in each status control, and insert according to the promised baud rates between senders and receivers And a CPU that reads the interrupt handler terminal state (high / low) to which the receiving end Rx is connected with reference to the delay time, and performs reception according to the RS-232C protocol.

본 발명에 따른 마이컴의 RS-232C 송/수신 방법은 송신단(Tx)이 연결된 GPIO 단자 상태(하이/로우)를 제어하여, 시작비트를 생성하고 이를 송/수신자간에 약속된 보레이트(Baud-rate)에 따라 지연시켜 송신을 수행하는 단계, 시작비트 송신후 송신단(Tx)이 연결된 GPIO 단자 상태 제어 및 각 상태 제어단계별 보레이트에 따른 지연을 반복하여 정해진 비트의 데이터 생성 및 송신을 수행하는 단계, 그리고 데이터 송신후 송신단(Tx)이 연결된 GPIO 단자 상태를 제어하여, 정지비트를 생성하고 상기 보레이트에 따라 지연시켜 송신을 완료하는 단계를 포함함을 특징으로 한다.The RS-232C transmission / reception method of the microcomputer according to the present invention controls the state (high / low) of the GPIO terminal to which the transmitter Tx is connected, generates a start bit, and transmits the baud rate to the transmitter / receiver. Performing transmission by delaying according to the delay, repeating the delay according to the baud rate of the GPIO terminal state connected to the transmitter end Tx after the start bit transmission and each state control step, and performing data generation and transmission of a predetermined bit. And controlling the state of the GPIO terminal to which the transmitter Tx is connected after transmission, generating a stop bit, and delaying it according to the baud rate to complete the transmission.

이하, 첨부된 도면을 참조하여 본 발명에 따른 마이컴 및 그 RS-232C 송/수신방법의 바람직한 일실시예를 상세히 설명하면 다음과 같다.Hereinafter, a preferred embodiment of the microcomputer and its RS-232C transmission / reception method according to the present invention will be described in detail with reference to the accompanying drawings.

도 2는 본 발명에 따른 마이컴의 구성을 나타낸 블록도, 도 3은 RS-232C 프로토콜에 따른 신호파형을 나타낸 도면, 도 4는 본 발명에 따른 마이컴의 RS-232C 송신방법을 나타낸 흐름도이고, 도 5는 본 발명에 따른 마이컴의 RS-232C 수신방법을 나타낸 흐름도이다.Figure 2 is a block diagram showing the configuration of a microcomputer according to the present invention, Figure 3 is a signal waveform according to the RS-232C protocol, Figure 4 is a flow chart showing a RS-232C transmission method of the microcomputer according to the present invention, 5 is a flowchart illustrating a method of receiving a microcomputer RS-232C according to the present invention.

본 발명에 따른 마이컴은 도 2에 도시된 바와 같이, 단자중 어느 하나에 송신단(Tx)이 연결된 GPIO(22), 단자중 어느 하나에 수신단(Rx)이 연결된 인터럽트 핸들러(23), 그리고 상기 송신단(Tx)이 연결된 GPIO(22) 단자 상태(하이/로우) 제어 및 각 상태제어 단계별 송/수신자간에 약속된 보레이트(Baud-rate)에 따른 지연 삽입을 통해 RS-232C 프로토콜에 따른 송신을 수행하고, 송/수신자간에 약속된 보레이트에 따라 삽입된 지연시간을 참조하여 상기 수신단(Rx)이 연결된 인터럽트 핸들러(23) 단자 상태(하이/로우)를 읽어들여 RS-232C 프로토콜에 따른 수신을 수행하는 CPU(21)를 포함하여 구성된다.As shown in FIG. 2, the microcomputer according to the present invention has a GPIO 22 having a transmitting end Tx connected to one of the terminals, an interrupt handler 23 having a receiving end Rx connected to one of the terminals, and the transmitting end. It performs transmission according to RS-232C protocol through GPIO 22 terminal status (high / low) control connected with (Tx) and delay insertion according to the baud-rate promised between senders and receivers in each status control step. CPU that reads the state of the interrupt handler 23 terminal (high / low) to which the receiving end Rx is connected with reference to the delay time inserted according to the baud rate promised between the sender / receiver and performs reception according to the RS-232C protocol. It comprises 21.

이와 같이 구성된 본 발명에 따른 마이컴의 RS-232C 송/수신 방법을 상세히 설명하기로 한다.The RS-232C transmission / reception method of the microcomputer according to the present invention configured as described above will be described in detail.

먼저, 본 발명의 설명에 앞서, RS-232C 프로토콜에 따른 신호포멧을 살펴보면, 도 3과 같이, 시작 비트(로우 레벨), 데이터(예를 들어, 1 byte:8 bit), 그리고 정지 비트(하이 레벨)로 이루어진다.First, prior to the description of the present invention, looking at the signal format according to the RS-232C protocol, as shown in Figure 3, the start bit (low level), the data (for example, 1 byte: 8 bit), and the stop bit (high) Level).

- 마이컴의 RS-232C 송신 방법 --How to send microcomputer RS-232C-

본 발명에 따른 마이컴의 RS-232C 송신 방법을 도 4를 참조하여 설명하면 다음과 같다.The RS-232C transmission method of the microcomputer according to the present invention will be described with reference to FIG. 4 as follows.

먼저, 마이컴(20)의 송신단(Tx)이 GPIO(22)에 연결되어 있으므로, CPU(21)가 GPIO(22)의 포트 즉, 송신단(Tx)과 연결된 포트의 상태를 '로우'로 만든다(S41).First, since the transmitting terminal Tx of the microcomputer 20 is connected to the GPIO 22, the CPU 21 makes the state of the port of the GPIO 22, that is, the port connected to the transmitting terminal Tx, 'low' ( S41).

이때 CPU(21)는 먼저, GPIO(22) 포트 방향(출력/입력) 관련 레지스터를 제어하여 GPIO(22) 포트 방향 설정이 가능하고, GPIO(22) 포트 값 관련 레지스터를 제어하여 포트의 상태를 '하이' 또는 '로우'로 만들 수 있다.At this time, the CPU 21 can control the GPIO 22 port direction (output / input) related register first to set the GPIO 22 port direction, and control the GPIO 22 port value related register to control the state of the port. It can be made 'high' or 'low'.

따라서 CPU(21)는 송신을 위해 GPIO(22) 포트 방향(출력/입력) 관련 레지스터를 제어하여 GPIO(22) 포트 방향을 출력으로 설정하고, 도 3의 시작 비트를 생성하기 위해 GPIO(22) 포트 값 관련 레지스터를 제어하여 포트의 상태를 '로우'로 만든다.Therefore, the CPU 21 controls the register related to the GPIO 22 port direction (output / input) for transmission to set the GPIO 22 port direction as the output, and the GPIO 22 to generate the start bit of FIG. Controls port-related registers to make the port state low.

그리고 CPU(21)는 송/수신자간에 미리 약속된 보레이트(Baud-rate)를 맞추기 위해 상기 포트 상태를 지연시킨다(S42).The CPU 21 delays the port state in order to match a baud rate set in advance between the transmitter and the receiver (S42).

이때 상기 지연동작은 CPU(21)가 다음 진행을 하지 않고, 일정한 더미 루프(Dummy Loop)를 회전하는 동작에 의해 이루어진다.In this case, the delay operation is performed by the CPU 21 rotating a predetermined dummy loop without proceeding to the next.

이어서 CPU(21)는 전송할 바이트의 각 비트값을 체크하여(S43), 전송해야할 첫 번째 데이터 비트가 '하이'인지 판단한다(S44). Next, the CPU 21 checks each bit value of the byte to be transmitted (S43), and determines whether the first data bit to be transmitted is 'high' (S44).

상기 판단결과(S44), '하이'이면 상기 GPIO(22) 포트 상태를 '하이'로 만들고, 비트 카운트값을 증가시킨 후(S45), 보레이트를 맞추기 위한 지연동작을 수행한다(S47).As a result of the determination (S44), if the state is 'high', the GPIO 22 port state is made high, and the bit count value is increased (S45), and a delay operation for adjusting the baud rate is performed (S47).

한편, 상기 판단결과(S44), '하이'가 아니면 즉, '로우'이면 상기 GPIO(22) 포트상태를 '로우'로 만들고, 비트 카운트값을 증가시킨 후(S46), 보레이트를 맞추기 위한 지연동작을 수행한다(S47).On the other hand, if the determination result (S44) is not 'high', that is, 'low', the GPIO 22 port state is made low, and the bit count value is increased (S46). The operation is performed (S47).

그리고 비트 카운트값이 '8(1 Byte)' 인지 판단하여(S48), '8'이 아니면 '8'이 될 때까지 상기 단계(S44 ~ S47)를 반복한다.Then, it is determined whether the bit count value is '8 (1 byte)' (S48), and if the value is not '8', the steps S44 to S47 are repeated.

한편, 상기 판단결과(S48), 비트 카운트값이 '8'이면 도 3의 정지 비트를 생성하기 위해 GPIO(22) 포트 값 관련 레지스터를 제어하여 포트의 상태를 '하이'로 만든다(S49).On the other hand, if the bit count value is '8', the determination result (S48) controls the register related to the GPIO 22 port value to generate the stop bit of FIG. 3 to make the port state 'high' (S49).

이어서 보레이트를 맞추기 위한 지연동작을 수행하여(S50), RS-232C 프로토콜에 따른 1 바이트 데이터 송신이 완료된다.Subsequently, a delay operation for adjusting the baud rate is performed (S50), so that one-byte data transmission according to the RS-232C protocol is completed.

- 마이컴의 RS-232C 수신 방법 --How to receive RS-232C from Microcomputer-

본 발명에 따른 마이컴의 RS-232C 수신방법은 도 5를 참조하여 설명하면 다음과 같다.RS-232C receiving method of the microcomputer according to the present invention will be described with reference to FIG.

마이컴(20)의 수신단(Rx)이 인터럽트 핸들러(23)에 연결되어 있다.The receiving end Rx of the microcomputer 20 is connected to the interrupt handler 23.

따라서 수신의 경우, 인터럽트 관련 레지스터를 제어하여 CPU(21) 프로그램이 수신단(Rx)의 에지(Edge) 상태에서 인터럽트 핸들러 루틴으로 점프하도록 설정된다. Therefore, in the case of reception, the interrupt related register is controlled to set the CPU 21 program to jump to the interrupt handler routine in the edge state of the receiving end Rx.

이때 에지 상태는 수신단(Rx)이 '하이'에서 '로우'로 토글(Toggle)되어 시작 비트가 입력된 것을 의미한다.In this case, the edge state means that the receiving end Rx is toggled from 'high' to 'low' so that a start bit is input.

따라서 인터럽트 핸들러 루틴으로 진입과 동시에 데이터 비트가 입력될 때까지 수신 즉, 데이터를 읽어들이는 동작을 지연시킨다(S51).Therefore, at the same time as entering the interrupt handler routine, the operation of delaying the reception, that is, reading the data, is delayed until the data bit is input (S51).

이어서 상기 지연동작 후(S51), 인터럽트 핸들러(23)의 포트 상태(하이/로우)를 읽어들인다(S52).Subsequently, after the delay operation (S51), the port state (high / low) of the interrupt handler 23 is read (S52).

그리고 상기 읽어들인 포트 상태가 '하이'인지 판단하여(S53), 포트 상태가 '하이'이면 '1'로 인식하고 비트 카운트값을 증가시킨 후(S54), 보레이트를 맞추기 위한 지연동작을 수행한다(S56).In operation S53, the read port state is determined to be 'high', and if the port state is 'high', the port is recognized as '1' and the bit count value is increased (S54). (S56).

한편, 상기 판단결과(S53), 포트 상태가 '로우'이면 '0'으로 인식하고 비트 카운트값을 증가시킨 후(S55), 보레이트를 맞추기 위한 지연동작을 수행한다(S56).On the other hand, the determination result (S53), if the port state is 'low' is recognized as '0' and after increasing the bit count value (S55), and performs a delay operation for adjusting the baud rate (S56).

그리고 비트 카운트값이 '8(1 Byte)' 인지 판단하여(S57), '8'이 아니면 '8'이 될 때까지 상기 단계(S52 ~ S56)를 반복한다.Then, it is determined whether the bit count value is '8 (1 byte)' (S57), and if the value is not '8', the steps S52 to S56 are repeated.

한편, 상기 판단결과(S57), 비트 카운트값이 '8'이면, 상기 읽어들인 1 바이트 데이터 처리동작 즉, 저장을 수행하여(S58), 데이터 수신동작을 완료하고 상기 인터럽트 핸들러 루틴에서 빠져나온다.On the other hand, if the bit count value is '8' in the determination result (S57), the read one-byte data processing operation, that is, storing is performed (S58), completes the data receiving operation and exits from the interrupt handler routine.

본 발명에 따른 마이컴 및 그 RS-232C 송/수신 방법은 별도의 RS-232C 하드웨어 블록이 구비되어 있지 않은 마이컴의 경우에도 RS-232C 통신이 가능하다.The microcomputer and its RS-232C transmission / reception method according to the present invention are capable of RS-232C communication even in the case of a microcomputer that does not have a separate RS-232C hardware block.

따라서 마이컴의 활용도를 높일 수 있고, RS-232C 기능을 요하는 각 전자제품에 적용이 가능하여 제품 가격을 낮출 수 있는 효과가 있다. Therefore, it is possible to increase the utilization of the microcomputer and to apply to each electronic product requiring the RS-232C function, thereby reducing the product price.

도 1은 종래의 기술에 따른 마이컴의 구성을 나타낸 블록도1 is a block diagram showing the configuration of a microcomputer according to the prior art

도 2는 본 발명에 따른 마이컴의 구성을 나타낸 블록도2 is a block diagram showing the configuration of a microcomputer according to the present invention;

도 3은 RS-232C 프로토콜에 따른 신호파형을 나타낸 도면3 is a diagram illustrating a signal waveform according to the RS-232C protocol.

도 4는 본 발명에 따른 마이컴의 RS-232C 송신방법을 나타낸 흐름도4 is a flowchart showing a method of transmitting a microcomputer RS-232C according to the present invention.

도 5는 본 발명에 따른 마이컴의 RS-232C 수신방법을 나타낸 흐름도5 is a flowchart showing a method of receiving a microcomputer RS-232C according to the present invention.

- 도면의 주요부분에 대한 부호의 설명 --Explanation of symbols for the main parts of the drawings-

20: 마이컴 21: CPU20: Micom 21: CPU

22: GPIO 23: 인터럽트 핸들러22: GPIO 23: interrupt handler

24: 주변장치24: Peripherals

Claims (5)

단자중 어느 하나에 송신단(Tx)이 연결된 GPIO(범용 입/출력부);A GPIO (general purpose input / output unit) to which a transmission terminal Tx is connected to any one of terminals; 단자중 어느 하나에 수신단(Rx)이 연결된 인터럽트 핸들러; 그리고An interrupt handler having a receiving end Rx connected to any one of terminals; And 상기 송신단(Tx)이 연결된 GPIO 단자 상태(하이/로우) 제어 및 각 상태제어 단계별 송/수신자간에 약속된 보레이트(Baud-rate)에 따른 지연 삽입을 통해 RS-232C 프로토콜에 따른 송신을 수행하고, 송/수신자간에 약속된 보레이트에 따라 삽입된 지연시간을 참조하여 상기 수신단(Rx)이 연결된 인터럽트 핸들러 단자 상태(하이/로우)를 읽어들여 RS-232C 프로토콜에 따른 수신을 수행하는 CPU를 포함하는 마이컴.It performs transmission according to the RS-232C protocol by inserting a delay according to the baud rate promised between the transmitter / receiver for each state control step and the GPIO terminal state (high / low) to which the transmitter Tx is connected, A microcomputer including a CPU that reads the interrupt handler terminal state (high / low) to which the receiving end Rx is connected and performs reception according to the RS-232C protocol by referring to the delay time inserted according to the baud rate promised between the transmitter and the receiver. . 단자중 어느 하나에 송신단(Tx)이 연결된 GPIO(범용 입/출력부) 및 CPU를 갖는 마이컴의 RS-232C 송신방법에 있어서,In the microcomputer RS-232C transmission method having a GPIO (general purpose input / output) and a CPU connected to one of the terminals (Tx), 상기 송신단(Tx)이 연결된 GPIO 단자 상태(하이/로우)를 제어하여, 시작비트를 생성하고 이를 송/수신자간에 약속된 보레이트(Baud-rate)에 따라 지연시켜 송신을 수행하는 단계;Controlling a GPIO terminal state (high / low) to which the transmitting end (Tx) is connected, generating a start bit and delaying it according to the baud rate promised between the sender / receiver to perform transmission; 상기 시작비트 송신후 상기 송신단(Tx)이 연결된 GPIO 단자 상태 제어 및 각 상태 제어단계별 보레이트에 따른 지연을 반복하여 정해진 비트의 데이터 생성 및 송신을 수행하는 단계; 그리고Performing data generation and transmission of a predetermined bit by repeating the GPIO terminal state control to which the transmitter Tx is connected and the delay according to the baud rate for each state control step after transmitting the start bit; And 상기 데이터 송신후 상기 송신단(Tx)이 연결된 GPIO 단자 상태를 제어하여, 정지비트를 생성하고 상기 보레이트에 따라 지연시켜 송신을 완료하는 단계를 포함하는 마이컴의 RS-232C송신방법.And controlling the state of the GPIO terminal to which the transmitting terminal (Tx) is connected after the data transmission, generating a stop bit, and delaying according to the baud rate to complete the transmission. 제2 항에 있어서,The method of claim 2, 상기 GPIO 단자 상태(하이/로우) 제어는 CPU가 GPIO의 포트값 관련 레지스터를 제어하여 이루어짐을 특징으로 하는 마이컴의 RS-232C송신방법.The GPIO terminal state (high / low) control is a microcomputer RS-232C transmission method characterized in that the CPU is controlled by controlling the register of the port value of the GPIO. 제2 항에 있어서,The method of claim 2, 상기 보레이트에 따른 지연은 CPU가 다음 작업을 진행하지 않고 더미 루프를 회전하여 이루어짐을 특징으로 하는 마이컴의 RS-232C송신방법.The delay according to the baud rate is a microcomputer RS-232C transmission method, characterized in that is made by rotating the dummy loop without proceeding to the next operation. 단자중 어느 하나에 수신단(Rx)이 연결된 인터럽트 핸들러 및 CPU를 갖는 마이컴의 RS-232C 수신방법에 있어서,In the method of receiving a microcomputer RS-232C having an interrupt handler and a CPU connected to one of the terminals (Rx), 상기 수신단(Rx)이 연결된 인터럽트 핸들러 단자 상태(하이/로우)에 따라 인터럽트 핸들러 루틴으로 진입하는 단계;Entering an interrupt handler routine according to an interrupt handler terminal state (high / low) to which the receiving end Rx is connected; 시작비트가 입력되면 송/수신자간에 약속된 보레이트(Baud-rate)에 따른 지연동작을 수행하는 단계; 그리고Performing a delay operation according to a baud rate promised between a transmitter and a receiver when a start bit is input; And 상기 지연동작 수행후 상기 수신단(Rx)이 연결된 인터럽트 핸들러 단자 상태를 데이터 비트로 읽어들이고, 다시 상기 보레이트에 따른 지연동작을 수행하는 과정을 모든 데이터비트를 읽어들일 때까지 반복하여 수신을 완료하는 단계를 포함하는 마이컴의 RS-232C 수신방법.After the delay operation is performed, the process of reading the interrupt handler terminal state connected to the receiving terminal Rx as data bits and repeating the delay operation according to the baud rate until all data bits are read is completed. RS-232C reception method of the microcomputer included.
KR1020030101344A 2003-12-31 2003-12-31 Micro-computer and rs-232c transmitting/receiving method the same KR20050069345A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020030101344A KR20050069345A (en) 2003-12-31 2003-12-31 Micro-computer and rs-232c transmitting/receiving method the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020030101344A KR20050069345A (en) 2003-12-31 2003-12-31 Micro-computer and rs-232c transmitting/receiving method the same

Publications (1)

Publication Number Publication Date
KR20050069345A true KR20050069345A (en) 2005-07-05

Family

ID=37259766

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020030101344A KR20050069345A (en) 2003-12-31 2003-12-31 Micro-computer and rs-232c transmitting/receiving method the same

Country Status (1)

Country Link
KR (1) KR20050069345A (en)

Similar Documents

Publication Publication Date Title
US9639499B2 (en) Camera control interface extension bus
US7639765B2 (en) Single-line bidirectional communication apparatus and system
US6263033B1 (en) Baud rate granularity in single clock microcontrollers for serial port transmissions
US6978412B1 (en) Method and apparatus for adaptive frame tracking
KR20050069345A (en) Micro-computer and rs-232c transmitting/receiving method the same
US20200097434A1 (en) Enhanced high data rate technique for i3c
JP2000032000A (en) Infrared communication equipment
CN210405365U (en) Multi-protocol aggregation transmission device and system
TW202022627A (en) Universal serial bus device and operation method thereof
TWI769840B (en) Rs-485 circuit and communication system
US10013304B2 (en) Electrical apparatus, control device and communication method that control communications performed at different communication rates
TWI786890B (en) Rs-485 circuit and communication system
US11463233B2 (en) Unit interval jitter improvement in a C-PHY interface
JPH10290223A (en) Data transmission and reception device
KR100572770B1 (en) Method for improving the speed of synchronous serial communication in which master and slave are fixed
KR0167910B1 (en) Remote data service unit controlling apparatus
TW432826B (en) Method for improving signal transmission and reception of RF remote control
KR100567033B1 (en) Method for operating synchronous serial communication in which master and slave are fixed
KR100555644B1 (en) transmitting/receiving method of bit stream
KR100796860B1 (en) Apparatus and method for transmitting/ receiving information
CN115061968A (en) Interface processor and interface processing system
JP4355983B2 (en) Data transfer method, data transmitting apparatus and data receiving apparatus
CN113473242A (en) Video image transmission method, related system, device and storage medium
CN114443414A (en) Intelligent health management fan control method based on IPMI bus
JPH08272550A (en) Communication control equipment and its method

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E601 Decision to refuse application