RU2683615C1 - Interface identification method and terminal - Google Patents

Interface identification method and terminal Download PDF

Info

Publication number
RU2683615C1
RU2683615C1 RU2017137241A RU2017137241A RU2683615C1 RU 2683615 C1 RU2683615 C1 RU 2683615C1 RU 2017137241 A RU2017137241 A RU 2017137241A RU 2017137241 A RU2017137241 A RU 2017137241A RU 2683615 C1 RU2683615 C1 RU 2683615C1
Authority
RU
Russia
Prior art keywords
terminal
connector
interface
signal level
usb interface
Prior art date
Application number
RU2017137241A
Other languages
Russian (ru)
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 ЗетТиИ Корпорейшн
Application granted granted Critical
Publication of RU2683615C1 publication Critical patent/RU2683615C1/en

Links

Images

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/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • 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/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • G06F13/4072Drivers or receivers
    • G06F13/4077Precharging or discharging

Abstract

FIELD: computer equipment.SUBSTANCE: invention relates to the field of computer equipment. Method comprises: control of the signal level value on the first contact of the external interface connector of the universal serial bus; the definition, whether adopted the first connector terminal a signal power supply of the first predetermined voltage in accordance with said value of the signal level; if the first contact of the connector receives a power signal, the device that is externally connected to the terminal is the first device; and if the power supply signal is not received on the first contact of the connector, the signal level value on the second contact of the connector is received; if the power supply signal is not received at the first contact of the connector, the signal level at the second contact of the external USB interface connector is obtained; determine whether the received signal level value on the second connector pin is less than the first preset value; and if the signal strength value on the second pin of the connector is less than the first preset value, determining that the device externally connected to the terminal is the second device.EFFECT: elimination of interface damage due to large differences in signal level during manual switching.9 cl, 7 dwg, 4 tbl

Description

Область техникиTechnical field

[0001] Настоящее изобретение относится к области техники связи, но без ограничения только этой областью, а именно, настоящее изобретение относится к способу идентификации интерфейса и к соответствующему терминалу.[0001] The present invention relates to the field of communication technology, but without limitation only to this area, namely, the present invention relates to a method for identifying an interface and to a corresponding terminal.

Предпосылки создания изобретенияBACKGROUND OF THE INVENTION

[0002] На панели устройств связи, как правило, устанавливают интерфейс универсальной последовательной шины (Universal Serial Bus, USB) и интерфейс RS232, при этом USB-интерфейс может быть гнездовым или штыревым. USB-интерфейс, как правило, применяют для конфигурирования передачи данных, а интерфейс RS232 обычно применяют для технического обслуживания устройств связи. В настоящее время степень интеграции устройств связи является очень высокой и становится все выше, при этом при разработке панелей оборудования связи стремятся уменьшить их габариты. В общем случае, поскольку размеры панели ограничены, в устройствах связи устанавливают только один интерфейс, USB или RS232, что ведет к снижению удобства при использовании и техническом обслуживании устройств связи.[0002] As a rule, a universal serial bus interface (Universal Serial Bus, USB) and an RS232 interface are installed on the communication device panel, and the USB interface can be either female or male. The USB interface is usually used to configure data transfer, and the RS232 interface is usually used for maintenance of communication devices. At present, the degree of integration of communication devices is very high and is becoming higher, while in the development of panels of communication equipment they seek to reduce their size. In the general case, since the panel dimensions are limited, only one interface, USB or RS232, is installed in communication devices, which leads to a decrease in the usability and maintenance of communication devices.

[0003] Приведенное выше описание предназначено для более глубокого понимания технического решения, предложенного настоящим изобретением, и при этом нужно понимать, что приведенное выше описание не обязательно соответствует известному уровню развития техники.[0003] The above description is intended to better understand the technical solution proposed by the present invention, and it should be understood that the above description does not necessarily correspond to the prior art.

Сущность изобретенияSUMMARY OF THE INVENTION

[0004] Ниже будет кратко описано настоящее изобретение, более подробное описание которого приведено далее, при этом изложенное краткое описание не ограничивает объем изобретения.[0004] The present invention will be briefly described below, a more detailed description of which is given below, while the above brief description does not limit the scope of the invention.

[0005] В настоящем изобретении предложен способ идентификации интерфейса и соответствующий терминал для реализации автоматического переключения между интерфейсом USB и интерфейсом RS232, которые также позволяют исключить повреждение интерфейса при его ручной идентификации.[0005] The present invention provides a method for identifying an interface and a corresponding terminal for realizing automatic switching between a USB interface and an RS232 interface, which also makes it possible to eliminate damage to the interface during manual identification.

[0006] В одном из вариантов осуществления настоящего изобретения предложен способ идентификации интерфейса. Способ включает шаги, описанные ниже.[0006] In one embodiment of the present invention, a method for identifying an interface is provided. The method includes the steps described below.

[0007] Контролируют значение уровня сигнала на первом контакте разъема внешнего интерфейса универсальной последовательной шины (USB) терминала.[0007] The signal level value is monitored at the first terminal pin of the universal serial bus (USB) terminal external interface connector.

[0008] Определяют, принят ли на первом контакте разъема сигнал электропитания первого заранее заданного напряжения в соответствии с упомянутым значением уровня сигнала.[0008] It is determined whether the power signal of the first predetermined voltage is received at the first terminal of the connector in accordance with said signal level value.

[0009] Если на первом контакте разъема принят сигнал электропитания, определяют, что устройство, внешне подключенное к терминалу, является первым устройством, а первый интерфейс в терминале, который соответствует первому устройству, электрически связывают с внешним USB-интерфейсом.[0009] If a power signal is received at the first terminal of the connector, it is determined that the device externally connected to the terminal is the first device, and the first interface in the terminal, which corresponds to the first device, is electrically connected to an external USB interface.

[0010] Если на первом контакте разъема сигнал электропитания не принят, получают значение уровня сигнала на втором контакте разъема внешнего USB-интерфейса, и когда определено, что устройство, внешне подключенное к терминалу, является вторым устройством, в соответствии со значением уровня сигнала на втором контакте разъема, второй интерфейс в терминале, который соответствует второму устройству, электрически связывают с внешним USB-интерфейсом.[0010] If the power signal is not received at the first terminal of the connector, a signal level value is obtained at the second terminal of the external USB interface connector, and when it is determined that the device externally connected to the terminal is a second device, in accordance with the signal level at the second the connector pin, the second interface in the terminal, which corresponds to the second device, is electrically connected to an external USB interface.

[0011] В соответствии с одним из примеров осуществления настоящего изобретения описанный выше шаг: «если на первом контакте разъема сигнал электропитания не принят, получают значение уровня сигнала на втором контакте разъема внешнего USB-интерфейса, и когда определено, что устройство, внешне подключенное к терминалу, является вторым устройством, в соответствии со значением уровня сигнала на втором контакте разъема, второй интерфейс в терминале, который соответствует второму устройству, электрически связывают с внешним USB-интерфейсом» может включать следующие шаги:[0011] In accordance with one embodiment of the present invention, the step described above: “if no power signal is received at the first terminal of the connector, a signal level value is obtained at the second terminal of the external USB interface connector, and when it is determined that the device is externally connected to the terminal is the second device, in accordance with the signal level value on the second pin of the connector, the second interface in the terminal, which corresponds to the second device, is electrically connected to an external USB interface " include the following steps:

[0012] если на первом контакте разъема не принят сигнал электропитания, получение значения уровня сигнала на втором контакте разъема внешнего USB-интерфейса;[0012] if no power signal is received at the first terminal of the connector, obtaining a signal level value at the second terminal of the external USB interface connector;

[0013] определение, является ли полученное значение уровня сигнала на втором контакте разъема меньшим, чем первое заранее заданное значение; и[0013] determining whether the obtained signal level value at the second terminal of the connector is smaller than the first predetermined value; and

[0014] если значение уровня сигнала на втором контакте разъема меньше, чем первое заранее заданное значение, определение того, что устройство, внешне подключенное к терминалу, является вторым устройством, и электрическое соединение второго интерфейсе в терминале, который соответствует второму устройству, с внешним USB-интерфейсом.[0014] if the signal level value at the second terminal of the connector is less than the first predetermined value, determining that the device externally connected to the terminal is a second device, and electrically connecting the second interface in the terminal that corresponds to the second device with an external USB -interface.

[0015] В соответствии с одним из примеров осуществления настоящего изобретения после шага определения, является ли полученное значение уровня сигнала на втором контакте разъема меньшим, чем первое заранее заданное значение, способ дополнительно включает:[0015] According to one embodiment of the present invention, after the step of determining whether the obtained signal level value at the second terminal of the connector is smaller than the first predetermined value, the method further includes:

[0016] если значение уровня сигнала на втором контакте разъема больше или равно первому заранее заданному значению, выдачу заранее заданного напряжения в течение первого заранее заданного периода времени при помощи первого контакта разъема;[0016] if the signal level value at the second terminal of the connector is greater than or equal to the first predetermined value, outputting a predetermined voltage for the first predetermined period of time using the first terminal of the connector;

[0017] получение значений уровня сигнала на втором контакте разъема и третьем контакте разъема внешнего USB-интерфейса;[0017] obtaining signal level values at the second terminal of the connector and the third terminal of the external USB interface connector;

[0018] определение, являются ли оба значения уровня сигнала, на втором контакте разъема и на третьем контакте разъема, большими, чем второе заранее заданное значение; и[0018] determining whether both signal level values, at the second terminal of the connector and at the third terminal of the connector, are larger than the second predetermined value; and

[0019] если оба значения уровня сигнала, на втором контакте разъема и на третьем контакте разъема, больше, чем второе заранее заданное значение, определение того, что устройство, внешне подключенное к терминалу, является третьим устройством, и электрическое соединение третьего интерфейса в терминале, который соответствует третьему устройству, с внешним USB-интерфейсом.[0019] if both signal level values, on the second terminal of the connector and on the third terminal of the connector, are greater than the second predetermined value, determining that the device externally connected to the terminal is the third device, and the electrical connection of the third interface in the terminal, which corresponds to the third device, with an external USB interface.

[0020] В соответствии с одним из вариантов осуществления настоящего изобретения перед шагом контроля значения уровня сигнала на первом контакте разъема внешнего интерфейса универсальной последовательной шины (USB) терминала способ дополнительно включает:[0020] In accordance with one embodiment of the present invention, before the step of monitoring a signal level value at a first terminal pin of a universal serial bus (USB) terminal external interface connector, the method further includes:

[0021] электрическое отсоединение внешнего USB-интерфейса от первого интерфейса, второго интерфейса и третьего интерфейса.[0021] electrically disconnecting the external USB interface from the first interface, the second interface and the third interface.

[0022] В соответствии с одним из вариантов осуществления настоящего изобретения шаг контроля значения уровня сигнала на первом контакте разъема внешнего интерфейса универсальной последовательной шины (USB) терминала может включать:[0022] In accordance with one embodiment of the present invention, the step of monitoring a signal level value at a first terminal pin of a universal serial bus (USB) terminal external interface connector may include:

[0023] в течение второго заранее заданного периода времени, непрерывный контроль значения уровня сигнала на первом контакте разъема внешнего USB-интерфейса терминала..[0023] during the second predetermined period of time, continuously monitoring the signal level value at the first terminal pin of the external terminal USB interface terminal ..

[0024] В одном из вариантов осуществления настоящего изобретения предложен терминал. Терминал может включать модуль контроля, первый модуль определения, первый модуль соединения и второй модуль соединения.[0024] In one embodiment, a terminal is provided. The terminal may include a monitoring module, a first determination module, a first connection module and a second connection module.

[0025] Модуль контроля сконфигурирован для контроля значения уровня сигнала на первом контакте разъема внешнего интерфейса универсальной последовательной шины (USB) терминала.[0025] The monitoring module is configured to monitor the signal level value at the first terminal pin of the universal serial bus (USB) terminal external interface connector.

[0026] Первый модуль определения сконфигурирован для определения, принят ли на первом контакте разъема сигнал электропитания первого заранее заданного напряжения в соответствии с упомянутым значением уровня сигнала.[0026] The first determination module is configured to determine whether the power signal of the first predetermined voltage is received at the first terminal of the connector in accordance with said signal level value.

[0027] Первый модуль соединения сконфигурирован, если на первом контакте разъема принят сигнал электропитания, для определения того, что устройство, внешне подключенное к терминалу, является первым устройством, и для электрического соединения первого интерфейса в терминале, который соответствует первому устройству, с внешним USB-интерфейсом.[0027] The first connection module is configured if a power signal is received at the first terminal of the connector to determine that the device externally connected to the terminal is the first device, and to electrically connect the first interface in the terminal that corresponds to the first device with an external USB -interface.

[0028] Второй модуль соединения сконфигурирован, если на первом контакте разъема сигнал электропитания не принят, для получения значения уровня сигнала на втором контакте разъема внешнего USB-интерфейса, и когда определено, что устройство, внешне подключенное к терминалу, является вторым устройством, в соответствии со значением уровня сигнала на втором контакте разъема, для электрического соединения второго интерфейса в терминале, который соответствует второму устройству, с внешним USB-интерфейсом.[0028] The second connection module is configured if no power signal is received at the first terminal of the connector to obtain a signal level value at the second terminal of the external USB interface connector, and when it is determined that the device externally connected to the terminal is a second device, in accordance with the signal level value at the second pin of the connector, for electrical connection of the second interface in the terminal, which corresponds to the second device, with an external USB interface.

[0029] В соответствии с одним из примеров осуществления настоящего изобретения второй модуль соединения включает первый блок получения, первый блок определения и первый блок соединения.[0029] According to one embodiment of the present invention, the second connection module includes a first acquisition unit, a first determination unit and a first connection unit.

[0030] Первый блок соединения сконфигурирован, если на первом контакте разъема не принят сигнал электропитания, для получения значения уровня сигнала на втором контакте разъема внешнего USB-интерфейса.[0030] The first connection block is configured if no power signal is received at the first terminal of the connector to obtain a signal level value at the second terminal of the external USB interface connector.

[0031] Первый блок определения сконфигурирован для определения, является ли полученное значение уровня сигнала на втором контакте разъема меньшим, чем первое заранее заданное значение.[0031] The first determination unit is configured to determine whether the obtained signal level value at the second terminal of the connector is smaller than the first predetermined value.

[0032] Первый блок соединения сконфигурирован, если значение уровня сигнала на втором контакте разъема меньше, чем первое заранее заданное значение, для определения того, что устройство, внешне подключенное к терминалу, является вторым устройством, и для электрического соединения второго интерфейса в терминале, который соответствует второму устройству, с внешним USB-интерфейсом.[0032] The first connection unit is configured if the signal level value at the second terminal of the connector is less than the first predetermined value to determine that the device externally connected to the terminal is the second device, and to electrically connect the second interface in the terminal, which corresponds to the second device, with an external USB interface.

[0033] В соответствии с одним из примеров осуществления настоящего изобретения второй модуль соединения включает также блок выдачи питания, второй блок получения, второй блок определения и второй блок соединения.[0033] According to one embodiment of the present invention, the second connection module also includes a power delivery unit, a second acquisition unit, a second determination unit and a second connection unit.

[0034] Блок выдачи питания сконфигурирован, если значение уровня сигнала на втором контакте разъема больше или равно первому заранее заданному значению, для выдачи заранее заданного напряжения в течение первого заранее заданного периода времени при помощи первого контакта разъема.[0034] The power output unit is configured if the signal level value at the second terminal of the connector is greater than or equal to the first predetermined value, for delivering a predetermined voltage within the first predetermined time period using the first terminal of the connector.

[0035] Второй блок получения сконфигурирован для получения значений уровня сигнала на втором контакте разъема и третьем контакте разъема внешнего USB-интерфейса.[0035] The second acquisition unit is configured to obtain signal level values at a second terminal pin and a third terminal pin of an external USB interface.

[0036] Второй блок определения сконфигурирован для определения, являются ли оба значения уровня сигнала, на втором контакте разъема и на третьем контакте разъема, большими, чем второе заранее заданное значение.[0036] The second determination unit is configured to determine whether both signal level values, at the second terminal of the connector and at the third terminal of the connector, are larger than the second predetermined value.

[0037] Второй блок соединения сконфигурирован, если оба значения уровня сигнала, на втором контакте разъема и на третьем контакте разъема, больше, чем второе заранее заданное значение, для определения того, что устройство, внешне подключенное к терминалу, является третьим устройством, и для электрического соединения третьего интерфейса в терминале, который соответствует третьему устройству, с внешним USB-интерфейсом.[0037] The second connection unit is configured if both signal level values, on the second terminal of the connector and on the third terminal of the connector, are greater than the second predetermined value to determine that the device externally connected to the terminal is the third device, and for electrical connection of the third interface in the terminal, which corresponds to the third device, with an external USB interface.

[0038] В соответствии с одним из примеров осуществления настоящего изобретения терминал дополнительно включает модуль отсоединения.[0038] In accordance with one embodiment of the present invention, the terminal further includes a disconnect module.

[0039] Модуль отсоединения сконфигурирован для электрического отсоединения внешнего USB-интерфейса от первого интерфейса, второго интерфейса и третьего интерфейса.[0039] The disconnect module is configured to electrically disconnect the external USB interface from the first interface, the second interface and the third interface.

[0040] В соответствии с одним из примеров осуществления настоящего изобретения модуль контроля сконфигурирован, в течение второго заранее заданного периода времени, для непрерывного контроля значения уровня сигнала на первом контакте разъема внешнего USB-интерфейса терминала.[0040] According to one embodiment of the present invention, the monitoring module is configured, for a second predetermined period of time, to continuously monitor the signal level value at the first terminal pin of the external terminal USB interface terminal.

[0041] В одном из вариантов осуществления настоящего изобретения предложен также машиночитаемый носитель, на котором хранят машиноисполняемые инструкции, при этом упомянутые машиноисполняемые инструкции исполняют в целях выполнения любого из способов идентификации интерфейса.[0041] In one embodiment, the invention also provides a computer-readable medium that stores computer-executable instructions, said computer-executable instructions being executed in order to perform any of the interface identification methods.

[0042] В способе идентификации интерфейса и терминале, предложенных в настоящем изобретении, контролируют значение уровня сигнала на первом контакте разъема внешнего интерфейса универсальной последовательной шины (USB) терминала. Определяют, принят ли на первом контакте разъема сигнал электропитания первого заранее заданного напряжения в соответствии с упомянутым значением уровня сигнала. Если на первом контакте разъема принят сигнал электропитания, определяют, что устройство, внешне подключенное к терминалу, является первым устройством, а первый интерфейс в терминале, который соответствует первому устройству, электрически связывают с внешним USB-интерфейсом. Если на первом контакте разъема сигнал электропитания не принят, получают значение уровня сигнала на втором контакте разъема внешнего USB-интерфейса, и когда определено, что устройство, внешне подключенное к терминалу, является вторым устройством, в соответствии со значением уровня сигнала на втором контакте разъема, второй интерфейс в терминале, который соответствует второму устройству, электрически связывают с внешним USB-интерфейсом. Технические решения, предложенные в настоящем изобретении, позволяют автоматически идентифицировать, какое из устройств, в текущий момент внешне подключенных к терминалу, является, например, устройством с гнездовым USB-интерфейсом, устройством со штыревым USB-интерфейсом или устройством, имеющим интерфейс RS232. Затем это устройство соединяют с подходящим интерфейсом в терминале. Таким образом, настоящее изобретение позволяет реализовать автоматическую идентификацию интерфейсов, а также исключить повреждение интерфейсов из-за больших перепадов в уровне сигнала при их ручном переключении.[0042] In the interface identification method and terminal proposed in the present invention, the signal level value is monitored on a first terminal pin of a universal serial bus (USB) terminal external interface connector. It is determined whether the power signal of the first predetermined voltage is received at the first terminal of the connector in accordance with said signal level value. If a power signal is received at the first terminal of the connector, it is determined that the device externally connected to the terminal is the first device, and the first interface in the terminal, which corresponds to the first device, is electrically connected to an external USB interface. If the power signal is not received at the first terminal of the connector, a signal level value is obtained at the second terminal of the external USB interface connector, and when it is determined that the device externally connected to the terminal is the second device, in accordance with the signal level at the second terminal of the connector, the second interface in the terminal, which corresponds to the second device, is electrically connected to an external USB interface. The technical solutions proposed in the present invention can automatically identify which of the devices currently externally connected to the terminal is, for example, a device with a USB socket interface, a device with a USB pin interface, or a device having an RS232 interface. This device is then connected to a suitable interface in the terminal. Thus, the present invention allows for the automatic identification of interfaces, as well as to eliminate damage to the interfaces due to large differences in the signal level when they are manually switched.

[0043] Другие аспекты настоящего изобретения могут быть предложены на основе приведенных ниже чертежей и подробного описания.[0043] Other aspects of the present invention may be proposed based on the following drawings and detailed description.

Краткое описание чертежейBrief Description of the Drawings

[0044] Фиг. 1 представляет собой блок-схему алгоритма, на которой эскизно проиллюстрирован способ идентификации интерфейса в соответствии с одним из вариантов осуществления настоящего изобретения.[0044] FIG. 1 is a flowchart illustrating an outline method for identifying an interface in accordance with one embodiment of the present invention.

[0045] Фиг. 2 представляет собой блок-схему алгоритма, на которой более подробно проиллюстрирован шаг S104 на фиг. 1.[0045] FIG. 2 is a flowchart in which step S104 of FIG. one.

[0046] Фиг. 3 представляет собой блок-схему алгоритма, на которой эскизно проиллюстрирован способ идентификации интерфейса в соответствии с другим вариантом осуществления настоящего изобретения.[0046] FIG. 3 is a flowchart illustrating an outline method for identifying an interface in accordance with another embodiment of the present invention.

[0047] Фиг. 4 представляет собой блок-схему, на которой проиллюстрирован терминал в соответствии с еще одним из примеров осуществления настоящего изобретения.[0047] FIG. 4 is a block diagram illustrating a terminal in accordance with another embodiment of the present invention.

[0048] Фиг. 5 представляет собой блок схему, на которой более подробно проиллюстрирована структура второго модуля соединения на фиг. 4.[0048] FIG. 5 is a block diagram illustrating in more detail the structure of the second connection module in FIG. four.

[0049] Фиг. 6 представляет собой блок-схему, на которой проиллюстрирован терминал в соответствии с еще одним из примеров осуществления настоящего изобретения.[0049] FIG. 6 is a block diagram illustrating a terminal in accordance with another embodiment of the present invention.

[0050] Фиг. 7 представляет сбой эскизную блок-схему, на которой показаны аппаратные линии связи в терминале в соответствии с одним из вариантов осуществления настоящего изобретения.[0050] FIG. 7 is a failure, a schematic block diagram showing the hardware communication lines in a terminal in accordance with one embodiment of the present invention.

[0051] Далее, со ссылками на чертежи, будут рассмотрены реализации, функции, отличительные признаки и преимущества настоящего изобретения.[0051] Next, with reference to the drawings, implementations, functions, features and advantages of the present invention will be discussed.

Подробное описание изобретенияDETAILED DESCRIPTION OF THE INVENTION

[0052] Следует понимать, что конкретные варианты осуществления настоящего изобретения, рассмотренные в данном документе, предназначены исключительно для иллюстрации настоящего изобретения и не должны рассматриваться как ограничивающие его.[0052] It should be understood that the specific embodiments of the present invention described herein are intended solely to illustrate the present invention and should not be construed as limiting it.

[0053] В одном из вариантов осуществления настоящего изобретения предложен способ идентификации интерфейса. В соответствии с иллюстрацией фиг. 1 в одном из вариантов осуществления настоящего изобретения способ идентификации интерфейса включает шаги, описанные ниже.[0053] In one embodiment of the present invention, a method for identifying an interface is provided. In accordance with the illustration of FIG. 1, in one embodiment of the present invention, an interface identification method includes the steps described below.

[0054] На шаге S101 контролируют значение уровня сигнала на первом контакте разъема внешнего USB-интерфейса терминала.[0054] In step S101, the signal level value at the first terminal of the terminal external USB connector is monitored.

[0055] В данном варианте осуществления настоящего изобретения упомянутым терминалом может быть мобильный терминал, имеющий USB-интерфейс, например, мобильный телефон, смартфон, компьютер-ноутбук, приемник цифрового вещания, карманный персональный компьютер (Personal Digital Assistant, PDA), "планшет" (планшетный компьютер), портативный мультимедийный проигрыватель, навигационное устройство или стационарный терминал, имеющий USB-интерфейс, например, цифровой телевизор (TV), настольный компьютер и т.п. [0055] In this embodiment of the present invention, said terminal may be a mobile terminal having a USB interface, for example, a mobile phone, a smartphone, a laptop computer, a digital broadcast receiver, a personal digital assistant (PDA), a “tablet” (tablet computer), portable multimedia player, navigation device or stationary terminal having a USB interface, for example, a digital television (TV), desktop computer, etc.

[0056] В данном варианте осуществления настоящего изобретения внешним USB-интерфейсом является разъем mini-USB для внешнего подключения устройства, имеющего гнездовой USB-интерфейс, устройства, имеющего штыревой USB-интерфейс, устройства, имеющего интерфейс RS232 и т.п. Нужно понимать, что настоящее изобретение не ограничено тремя перечисленными выше типами внешних устройств. В данном примере осуществления настоящего изобретения внешний USB-интерфейс имеет по меньшей мере три контакта разъема: контакт 1 разъема (первый контакт разъема), контакт 2 разъема (третий контакт разъема) и контакт 3 разъема (второй контакт разъема). Контакт 1 разъема представляет собой линию питания, а контакт 2 и контакт 3 разъема представляют собой отрицательный электрод D- и положительный электрод D+линии данных соответственно. Нужно понимать, что в других вариантах осуществления настоящего изобретения внешний USB-интерфейс может дополнительно включать следующие контакты разъема: контакт USBJD разъема и линию GND заземления. Описание сигналов внешнего USB-интерфейса приведено ниже в таблице 1.[0056] In this embodiment, the external USB interface is a mini-USB connector for external connection of a device having a USB female interface, a device having a USB pin interface, a device having an RS232 interface, and the like. It should be understood that the present invention is not limited to the three types of external devices listed above. In this embodiment, the external USB interface has at least three connector pins: connector pin 1 (first connector pin), connector pin 2 (third connector pin), and pin 3 of the connector (second connector pin). Pin 1 of the connector is the power line, and pin 2 and pin 3 of the connector are the negative electrode D- and the positive electrode D + of the data line, respectively. It should be understood that in other embodiments of the present invention, the external USB interface may further include the following connector pins: a USBJD contact pin and a GND ground line. A description of the external USB interface signals is given in table 1 below.

Figure 00000001
Figure 00000001

[0057] Различия между сигналами устройства, имеющего гнездовой USB-интерфейс, и устройства, имеющего штыревой USB-интерфейс, в данном примере осуществления настоящего изобретения, показаны в приведенной ниже таблице 2.[0057] The differences between the signals of a device having a female USB interface and a device having a USB male interface in this embodiment of the present invention are shown in Table 2 below.

Figure 00000002
Figure 00000002

Figure 00000003
Figure 00000003

[0058] На шаге S102 определяют, принят ли на первом контакте разъема сигнал электропитания первого заранее заданного напряжения в соответствии с упомянутым значением уровня сигнала.[0058] In step S102, it is determined whether the power signal of the first predetermined voltage is received at the first terminal of the connector in accordance with said signal level value.

[0059] В данном варианте осуществления настоящего изобретения схема обработки сигналов сконструирована для контроля значений уровня сигнала на контактах 1, 2 и 3 разъема, и согласно различиям из приведенной выше таблицы 2, может быть определено, какой тип интерфейса в терминала является подходящим и должен быть электрически соединен с внешним USB-интерфейсом терминала. Схема обработки сигналов может включать схему обнаружения питания, схему обнаружения уровня 2 В и схему обнаружения уровня -2/2 В. Схема обнаружения питания контролирует, подано ли электропитание на контакт 1 разъема, схема обнаружения уровня 2 В контролирует значение уровня сигнала на контакте 2 разъема, а схема обнаружения уровня -2/2 В контролирует значение уровня сигнала на контакте 3 разъема.[0059] In this embodiment of the present invention, the signal processing circuit is designed to control signal level values at the terminals 1, 2 and 3 of the connector, and according to the differences from Table 2 above, it can be determined which type of interface in the terminal is appropriate and should be electrically connected to the external USB interface of the terminal. The signal processing circuit may include a power detection circuit, a 2 V level detection circuit, and a -2/2 V level detection circuit, a power detection circuit controls whether power is applied to the terminal 1 pin, a 2 V level detection circuit monitors the signal level value on the terminal 2 , and the -2/2 V level detection circuit monitors the signal level value on pin 3 of the connector.

[0060] В данном примере осуществления настоящего изобретения терминал сначала определяет, подано ли питание на контакт 1 разъема, контролируя значение уровня сигнала на первом контакте разъема (т.е. контакте 1 разъема) при помощи схемы обнаружения питания. Первое заранее заданное напряжение равно 5 В, но в других вариантах осуществления настоящего изобретения первое заранее заданное напряжение может быть выбрано иным подходящим образом, в соответствии с требованиями конкретного применения.[0060] In this embodiment, the terminal first determines whether power is supplied to the terminal 1 of the connector by monitoring the signal level value on the first terminal of the connector (ie, terminal 1 of the connector) using the power detection circuit. The first predetermined voltage is 5 V, but in other embodiments of the present invention, the first predetermined voltage may be selected in another suitable manner, in accordance with the requirements of a particular application.

[0061] На шаге S103, если на первом контакте разъема принят сигнал электропитания, определяют, что устройство, внешне подключенное к терминалу, является первым устройством, а первый интерфейс в терминале, который соответствует первому устройству, электрически связывают с внешним USB-интерфейсом.[0061] In step S103, if a power signal is received at the first terminal of the connector, it is determined that the device externally connected to the terminal is the first device, and the first interface in the terminal, which corresponds to the first device, is electrically connected to an external USB interface.

[0062] В данном варианте осуществления настоящего изобретения, если на первом контакте разъема (контакте 1 разъема) внешнего USB-интерфейса терминала принят сигнал электропитания, то исходя из таблицы 2 может быть определено, что устройством, внешне подключенным к терминалу, является первое устройство, т.е. устройство, имеющее гнездовой USB-интерфейс. В этот момент управляющая переключательная схема в терминале обеспечивает электрическое соединение первого интерфейса (штыревого USB-интерфейса) внутри терминала, который соответствует первому устройству (устройству, имеющему гнездовой USB-интерфейс) с первым устройством. Соответствующая схема первого интерфейса (т.е. штыревого USB-интерфейса) внутри терминала выполняет такие операции, как инициализацию и связь по стандартному протоколу USB.[0062] In this embodiment of the present invention, if a power signal is received at the first terminal of the connector (terminal 1 of the connector) of the external USB interface of the terminal, it can be determined from table 2 that the device externally connected to the terminal is the first device, those. device with a USB female interface. At this point, the control switching circuit in the terminal provides an electrical connection to the first interface (pin USB interface) inside the terminal, which corresponds to the first device (a device having a female USB interface) with the first device. The corresponding scheme of the first interface (i.e., the USB pin interface) inside the terminal performs operations such as initialization and communication via the standard USB protocol.

[0063] На шаге S104, если на первом контакте разъема сигнал электропитания не принят, получают значение уровня сигнала на втором контакте разъема внешнего USB-интерфейса, и когда определено, что устройство, внешне подключенное к терминалу, является вторым устройством, в соответствии со значением уровня сигнала на втором контакте разъема, второй интерфейс в терминале, который соответствует второму устройству, электрически связывают с внешним USB-интерфейсом.[0063] In step S104, if the power signal is not received at the first terminal of the connector, a signal level value is obtained at the second terminal of the external USB interface connector, and when it is determined that the device externally connected to the terminal is a second device, in accordance with the value the signal level at the second pin of the connector, the second interface in the terminal, which corresponds to the second device, is electrically connected to an external USB interface.

[0064] В данном варианте осуществления настоящего изобретения, если на первом контакте разъема (контакт 1 разъема) внешнего USB-интерфейса терминала не принят сигнал электропитания, непрерывно получают значение уровня сигнала на втором контакте разъема (контакт 3 разъема) внешнего USB-интерфейса. Согласно таблице 2 может быть определено, что устройство, внешне подключенное к терминалу, является вторым устройством, т.е. устройством, имеющим интерфейс RS232. В этот момент управляющая переключательная схема в терминале обеспечивает электрическое соединение второго интерфейса (внутреннего интерфейса RS232) внутри терминала, который соответствует второму устройству (устройству, имеющему интерфейс RS232) со вторым устройством.[0064] In this embodiment, if a power signal is not received at the first terminal of the connector (terminal 1 of the connector) of the external USB interface of the terminal, the signal level at the second terminal of the connector (terminal 3 of the connector) of the external USB interface is continuously received. According to table 2, it can be determined that the device externally connected to the terminal is a second device, i.e. a device having an RS232 interface. At this point, the control switching circuit in the terminal provides an electrical connection to the second interface (internal RS232 interface) inside the terminal, which corresponds to the second device (a device having an RS232 interface) with the second device.

[0065] В способе идентификации интерфейса, предложенном в настоящем изобретении, контролируют значение уровня сигнала на первом контакте разъема внешнего интерфейса универсальной последовательной шины (USB) терминала. Определяют, принят ли на первом контакте разъема сигнал электропитания первого заранее заданного напряжения в соответствии с упомянутым значением уровня сигнала. Если на первом контакте разъема принят сигнал электропитания, определяют, что устройство, внешне подключенное к терминалу, является первым устройством, а первый интерфейс в терминале, который соответствует первому устройству, электрически связывают с внешним USB-интерфейсом. Если на первом контакте разъема сигнал электропитания не принят, получают значение уровня сигнала на втором контакте разъема внешнего USB-интерфейса, и когда определено, что устройство, внешне подключенное к терминалу, является вторым устройством, в соответствии со значением уровня сигнала на втором контакте разъема, второй интерфейс в терминале, который соответствует второму устройству, электрически связывают с внешним USB-интерфейсом. Технические решения, предложенные в настоящем изобретении, позволяют автоматически идентифицировать, какое из устройств, в текущий момент внешне подключенных к терминалу, является, например, устройством с гнездовым USB-интерфейсом, устройством, со штыревым USB-интерфейсом или устройством, имеющим интерфейс RS232. Затем это устройство соединяют с подходящим интерфейсом в терминале. Таким образом, настоящее изобретение позволяет реализовать автоматическую идентификацию интерфейсов, а также исключить повреждение интерфейсов из-за больших перепадов в уровне сигнала при их ручном переключении.[0065] In the interface identification method of the present invention, a signal level value is monitored at a first terminal pin of a universal serial bus (USB) terminal external interface connector. It is determined whether the power signal of the first predetermined voltage is received at the first terminal of the connector in accordance with said signal level value. If a power signal is received at the first terminal of the connector, it is determined that the device externally connected to the terminal is the first device, and the first interface in the terminal, which corresponds to the first device, is electrically connected to an external USB interface. If the power signal is not received at the first terminal of the connector, a signal level value is obtained at the second terminal of the external USB interface connector, and when it is determined that the device externally connected to the terminal is the second device, in accordance with the signal level at the second terminal of the connector, the second interface in the terminal, which corresponds to the second device, is electrically connected to an external USB interface. The technical solutions proposed in the present invention can automatically identify which of the devices currently externally connected to the terminal is, for example, a device with a female USB interface, a device with a USB pin interface, or a device having an RS232 interface. This device is then connected to a suitable interface in the terminal. Thus, the present invention allows for the automatic identification of interfaces, as well as to eliminate damage to the interfaces due to large differences in the signal level when they are manually switched.

[0066] В одном из вариантов осуществления настоящего изобретения, который показан на фиг. 2 и основан на варианте осуществления изобретения, рассмотренном на примере фиг. 1, шаг включает шаги, описанные ниже.[0066] In one embodiment of the present invention, which is shown in FIG. 2 and is based on the embodiment of the invention illustrated in FIG. 1, the step includes the steps described below.

[0067] На шаге S1041, если на первом контакте разъема не принят сигнал электропитания, получают значение уровня сигнала на втором контакте разъема внешнего USB-интерфейса.[0067] In step S1041, if a power signal is not received at the first terminal of the connector, a signal level value is obtained at the second terminal of the external USB interface connector.

[0068] В данном варианте осуществления настоящего изобретения, если на первом контакте разъема (контакт 1 разъема) внешнего USB-интерфейса терминала не принят сигнал электропитания, непрерывно получают значение уровня сигнала на втором контакте разъема (контакт 3 разъема) внешнего USB-интерфейса при помощи схемы обнаружения уровня -2/2 В.[0068] In this embodiment of the present invention, if no power signal is received at the first terminal of the connector (terminal 1 of the connector) of the external USB interface of the terminal, the signal level at the second terminal of the connector (terminal 3 of the connector) of the external USB interface is continuously received using level detection circuits -2/2 V.

[0069] На шаге S1042 определяют, является ли полученное значение уровня сигнала на втором контакте разъема меньшим, чем первое заранее заданное значение.[0069] In step S1042, it is determined whether the obtained signal level value at the second terminal of the connector is smaller than the first predetermined value.

[0070] На шаге S1043, если значение уровня сигнала на втором контакте разъема меньше, чем первое заранее заданное значение, определяют, что устройство, внешне подключенное к терминалу, является вторым устройством, и электрическое соединение второго интерфейсе в терминале, который соответствует второму устройству с внешним USB-интерфейсом.[0070] In step S1043, if the signal level value at the second terminal of the connector is less than the first predetermined value, it is determined that the device externally connected to the terminal is the second device, and the electrical connection of the second interface in the terminal, which corresponds to the second device with external USB interface.

[0071] В данном варианте осуществления настоящего изобретения, когда схема обнаружения уровня -2/2 В определит, что значение уровня сигнала на контакте 3 разъема меньше, чем первое заранее заданное значение (например, -2 В), исходя из таблицы 2 может быть определено, что внешнее устройство, которое в данный момент подключено во внешний USB-интерфейс представляет собой устройство, имеющее интерфейс RS232. В этот момент времени управляющая переключательная схема в терминале обеспечивает электрическое соединение второго интерфейса (внутреннего интерфейса RS232) внутри терминала, который соответствует второму устройству (устройству, имеющему интерфейс RS232) со вторым устройством.[0071] In this embodiment of the present invention, when the -2/2 V level detection circuit determines that the signal level value on the terminal 3 of the connector is less than the first predetermined value (for example, -2 V), based on table 2 may be it is determined that the external device that is currently connected to the external USB interface is a device having an RS232 interface. At this point in time, the control switching circuit in the terminal provides an electrical connection to the second interface (internal RS232 interface) inside the terminal, which corresponds to the second device (a device having an RS232 interface) with the second device.

[0072] В одном из вариантов осуществления настоящего изобретения, который показан на фиг. 2 и основан на варианте осуществления изобретения, рассмотренном выше на примере фиг. 1, после шага S1042 способ дополнительно включает шаги, описанные ниже.[0072] In one embodiment of the present invention, which is shown in FIG. 2 and is based on the embodiment of the invention discussed above with reference to FIG. 1, after step S1042, the method further includes the steps described below.

[0073] На шаге S1044, если значение уровня сигнала на втором контакте разъема больше или равно первому заранее заданному значению, в течение первого заранее заданного периода времени при помощи первого контакта разъема выдают заранее заданное напряжение.[0073] In step S1044, if the signal level value at the second terminal of the connector is greater than or equal to the first predetermined value, a predetermined voltage is generated by the first terminal of the connector during the first predetermined period of time.

[0074] В данном варианте осуществления настоящего изобретения, когда схема обнаружения уровня -2/2 В определит, что значение уровня сигнала на контакте 3 разъема больше или равно первому заранее заданному значению (например, -2 В), заранее заданное напряжение электропитания (например, 5 В) выдают в течение 500 мс при помощи первого контакта разъема (контакт 1 разъема). В других вариантах осуществления настоящего изобретения первое заранее заданное время и заранее заданное напряжение могут быть соответствующим образом выбраны согласно требованиям конкретного применения.[0074] In this embodiment of the present invention, when the -2/2 V level detection circuit determines that the signal level value at the terminal 3 of the connector is greater than or equal to the first predetermined value (eg, -2 V), a predetermined supply voltage (eg , 5 V) output within 500 ms using the first contact of the connector (pin 1 of the connector). In other embodiments of the present invention, the first predetermined time and the predetermined voltage may be appropriately selected according to the requirements of a particular application.

[0075] На шаге S1045 получают значения уровня сигнала на втором контакте разъема и третьем контакте разъема внешнего USB-интерфейса.[0075] In step S1045, signal level values are obtained at the second terminal pin and the third terminal pin of the external USB interface.

[0076] В данном варианте осуществления настоящего изобретения, если на первом контакте разъема не принят сигнал электропитания (например, 5 В), и схема обнаружения уровня -2/2 В определит, что значение уровня сигнала на втором контакте разъема (контакте 3 разъема) больше или равно первому заранее заданному значению (например, -2 В), электропитание 5 В может быть выдано при помощи контакта 1 разъема, и затем значение уровня сигнала на третьем контакте разъема (контакт 2 разъема) может контролироваться схемой обнаружения уровня 2 В, а значение уровня сигнала на втором контакте разъема (контакт 3 разъема) может контролироваться схемой обнаружения уровня -2/2 В.[0076] In this embodiment of the present invention, if no power signal is received at the first terminal of the connector (for example, 5 V), and the -2/2 V level detection circuit determines that the signal level value is at the second terminal of the connector (terminal 3 of the connector) greater than or equal to the first pre-set value (for example, -2 V), 5 V power can be supplied using pin 1 of the connector, and then the signal level value on the third pin of the connector (pin 2 of the connector) can be controlled by a 2 V level detection circuit, and si value drove on the second pin of the connector (pin 3 of the connector) can be controlled by a -2/2 V level detection circuit.

[0077] На шаге S1046 определяют, являются ли оба значения уровня сигнала, на втором контакте разъема и на третьем контакте разъема, большими, чем второе заранее заданное значение.[0077] In step S1046, it is determined whether both signal level values, at the second terminal of the connector and at the third terminal of the connector, are larger than the second predetermined value.

[0078] На шаге S1047, если оба значения уровня сигнала, на втором контакте разъема и на третьем контакте разъема, больше, чем второе заранее заданное значение, определяют, что устройство, внешне подключенное к терминалу, является третьим устройством, и электрически соединяют третий интерфейс в терминале, который соответствует третьему устройству, с внешним USB-интерфейсом.[0078] In step S1047, if both signal level values, on the second terminal of the connector and on the third terminal of the connector, are greater than the second predetermined value, determine that the device externally connected to the terminal is the third device, and electrically connect the third interface in the terminal that corresponds to the third device, with an external USB interface.

[0079] В данном варианте осуществления настоящего изобретения, если обнаружено, что значения уровня сигнала на втором контакте разъема и на третьем контакте разъема больше, чем 2 В после того, как электропитание 5 В подано при помощи контакта 1 разъема, может быть определено, исходя из таблицы 2, что устройство, внешне подключенное к терминалу, является третьим устройством, т.е. устройством, имеющим штыревой USB-интерфейс. В этот момент времени управляющая переключательная схема в терминале обеспечивает электрическое соединение третьего интерфейса (гнездового USB-интерфейса) внутри терминала, который соответствует третьему устройству (устройству, имеющему штыревой USB-интерфейс) с третьим устройством. Соответствующая схема третьего интерфейса (т.е. гнездового USB-интерфейса) внутри терминала выполняет такие операции, как инициализацию и связь по стандартному протоколу USB.[0079] In this embodiment of the present invention, if it is found that the signal level values at the second terminal of the connector and at the third terminal of the connector are greater than 2 V after the 5 V power supply is supplied by the terminal 1 of the connector, can be determined based on from table 2 that the device externally connected to the terminal is the third device, i.e. a device with a pin USB interface. At this point in time, the control switching circuit in the terminal provides an electrical connection to the third interface (USB socket interface) inside the terminal, which corresponds to the third device (a device having a USB pin interface) with the third device. The corresponding circuit of the third interface (i.e., the USB socket interface) inside the terminal performs operations such as initialization and communication via the standard USB protocol.

[0080] В одном из вариантов осуществления настоящего изобретения, который показан на фиг. 3 и основан на варианте осуществления изобретения, рассмотренном выше на примере фиг. 1, перед шагом S101 способ дополнительно включает шаги, описанные ниже.[0080] In one embodiment of the present invention, which is shown in FIG. 3 and is based on the embodiment of the invention discussed above with reference to FIG. 1, before step S101, the method further includes the steps described below.

[0081] На шаге S105 внешний USB-интерфейс электрически отсоединяют от первого интерфейса, второго интерфейса и третьего интерфейса.[0081] In step S105, the external USB interface is electrically disconnected from the first interface, the second interface, and the third interface.

[0082] В данном варианте осуществления управляющая переключательная схема в терминале обеспечивает электрическое отсоединение внешнего USB-интерфейса от первого интерфейса, второго интерфейса и третьего интерфейса. Таким образом, терминал может автоматически идентифицировать, какое из устройств в данный момент подключено в разъем терминала, то есть, устройство с гнездовым интерфейсом USB, устройство со штыревым интерфейсом USB или устройство с интерфейсом RS232. Затем это устройство электрически соединяют с подходящим интерфейсом в терминале. Таким образом реализуют автоматическую идентификацию интерфейсов. Кроме того, исключено повреждение интерфейса из-за слишком значительных перепадов уровня сигнала при переключении интерфейсов вручную, которое возможно, поскольку уровни сигналов интерфейса RS232 значительно выше, чем уровни сигналов USB-интерфейса,[0082] In this embodiment, the control switching circuit in the terminal electrically disconnects the external USB interface from the first interface, the second interface and the third interface. Thus, the terminal can automatically identify which device is currently connected to the terminal connector, that is, a device with a female USB interface, a device with a USB pin interface, or a device with an RS232 interface. This device is then electrically connected to a suitable interface in the terminal. Thus, automatic identification of interfaces is implemented. In addition, damage to the interface due to too significant differences in signal level when switching interfaces manually is possible, which is possible because the signal levels of the RS232 interface are much higher than the signal levels of the USB interface,

[0083] В одном из вариантов осуществления настоящего изобретения, который основан на варианте осуществления изобретения, рассмотренном на примере фиг. 1 или фиг. 3, шаг S101 может включать шаг, описанный ниже.[0083] In one embodiment of the present invention, which is based on the embodiment of the invention illustrated by the example of FIG. 1 or FIG. 3, step S101 may include a step described below.

[0084] В течение второго заранее заданного периода времени непрерывно контролируют значение уровня сигнала на первом контакте разъема внешнего USB-интерфейса терминала.[0084] For a second predetermined period of time, the signal level value at the first terminal pin of the terminal external USB interface connector is continuously monitored.

[0085] В данном варианте осуществления настоящего изобретения в течение второго заранее заданного периода времени (например, 500 мс) непрерывно контролируют значение уровня сигнала на первом контакте разъема внешнего USB-интерфейса терминала. Очевидно, в других вариантах осуществления настоящего изобретения могут быть выбраны другие значения заранее заданного периода времени, обеспечивающие точную регистрацию значений уровня сигнала и исключающие искажение значений уровня сигнала.[0085] In this embodiment of the present invention, for a second predetermined period of time (eg, 500 ms), the signal level value at the first terminal pin of the terminal external USB interface connector is continuously monitored. Obviously, in other embodiments of the present invention, other values of a predetermined time period can be selected to ensure accurate recording of signal level values and to prevent distortion of signal level values.

[0086] В настоящем изобретении предложен также терминал 1. В соответствии с иллюстрацией фиг. 4, в одном из вариантов осуществления настоящего изобретения терминал 1 включает модуль 101 контроля, первый модуль 102 определения, первый модуль 103 соединения и второй модуль 104 соединения.[0086] The present invention also provides a terminal 1. In accordance with the illustration of FIG. 4, in one embodiment of the present invention, terminal 1 includes a monitoring module 101, a first determination module 102, a first connection module 103 and a second connection module 104.

[0087] Модуль 101 контроля сконфигурирован для контроля значения уровня сигнала на первом контакте разъема внешнего интерфейса универсальной последовательной шины (USB) терминала 1.[0087] The monitoring module 101 is configured to monitor a signal level value at a first terminal pin of a universal serial bus (USB) external interface terminal of terminal 1.

[0088] В данном варианте осуществления настоящего изобретения терминалом 1 может быть мобильный терминал, имеющий USB-интерфейс, например, мобильный телефон, смартфон, компьютер-ноутбук, приемник цифрового вещания, карманный персональный компьютер (Personal Digital Assistant, PDA), "планшет" (планшетный компьютер), портативный мультимедийный проигрыватель, навигационное устройство или стационарный терминал, имеющий USB-интерфейс, например, цифровой телевизор (TV), настольный компьютер и т.п. [0088] In this embodiment of the present invention, the terminal 1 may be a mobile terminal having a USB interface, for example, a mobile phone, smartphone, laptop computer, digital broadcast receiver, personal digital assistant (PDA), “tablet” (tablet computer), portable multimedia player, navigation device or stationary terminal having a USB interface, for example, a digital television (TV), desktop computer, etc.

[0089] В данном варианте осуществления настоящего изобретения внешним USB-интерфейсом является разъем mini-USB для внешнего подключения устройства, имеющего гнездовой USB-интерфейс, устройства, имеющего штыревой USB-интерфейс, устройства, имеющего интерфейс RS132 и т.п. Нужно понимать, что настоящее изобретение не ограничено тремя перечисленными выше типами внешних устройств. В данном примере осуществления настоящего изобретения внешний USB-интерфейс имеет по меньшей мере три контакта разъема: контакт 1 разъема (первый контакт разъема), контакт 2 разъема (третий контакт разъема) и контакт 3 разъема (второй контакт разъема). Контакт 1 разъема представляет собой линию питания, а контакт 2 и контакт 3 разъема представляют собой отрицательный электрод D- и положительный электрод D+линии данных соответственно. Нужно понимать, что в других вариантах осуществления настоящего изобретения внешний USB-интерфейс может дополнительно включать следующие контакты разъема: контакт USBJD разъема и линию GND заземления. Описание сигналов внешнего USB-интерфейса приведено ниже в таблице 3.[0089] In this embodiment, the external USB interface is a mini-USB connector for external connection of a device having a USB female interface, a device having a USB pin interface, a device having an RS132 interface, and the like. It should be understood that the present invention is not limited to the three types of external devices listed above. In this embodiment, the external USB interface has at least three connector pins: connector pin 1 (first connector pin), connector pin 2 (third connector pin), and pin 3 of the connector (second connector pin). Pin 1 of the connector is the power line, and pin 2 and pin 3 of the connector are the negative electrode D- and the positive electrode D + of the data line, respectively. It should be understood that in other embodiments of the present invention, the external USB interface may further include the following connector pins: a USBJD contact pin and a GND ground line. A description of the external USB interface signals is given in table 3 below.

Figure 00000004
Figure 00000004

[0090] Различия между сигналами устройства, имеющего гнездовой USB-интерфейс, и устройства, имеющего штыревой USB-интерфейс, в данном примере осуществления настоящего изобретения, показаны в приведенной ниже таблице 4.[0090] The differences between the signals of a device having a USB female interface and a device having a USB pin interface in this embodiment of the present invention are shown in Table 4 below.

Figure 00000005
Figure 00000005

Figure 00000006
Figure 00000006

[0091] Первый модуль 102 определения сконфигурирован для определения, принят ли на первом контакте разъема сигнал электропитания первого заранее заданного напряжения в соответствии с упомянутым значением уровня сигнала.[0091] The first determination module 102 is configured to determine whether a power signal of a first predetermined voltage is received at the first terminal of the connector in accordance with said signal level value.

[0092] В данном варианте осуществления настоящего изобретения схема 10 обработки сигналов сконструирована для контроля значений уровня сигнала на контактах 1, 2 и 3 разъема, и согласно различиям из приведенной выше таблицы 4, может быть определено, какой тип интерфейса в терминала является подходящим и должен быть электрически соединен с внешним USB-интерфейсом терминала 1. В соответствии с иллюстрацией фиг. 7 схема 10 обработки сигналов может включать схему 12 обнаружения питания (т.е. схему обнаружения уровня 5 В), схему 11 обнаружения уровня 2 В и схему 13 обнаружения уровня -2/2 В. Схема 12 обнаружения питания контролирует, подано ли питание на контакт 1 разъема, схема 11 обнаружения уровня 2 В контролирует значение уровня сигнала на контакте 2 разъема, а схема 13 обнаружения уровня -2/2 В контролирует значение уровня сигнала на контакте 3 разъема.[0092] In this embodiment of the present invention, the signal processing circuit 10 is designed to control signal level values at the terminals 1, 2 and 3 of the connector, and according to the differences from the above table 4, it can be determined which type of interface in the terminal is appropriate and should be electrically connected to the external USB interface of terminal 1. In accordance with the illustration of FIG. 7, the signal processing circuit 10 may include a power detection circuit 12 (i.e., a 5 V level detection circuit), a 2 V level detection circuit 11, and a -2/2 V level detection circuit 13. The power detection circuit 12 controls whether power is supplied to pin 1 of the connector, the 2 V level detection circuit 11 controls the signal level value on the terminal 2 of the connector, and the -2/2 V level detection circuit 13 controls the signal level value on the terminal 3 of the connector.

[0093] В данном примере осуществления настоящего изобретения терминал 1 сначала определяет, подано ли питание на контакт 1 разъема, контролируя значение уровня сигнала на первом контакте разъема (т.е. контакте 1 разъема) при помощи схемы 12 обнаружения питания. Первое заранее заданное напряжение равно 5 В, но в других вариантах осуществления настоящего изобретения первое заранее заданное напряжение может быть выбрано иным подходящим образом, в соответствии с требованиями конкретного применения.[0093] In this embodiment, the terminal 1 first determines whether power is supplied to the terminal 1 of the connector by monitoring the signal level at the first terminal of the connector (ie, terminal 1 of the connector) using the power detection circuit 12. The first predetermined voltage is 5 V, but in other embodiments of the present invention, the first predetermined voltage may be selected in another suitable manner, in accordance with the requirements of a particular application.

[0094] Первый 103 модуль соединения сконфигурирован, если на первом контакте разъема принят сигнал электропитания, для определения того, что устройство, внешне подключенное к терминалу 1, является первым устройством, и для электрического соединения первого интерфейса в терминале 1, который соответствует первому устройству, с внешним USB-интерфейсом.[0094] The first 103 connection module is configured if a power signal is received at the first terminal of the connector to determine that the device externally connected to the terminal 1 is the first device, and to electrically connect the first interface in the terminal 1, which corresponds to the first device, with external USB interface.

[0095] В данном варианте осуществления настоящего изобретения, если на первом контакте разъема (контакте 1 разъема) внешнего USB-интерфейса терминала принят сигнал электропитания, то исходя из таблицы 4 может быть определено, что устройством, внешне подключенным к терминалу, является первое устройство, т.е. устройство, имеющее гнездовой USB-интерфейс. В этот момент времени, в соответствии с иллюстрацией фиг. 7, управляющая переключательная схема 30 в терминале 1 обеспечивает электрическое соединение первого интерфейса (штыревого USB-интерфейса) внутри терминала, который соответствует первому устройству (устройству, имеющему гнездовой USB-интерфейс) с первым устройством. Соответствующая схема первого интерфейса (т.е. штыревого USB-интерфейса) внутри терминала выполняет такие операции, как инициализацию и связь по стандартному протоколу USB.[0095] In this embodiment of the present invention, if a power signal is received at the first terminal of the connector (terminal 1 of the connector) of the external USB interface of the terminal, it can be determined from table 4 that the device externally connected to the terminal is the first device, those. device with a USB female interface. At this point in time, in accordance with the illustration of FIG. 7, the control switching circuit 30 in the terminal 1 provides an electrical connection of the first interface (pin USB interface) inside the terminal, which corresponds to the first device (a device having a female USB interface) with the first device. The corresponding scheme of the first interface (i.e., the USB pin interface) inside the terminal performs operations such as initialization and communication via the standard USB protocol.

[0096] Второй модуль 104 соединения сконфигурирован, если на первом контакте разъема сигнал электропитания не принят, для получения значения уровня сигнала на втором контакте разъема внешнего USB-интерфейса, и когда определено, что устройство, внешне подключенное к терминалу 1, является вторым устройством, в соответствии со значением уровня сигнала на втором контакте разъема, для электрического соединения второго интерфейса в терминале 1, который соответствует второму устройству, с внешним USB-интерфейсом.[0096] The second connection module 104 is configured if no power signal is received at the first terminal of the connector to obtain a signal level value at the second terminal of the external USB interface connector, and when it is determined that the device externally connected to terminal 1 is a second device, in accordance with the value of the signal level at the second pin of the connector, for electrical connection of the second interface in terminal 1, which corresponds to the second device, with an external USB interface.

[0097] В терминале 1, предложенном в настоящем изобретении, контролируют значение уровня сигнала на первом контакте разъема внешнего интерфейса универсальной последовательной шины (USB) терминала 1. Определяют, принят ли на первом контакте разъема сигнал электропитания первого заранее заданного напряжения в соответствии с упомянутым значением уровня сигнала. Если на первом контакте разъема принят сигнал электропитания, определяют, что устройство, внешне подключенное к терминалу 1, является первым устройством, а первый интерфейс в терминале 1, который соответствует первому устройству, электрически связывают с внешним USB-интерфейсом. Если на первом контакте разъема сигнал электропитания не принят, получают значение уровня сигнала на втором контакте разъема внешнего USB-интерфейса, и когда определено, что устройство, внешне подключенное к терминалу 1, является вторым устройством, в соответствии со значением уровня сигнала на втором контакте разъема, второй интерфейс в терминале 1, который соответствует второму устройству, электрически связывают с внешним USB-интерфейсом. Технические решения, предложенные в настоящем изобретении, позволяют автоматически идентифицировать, какое из устройств, в текущий момент внешне подключенных к терминалу, является, например, устройством с гнездовым USB-интерфейсом, устройством, со штыревым USB-интерфейсом или устройством, имеющим интерфейс RS232. Затем это устройство соединяют с подходящим интерфейсом в терминале 1. Таким образом, настоящее изобретение позволяет реализовать автоматическую идентификацию интерфейсов, а также исключить повреждение интерфейсов из-за больших перепадов в уровне сигнала при их ручном переключении.[0097] In the terminal 1 of the present invention, the signal level value is monitored on the first terminal pin of the universal serial bus (USB) external interface connector of the terminal 1. It is determined whether the power signal of the first predetermined voltage is received on the first terminal terminal in accordance with said value signal level. If a power signal is received at the first terminal of the connector, it is determined that the device externally connected to terminal 1 is the first device, and the first interface in terminal 1, which corresponds to the first device, is electrically connected to an external USB interface. If the power signal is not received at the first terminal of the connector, a signal level value is obtained at the second terminal of the external USB interface connector, and when it is determined that the device externally connected to terminal 1 is the second device, in accordance with the signal level at the second terminal of the connector , the second interface in terminal 1, which corresponds to the second device, is electrically connected to an external USB interface. The technical solutions proposed in the present invention can automatically identify which of the devices currently externally connected to the terminal is, for example, a device with a female USB interface, a device with a USB pin interface, or a device having an RS232 interface. This device is then connected to a suitable interface in terminal 1. Thus, the present invention allows automatic identification of interfaces and eliminates damage to the interfaces due to large differences in signal level when manually switched.

[0098] В одном из вариантов осуществления настоящего изобретения, который показан на фиг. 5 и основан на варианте осуществления изобретения, рассмотренном на примере фиг. 4, второй модуль 104 соединения включает первый блок 1041 получения и первый блок 1042 определения, а также первый блок 1043 соединения.[0098] In one embodiment of the present invention, which is shown in FIG. 5 and is based on the embodiment of the invention illustrated in FIG. 4, the second connection module 104 includes a first acquisition unit 1041 and a first determination unit 1042, as well as a first connection unit 1043.

[0099] Первый блок 1041 соединения сконфигурирован, если на первом контакте разъема не принят сигнал электропитания, для получения значения уровня сигнала на втором контакте разъема внешнего USB-интерфейса.[0099] The first connection unit 1041 is configured if no power signal is received at the first terminal of the connector to obtain a signal level value at the second terminal of the external USB interface connector.

[00100] В данном варианте осуществления настоящего изобретения, если на первом контакте разъема (контакт 1 разъема) внешнего USB-интерфейса терминала 1 не принят сигнал электропитания, непрерывно получают значение уровня сигнала на втором контакте разъема (контакт 3 разъема) внешнего USB-интерфейса при помощи схемы 13 обнаружения уровня -2/2 В.[00100] In this embodiment of the present invention, if a power signal is not received at the first terminal of the connector (terminal 1 of the connector) of the external USB interface of terminal 1, the signal level at the second terminal of the connector (terminal 3 of the connector) of the external USB interface is continuously received at help circuit 13 detection level -2/2 V.

[00101] Первый блок 1042 определения сконфигурирован для определения, является ли полученное значение уровня сигнала на втором контакте разъема меньшим, чем первое заранее заданное значение.[00101] The first determination unit 1042 is configured to determine whether the obtained signal level value at the second terminal of the connector is smaller than the first predetermined value.

[00102] Первый блок 1043 соединения сконфигурирован, если значение уровня сигнала на втором контакте разъема меньше, чем первое заранее заданное значение, для определения того, что устройство, внешне подключенное к терминалу 1, является вторым устройством, и для электрического соединения второго интерфейса в терминале 1, который соответствует второму устройству, с внешним USB-интерфейсом.[00102] The first connection unit 1043 is configured if the signal level value at the second terminal of the connector is less than the first predetermined value to determine that the device externally connected to terminal 1 is the second device and to electrically connect the second interface in the terminal 1, which corresponds to the second device, with an external USB interface.

[00103] В данном варианте осуществления настоящего изобретения, когда схема 13 обнаружения уровня -2/2 В определит, что значение уровня сигнала на контакте 3 разъема меньше, чем первое заранее заданное значение (например, -2 В), исходя из таблицы 4 может быть определено, что внешнее устройство, которое в данный момент подключено во внешний USB-интерфейс представляет собой устройство, имеющее интерфейс RS232. В этот момент времени управляющая переключательная схема 30 в терминале 1 обеспечивает электрическое соединение второго интерфейса (внутреннего интерфейса RS232) внутри терминала 1, который соответствует второму устройству (устройству, имеющему интерфейс RS232) со вторым устройством.[00103] In this embodiment, when the -2/2 V level detection circuit 13 determines that the signal level value at the terminal 3 of the connector is less than the first predetermined value (for example, -2 V), based on table 4 may be determined that the external device that is currently connected to the external USB interface is a device having an RS232 interface. At this point in time, the control switching circuit 30 in terminal 1 provides an electrical connection to the second interface (internal RS232 interface) inside terminal 1, which corresponds to the second device (a device having an RS232 interface) with the second device.

[00104] В одном из вариантов осуществления настоящего изобретения, который показан на фиг. 5 и основан на варианте осуществления изобретения, рассмотренном на выше на примере фиг. 4, второй модуль 104 соединения дополнительно включает блок 1044 выдачи питания, второй блок 1045 получения, второй блок 1046 определения и второй блок 1047 соединения.[00104] In one embodiment of the present invention, which is shown in FIG. 5 and is based on the embodiment of the invention discussed above with reference to FIG. 4, the second connection module 104 further includes a power delivery unit 1044, a second acquisition unit 1045, a second determination unit 1046, and a second connection unit 1047.

[00105] Блок выдачи 1044 электропитания сконфигурирован, если значение уровня сигнала на втором контакте разъема больше или равно первому заранее заданному значению, для выдачи заранее заданного напряжения в течение первого заранее заданного периода времени при помощи первого контакта разъема.[00105] The power supply output unit 1044 is configured if the signal level value at the second terminal of the connector is greater than or equal to the first predetermined value to provide a predetermined voltage for the first predetermined time period using the first terminal of the connector.

[00106] В данном варианте осуществления настоящего изобретения, когда схема 13 обнаружения уровня -2/2 В определит, что значение уровня сигнала на контакте 3 разъема больше или равно первому заранее заданному значению (например, -2 В), заранее заданное напряжение электропитания (например, 5 В) выдают в течение 500 мс при помощи первого контакта разъема (контакт 1 разъема). В других вариантах осуществления настоящего изобретения первое заранее заданное время и заранее заданное напряжение могут быть соответствующим образом выбраны согласно требованиям конкретного применения.[00106] In this embodiment of the present invention, when the -2/2 V level detection circuit 13 determines that the signal level value on the terminal 3 of the connector is greater than or equal to the first predetermined value (for example, -2 V), the predetermined supply voltage ( for example, 5 V) is output for 500 ms using the first connector pin (pin 1 of the connector). In other embodiments of the present invention, the first predetermined time and the predetermined voltage may be appropriately selected according to the requirements of a particular application.

[00107] Второй блок 1045 получения сконфигурирован для получения значений уровня сигнала на втором контакте разъема и третьем контакте разъема внешнего USB-интерфейса.[00107] The second receiving unit 1045 is configured to obtain signal level values at a second terminal pin and a third terminal pin of an external USB interface.

[00108] В данном варианте осуществления настоящего изобретения, если на первом контакте разъема не принят сигнал электропитания (например, 5 В), и схема 13 обнаружения уровня -2/2 В определит, что значение уровня сигнала на втором контакте разъема (контакте 3 разъема) больше или равно первому заранее заданному значению (например, -2 В), электропитание 5 В может быть выдано при помощи контакта 1 разъема, и затем значение уровня сигнала на третьем контакте разъема (контакт 2 разъема) может контролироваться схемой обнаружения уровня 2 В, а значение уровня сигнала на втором контакте разъема (контакт 3 разъема) может контролироваться схемой 13 обнаружения уровня -2/2 В.[00108] In this embodiment of the present invention, if no power signal (for example, 5 V) is received at the first terminal of the connector, and the -2/2 V level detection circuit 13 determines that the signal level value is at the second terminal of the connector (terminal 3 of the connector ) is greater than or equal to the first predetermined value (for example, -2 V), 5 V power can be supplied using pin 1 of the connector, and then the signal level value on the third pin of the connector (pin 2 of the connector) can be controlled by a 2 V level detection circuit, and the level value the signal at the second pin of the connector (pin 3 of the connector) can be controlled by the level detection circuit 13/2/2 V.

[00109] Второй блок 1046 определения сконфигурирован для определения, являются ли оба значения уровня сигнала, на втором контакте разъема и на третьем контакте разъема, большими, чем второе заранее заданное значение.[00109] The second determination unit 1046 is configured to determine whether both signal level values at the second terminal of the connector and the third terminal of the connector are larger than the second predetermined value.

[00110] Второй блок 1047 соединения сконфигурирован, если оба значения уровня сигнала, на втором контакте разъема и на третьем контакте разъема, больше, чем второе заранее заданное значение, для определения того, что устройство, внешне подключенное к терминалу 1, является третьим устройством, и для электрического соединения третьего интерфейса в терминале 1, который соответствует третьему устройству, с внешним USB-интерфейсом.[00110] The second connection unit 1047 is configured if both signal level values on the second terminal of the connector and on the third terminal of the connector are larger than the second predetermined value to determine that the device externally connected to terminal 1 is a third device, and for electrically connecting the third interface in terminal 1, which corresponds to the third device, with an external USB interface.

[00111] В данном варианте осуществления настоящего изобретения, если обнаружено, что значения уровня сигнала на втором контакте разъема и на третьем контакте разъема больше, чем 2 В после того, как электропитание 5 В подано при помощи контакта 1 разъема, может быть определено, исходя из таблицы 4, что устройство, внешне подключенное к терминалу, является третьим устройством, т.е. устройством, имеющим штыревой USB-интерфейс. В этот момент времени, в соответствии с иллюстрацией фиг. 7, управляющая переключательная схема 30 в терминале 1 обеспечивает электрическое соединение третьего интерфейса (гнездового USB-интерфейса) внутри терминала 1, который соответствует третьему устройству (устройству, имеющему штыревой USB-интерфейс) с третьим устройством. Соответствующая схема третьего интерфейса (т.е. гнездового USB-интерфейса) внутри терминала 1 выполняет такие операции, как инициализацию и связь по стандартному протоколу USB.[00111] In this embodiment of the present invention, if it is found that the signal level values at the second terminal of the connector and at the third terminal of the connector are greater than 2 V after the 5 V power supply is supplied by the terminal 1 of the connector, can be determined based on from table 4 that the device externally connected to the terminal is a third device, i.e. a device with a pin USB interface. At this point in time, in accordance with the illustration of FIG. 7, the control switching circuit 30 in the terminal 1 provides an electrical connection of the third interface (USB socket interface) inside the terminal 1, which corresponds to the third device (a device having a USB pin interface) with the third device. The corresponding circuit of the third interface (i.e., the USB socket interface) inside the terminal 1 performs such operations as initialization and communication via the standard USB protocol.

[00112] В одном из вариантов осуществления настоящего изобретения, который показан на фиг. 6 и основан на варианте осуществления изобретения, рассмотренном на примере фиг. 4, терминал дополнительно включает модуль 105 отсоединения.[00112] In one embodiment of the present invention, which is shown in FIG. 6 and is based on the embodiment of the invention illustrated in FIG. 4, the terminal further includes a disconnect module 105.

[00113] Модуль 105 отсоединения сконфигурирован для электрического отсоединения внешнего USB-интерфейса от первого интерфейса, второго интерфейса и третьего интерфейса.[00113] The disconnect module 105 is configured to electrically disconnect the external USB interface from the first interface, the second interface and the third interface.

[00114] В данном варианте осуществления управляющая переключательная схема 30 в терминале 1 обеспечивает электрическое отсоединение внешнего USB-интерфейса от первого интерфейса, второго интерфейса и третьего интерфейса. Таким образом, терминал 1 может автоматически идентифицировать, какое из устройств в данный момент подключено в разъем терминала, то есть, устройство с гнездовым интерфейсом USB, устройство со штыревым интерфейсом USB или устройство с интерфейсом RS232. Затем это устройство электрически соединяют с подходящим интерфейсом в терминале 1. Таким образом реализуют автоматическую идентификацию интерфейсов. Кроме того, исключено повреждение интерфейса из-за слишком значительных перепадов уровня сигнала при переключении интерфейсов вручную, которое возможно, поскольку уровни сигналов интерфейса RS232 значительно выше, чем уровни сигналов USB-интерфейса,[00114] In this embodiment, the control switching circuit 30 in the terminal 1 electrically disconnects the external USB interface from the first interface, the second interface and the third interface. Thus, terminal 1 can automatically identify which device is currently connected to the terminal connector, that is, a device with a female USB interface, a device with a USB pin interface, or a device with an RS232 interface. This device is then electrically connected to a suitable interface in terminal 1. In this way, automatic identification of the interfaces is realized. In addition, damage to the interface due to too significant differences in signal level when switching interfaces manually is possible, which is possible because the signal levels of the RS232 interface are much higher than the signal levels of the USB interface,

[00115] В одном из вариантов осуществления настоящего изобретения, который основан на варианте осуществления изобретения, рассмотренном на примере фиг. 4 или фиг. 6, модуль 101 контроля сконфигурирован для непрерывного контроля, в течение второго заранее заданного периода времени, значения уровня сигнала на первом контакте разъема внешнего USB-интерфейса терминала 1.[00115] In one embodiment of the present invention, which is based on the embodiment of the invention described in the example of FIG. 4 or FIG. 6, the monitoring module 101 is configured to continuously monitor, for a second predetermined period of time, the signal level value at the first terminal pin of the external USB interface terminal 1.

[00116] В данном варианте осуществления настоящего изобретения в течение второго заранее заданного периода времени (например, 500 мс) непрерывно контролируют значение уровня сигнала на первом контакте разъема внешнего USB-интерфейса терминала 1. Очевидно, в других вариантах осуществления настоящего изобретения могут быть выбраны другие значения заранее заданного периода времени, обеспечивающие точную регистрацию значений уровня сигнала и исключающие искажение значений уровня сигнала.[00116] In this embodiment of the present invention, for the second predetermined period of time (for example, 500 ms), the signal level value at the first terminal pin of the external USB interface terminal 1 terminal is continuously monitored. Obviously, other embodiments of the present invention may select other values of a predetermined period of time, providing accurate registration of signal level values and eliminating distortion of signal level values.

[00117] В настоящем изобретении также предложен машиночитаемый носитель, на котором хранят машиноисполняемые инструкции. Машиночитаемые инструкции исполняют в целях выполнения описанных выше способов идентификации интерфейса.[00117] The present invention also provides a computer-readable medium on which computer-executable instructions are stored. Machine-readable instructions are executed in order to perform the above methods of identifying an interface.

[00118] Специалисты в данной области техники должны понимать, что все описанные выше шаги, или их часть, могут быть реализованы программой (или программами), которая может выдавать команды соответствующему оборудованию (например, процессору). Программа (или программы) может храниться на машиночитаемом носителе, например, в памяти «только для чтения», на магнитном диске, оптическом диске и т.п. Альтернативно, все шаги описанных выше вариантов осуществления настоящего изобретения, или их часть, могут быть также реализованы при помощи одной или боле интегральных схем. Соответственно, модули и/или блоки в рассмотренных выше вариантах осуществления настоящего изобретения могут быть реализованы в аппаратной форме, например, при помощи интегральных схем, или могут быть реализованы в форме программных функций, например, за счет исполнения программы/инструкций, хранимых в памяти, с целью реализации соответствующих функций. Настоящее изобретение не ограничено никакой конкретной комбинацией аппаратного и программного обеспечения.[00118] Those of skill in the art should understand that all or part of the steps described above can be implemented by a program (or programs) that can issue instructions to appropriate equipment (eg, a processor). The program (or programs) may be stored on a computer-readable medium, for example, in a read-only memory, a magnetic disk, an optical disk, and the like. Alternatively, all or part of the steps of the above embodiments of the present invention may also be implemented using one or more integrated circuits. Accordingly, the modules and / or blocks in the above embodiments of the present invention can be implemented in hardware form, for example, using integrated circuits, or can be implemented in the form of program functions, for example, by executing programs / instructions stored in memory, in order to implement the relevant functions. The present invention is not limited to any particular combination of hardware and software.

[00119] Выше рассмотрены исключительно примеры осуществления настоящего изобретения, которые не должны рассматриваться как ограничивающие объем настоящего изобретения. Все эквивалентные структуры или модифицированные процедуры, созданные в результате ознакомления с описанием и чертежами настоящего изобретения, или после ознакомления с прямыми или косвенными конкретными применениями настоящего изобретения в других технических областях, попадают в объем настоящего изобретения.[00119] The above are solely examples of the implementation of the present invention, which should not be construed as limiting the scope of the present invention. All equivalent structures or modified procedures created as a result of familiarization with the description and drawings of the present invention, or after familiarization with direct or indirect specific applications of the present invention in other technical areas, fall within the scope of the present invention.

[00120] Промышленная применимость[00120] Industrial Applicability

[00121] В настоящем изобретении предложен способ идентификации интерфейсов и соответствующий терминал, которые позволяют автоматические идентифицировать, какое из устройств, в текущий момент внешне подключенных к терминалу, является, например, устройством с гнездовым USB-интерфейсом, устройством со штыревым USB-интерфейсом или устройством, имеющим интерфейс RS232. Затем это устройство соединяют с подходящим интерфейсом в терминале. Таким образом, настоящее изобретение позволяет реализовать автоматическую идентификацию интерфейсов, а также исключить повреждение интерфейсов из-за больших перепадов в уровне сигнала при их ручном переключении.[00121] The present invention provides a method for identifying interfaces and a corresponding terminal that can automatically identify which of the devices currently externally connected to the terminal is, for example, a device with a female USB interface, a device with a USB pin interface, or a device having an RS232 interface. This device is then connected to a suitable interface in the terminal. Thus, the present invention allows for the automatic identification of interfaces, as well as to eliminate damage to the interfaces due to large differences in the signal level when they are manually switched.

Claims (36)

1. Способ идентификации интерфейса, включающий:1. A method of identifying an interface, including: контроль значения уровня сигнала на первом контакте разъема внешнего интерфейса универсальной последовательной шины (USB) терминала;control of the signal level value on the first pin of the external serial bus (USB) terminal external interface connector; определение, принят ли на первом контакте разъема сигнал электропитания первого заранее заданного напряжения в соответствии с упомянутым значением уровня сигнала;determining whether the power signal of the first predetermined voltage is received at the first terminal of the connector in accordance with said signal level value; если на первом контакте разъема принят сигнал электропитания, определение того, что устройство, внешне подключенное к терминалу, является первым устройством, и электрическое соединение первого интерфейса в терминале, который соответствует первому устройству, с внешним USB-интерфейсом; иif a power signal is received on the first contact of the connector, determining that the device externally connected to the terminal is the first device and the electrical connection of the first interface in the terminal that corresponds to the first device with an external USB interface; and если на первом контакте разъема сигнал электропитания не принят, получение значения уровня сигнала на втором контакте разъема внешнего USB-интерфейса, и когда определено, что устройство, внешне подключенное к терминалу, является вторым устройством, в соответствии со значением уровня сигнала на втором контакте разъема, электрическое соединение второго интерфейса в терминале, который соответствует второму устройству, с внешним USB-интерфейсом;if the power signal is not received at the first terminal of the connector, obtaining a signal level value at the second terminal of the external USB interface connector, and when it is determined that the device externally connected to the terminal is the second device, in accordance with the signal level at the second terminal of the connector, electrical connection of the second interface in the terminal, which corresponds to the second device, with an external USB interface; при этом если на первом контакте разъема сигнал электропитания не принят, получение значения уровня сигнала на втором контакте разъема внешнего USB-интерфейса, и когда определено, что устройство, внешне подключенное к терминалу, является вторым устройством, в соответствии со значением уровня сигнала на втором контакте разъема, электрическое соединение второго интерфейса в терминале, который соответствует второму устройству, с внешним USB-интерфейсом, включает:if the power signal is not received at the first contact of the connector, receiving the signal level value at the second contact pin of the external USB interface connector, and when it is determined that the device externally connected to the terminal is the second device, in accordance with the signal level value at the second contact connector, the electrical connection of the second interface in the terminal, which corresponds to the second device, with an external USB interface, includes: если на первом контакте разъема не принят сигнал электропитания, получение значения уровня сигнала на втором контакте разъема внешнего USB-интерфейса;if the power signal is not received at the first contact of the connector, obtaining the signal level value at the second contact of the external USB interface connector; определение, является ли полученное значение уровня сигнала на втором контакте разъема меньшим, чем первое заранее заданное значение; иdetermining whether the obtained signal level value at the second terminal of the connector is less than the first predetermined value; and если значение уровня сигнала на втором контакте разъема меньше, чем первое заранее заданное значение, определение того, что устройство, внешне подключенное к терминалу, является вторым устройством, и электрическое соединение второго интерфейса в терминале, который соответствует второму устройству, с внешним USB-интерфейсом.if the signal level value at the second terminal of the connector is less than the first predetermined value, determining that the device externally connected to the terminal is the second device, and the electrical connection of the second interface in the terminal that corresponds to the second device with an external USB interface. 2. Способ по п. 1, в котором после определения, является ли полученное значение уровня сигнала на втором контакте разъема меньшим, чем первое заранее заданное значение, способ дополнительно включает:2. The method according to p. 1, in which after determining whether the obtained signal level value at the second terminal of the connector is smaller than the first predetermined value, the method further includes: если значение уровня сигнала на втором контакте разъема больше или равно первому заранее заданному значению, выдачу заранее заданного напряжения в течение первого заранее заданного периода времени при помощи первого контакта разъема;if the signal level value at the second terminal of the connector is greater than or equal to the first predetermined value, issuing a predetermined voltage for the first predetermined period of time using the first terminal of the connector; получение значений уровня сигнала на втором контакте разъема и третьем контакте разъема внешнего USB-интерфейса;obtaining signal level values at the second terminal pin and the third terminal pin of the external USB interface; определение, являются ли оба значения уровня сигнала, на втором контакте разъема и на третьем контакте разъема, большими, чем второе заранее заданное значение; иdetermining whether both signal level values, at the second terminal of the connector and at the third terminal of the connector, are larger than the second predetermined value; and если оба значения уровня сигнала, на втором контакте разъема и на третьем контакте разъема, больше, чем второе заранее заданное значение, определение того, что устройство, внешне подключенное к терминалу, является третьим устройством, и электрическое соединение третьего интерфейса в терминале, который соответствует третьему устройству, с внешним USB-интерфейсом.if both signal level values, on the second pin of the connector and on the third contact of the connector, are larger than the second predefined value, determining that the device externally connected to the terminal is the third device, and the electrical connection of the third interface in the terminal that corresponds to the third device with an external USB interface. 3. Способ по п. 2, в котором перед контролем значения уровня сигнала на первом контакте разъема внешнего интерфейса универсальной последовательной шины (USB) терминала, способ дополнительно включает:3. The method according to p. 2, in which before monitoring the signal level value at the first contact of the external serial bus (USB) terminal external interface connector, the method further includes: электрическое отсоединение внешнего USB-интерфейса от первого интерфейса, второго интерфейса и третьего интерфейса.electrical disconnection of the external USB interface from the first interface, the second interface and the third interface. 4. Способ по п. 1, в котором контроль значения уровня сигнала на первом контакте разъема внешнего интерфейса универсальной последовательной шины (USB) терминала включает:4. The method according to p. 1, in which monitoring the signal level at the first contact of the terminal of the external interface of the universal serial bus (USB) terminal includes: в течение второго заранее заданного периода времени непрерывный контроль значения уровня сигнала на первом контакте разъема внешнего USB-интерфейса терминала.during the second predetermined period of time, continuous monitoring of the signal level value at the first contact of the terminal external USB interface connector. 5. Терминал для идентификации интерфейса, включающий:5. A terminal for identifying an interface, including: модуль контроля, сконфигурированный для контроля значения уровня сигнала на первом контакте разъема внешнего интерфейса универсальной последовательной шины (USB) терминала;a control module configured to control the signal level value at the first contact of the terminal of the universal serial bus (USB) terminal external interface; первый модуль определения, сконфигурированный для определения, принят ли на первом контакте разъема сигнал электропитания первого заранее заданного напряжения в соответствии с упомянутым значением уровня сигнала;a first determining module, configured to determine whether the power signal of the first predetermined voltage is received at the first terminal of the connector in accordance with said signal level value; первый модуль соединения, сконфигурированный, если на первом контакте разъема принят сигнал электропитания, для определения того, что устройство, внешне подключенное к терминалу, является первым устройством, и для электрического соединения первого интерфейса в терминале, который соответствует первому устройству, с внешним USB-интерфейсом; иthe first connection module, configured if a power signal is received on the first contact of the connector to determine that the device externally connected to the terminal is the first device, and to electrically connect the first interface in the terminal that corresponds to the first device with an external USB interface ; and второй модуль соединения, сконфигурированный, если на первом контакте разъема сигнал электропитания не принят, для получения значения уровня сигнала на втором контакте разъема внешнего USB-интерфейса, и когда определено, что устройство, внешне подключенное к терминалу, является вторым устройством, в соответствии со значением уровня сигнала на втором контакте разъема, для электрического соединения второго интерфейса в терминале, который соответствует второму устройству, с внешним USB-интерфейсом;a second connection module, configured if no power signal is received at the first terminal of the connector to obtain a signal level value at the second terminal of the external USB interface connector, and when it is determined that the device externally connected to the terminal is a second device, in accordance with the value the signal level at the second pin of the connector, for electrical connection of the second interface in the terminal, which corresponds to the second device, with an external USB interface; при этом второй модуль соединения включает:wherein the second connection module includes: первый блок соединения, сконфигурированный, если на первом контакте разъема не принят сигнал электропитания, для получения значения уровня сигнала на втором контакте разъема внешнего USB-интерфейса;the first connection unit, configured if the power signal is not received at the first terminal of the connector to obtain a signal level value at the second terminal of the external USB interface connector; первый блок определения, сконфигурированный для определения, является ли полученное значение уровня сигнала на втором контакте разъема меньшим, чем первое заранее заданное значение; иa first determining unit configured to determine whether the obtained signal level value at the second terminal of the connector is smaller than the first predetermined value; and первый блок соединения, сконфигурированный, если значение уровня сигнала на втором контакте разъема меньше, чем первое заранее заданное значение, для определения того, что устройство, внешне подключенное к терминалу, является вторым устройством, и для электрического соединения второго интерфейса в терминале, который соответствует второму устройству, с внешним USB-интерфейсом.a first connection unit, configured if the signal level value at the second terminal of the connector is less than the first predetermined value, to determine that the device externally connected to the terminal is a second device, and to electrically connect the second interface in the terminal that corresponds to the second device with an external USB interface. 6. Терминал по п. 5, в котором второй модуль соединения дополнительно включает:6. The terminal of claim 5, wherein the second connection module further includes: блок выдачи питания, сконфигурированный, если значение уровня сигнала на втором контакте разъема больше или равно первому заранее заданному значению, для выдачи заранее заданного напряжения в течение первого заранее заданного периода времени при помощи первого контакта разъема;a power supply unit, configured if the signal level value at the second terminal of the connector is greater than or equal to the first predetermined value, for delivering a predetermined voltage within the first predetermined period of time using the first terminal of the connector; второй блок получения, сконфигурированный для получения значений уровня сигнала на втором контакте разъема и третьем контакте разъема внешнего USB-интерфейса;a second receiving unit, configured to obtain signal level values at a second terminal pin and a third terminal pin of an external USB interface; второй блок определения, сконфигурированный для определения, являются ли оба значения уровня сигнала, на втором контакте разъема и на третьем контакте разъема, большими, чем второе заранее заданное значение; иa second determining unit, configured to determine whether both signal level values, at the second terminal of the connector and at the third terminal of the connector, are larger than the second predetermined value; and второй блок соединения, сконфигурированный, если оба значения уровня сигнала, на втором контакте разъема и на третьем контакте разъема, больше, чем второе заранее заданное значение, для определения того, что устройство, внешне подключенное к терминалу, является третьим устройством, и для электрического соединения третьего интерфейса в терминале, который соответствует третьему устройству, с внешним USB-интерфейсом.a second connection unit, configured if both signal level values, on the second terminal of the connector and on the third terminal of the connector, are larger than the second predetermined value to determine that the device externally connected to the terminal is a third device, and for electrical connection the third interface in the terminal, which corresponds to the third device, with an external USB interface. 7. Терминал по п. 6, также включающий:7. The terminal according to claim 6, also including: модуль отсоединения, сконфигурированный для электрического отсоединения внешнего USB-интерфейса от первого интерфейса, второго интерфейса и третьего интерфейса.a disconnect module configured to electrically disconnect the external USB interface from the first interface, the second interface and the third interface. 8. Терминал по п. 5, в котором модуль контроля сконфигурирован, в течение второго заранее заданного периода времени, для непрерывного контроля значения уровня сигнала на первом контакте разъема внешнего USB-интерфейса терминала.8. The terminal according to claim 5, in which the monitoring module is configured, for a second predetermined period of time, for continuous monitoring of the signal level value at the first contact of the terminal external USB interface connector. 9. Машиночитаемый носитель, имеющий хранимые на нем машиноисполняемые инструкции, при этом упомянутые машиноисполняемые инструкции исполняют для выполнения способа по любому из пп. 1-4.9. A computer-readable medium having computer-executable instructions stored thereon, wherein said computer-executable instructions are executed to perform a method according to any one of claims. 1-4.
RU2017137241A 2015-04-02 2016-03-14 Interface identification method and terminal RU2683615C1 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN201510155843.3 2015-04-02
CN201510155843.3A CN106155956B (en) 2015-04-02 2015-04-02 Interface identification method and terminal
PCT/CN2016/076279 WO2016155483A1 (en) 2015-04-02 2016-03-14 Interface identification method and terminal

Publications (1)

Publication Number Publication Date
RU2683615C1 true RU2683615C1 (en) 2019-03-29

Family

ID=57004722

Family Applications (1)

Application Number Title Priority Date Filing Date
RU2017137241A RU2683615C1 (en) 2015-04-02 2016-03-14 Interface identification method and terminal

Country Status (4)

Country Link
JP (1) JP6491760B2 (en)
CN (1) CN106155956B (en)
RU (1) RU2683615C1 (en)
WO (1) WO2016155483A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112448820A (en) * 2019-08-27 2021-03-05 中兴通讯股份有限公司 Communication equipment panel interface and communication equipment
CN114115501B (en) * 2021-11-01 2024-04-02 佛山市顺德区美的电子科技有限公司 Interface voltage control circuit, method, electronic device, and storage medium
CN114817337B (en) * 2022-06-23 2022-09-16 深圳市科中云技术有限公司 Hardware interface type self-adaptive matching method and related device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020169915A1 (en) * 2001-05-08 2002-11-14 Wen-Jen Wu USB connection-detection circuitry and operation methods of the same
CN101030189A (en) * 2007-03-09 2007-09-05 华为技术有限公司 Method for inspecting connected peripheral apparatus mode, terminal, earphone, charger and USB interface
RU2006124862A (en) * 2003-12-12 2008-01-20 Сони Эрикссон Мобайл Коммьюникейшнз Аб (Se) ACCESSORIES IDENTIFICATION ALGORITHM FOR SYSTEM CONNECTOR CONNECTOR
US7635280B1 (en) * 2008-07-30 2009-12-22 Apple Inc. Type A USB receptacle with plug detection
WO2013056683A1 (en) * 2011-10-21 2013-04-25 华为终端有限公司 Method for selecting internal circuit according to usb interface status and terminal

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001109697A (en) * 1999-10-07 2001-04-20 Victor Co Of Japan Ltd Multiinterface device and bios processing method
JP2002007302A (en) * 2000-06-26 2002-01-11 Sony Corp Information processing system, pedestal device, portable information processor, and identifying method for pedestal device
JP2003241867A (en) * 2002-02-18 2003-08-29 Kyocera Corp Portable terminal, communication cable and interface switching method
CN2640130Y (en) * 2003-04-14 2004-09-08 上海先达企业发展有限公司 Composite communication interface
CN101276319B (en) * 2008-02-05 2010-04-21 北京飞天诚信科技有限公司 Equipment and method for making USB interface to time-sharing apply as standard I /O interface
CN101404001B (en) * 2008-11-10 2010-06-30 华为终端有限公司 Serial port signal and USB signal compatible control circuit board and communication data cable
CN102193503A (en) * 2010-03-15 2011-09-21 研祥智能科技股份有限公司 Industrial control mainboard and method thereof for identifying external device
CN102082846B (en) * 2010-12-02 2014-01-15 惠州Tcl移动通信有限公司 Terminal equipment with plurality of externally arranged shared interfaces
JP5797949B2 (en) * 2011-06-28 2015-10-21 富士通コンポーネント株式会社 Communication device
CN102750252B (en) * 2012-05-29 2016-06-29 惠州Tcl移动通信有限公司 USB/UART interface multiplexing circuit and use the electronic equipment of this circuit
CN102880238B (en) * 2012-08-30 2015-07-22 中兴通讯股份有限公司 Interface expanding method and device for tablet personal computer
US9183168B2 (en) * 2013-02-22 2015-11-10 Dell Products, Lp Dual mode USB and serial console port
JP5913211B2 (en) * 2013-06-21 2016-04-27 東芝テック株式会社 Interface device and information processing device
CN104035357B (en) * 2014-06-27 2017-04-19 广东欧珀移动通信有限公司 Headset, charging and OTG equipment circuit design based on USB socket

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020169915A1 (en) * 2001-05-08 2002-11-14 Wen-Jen Wu USB connection-detection circuitry and operation methods of the same
RU2006124862A (en) * 2003-12-12 2008-01-20 Сони Эрикссон Мобайл Коммьюникейшнз Аб (Se) ACCESSORIES IDENTIFICATION ALGORITHM FOR SYSTEM CONNECTOR CONNECTOR
CN101030189A (en) * 2007-03-09 2007-09-05 华为技术有限公司 Method for inspecting connected peripheral apparatus mode, terminal, earphone, charger and USB interface
US7635280B1 (en) * 2008-07-30 2009-12-22 Apple Inc. Type A USB receptacle with plug detection
WO2013056683A1 (en) * 2011-10-21 2013-04-25 华为终端有限公司 Method for selecting internal circuit according to usb interface status and terminal

Also Published As

Publication number Publication date
JP2018511879A (en) 2018-04-26
CN106155956B (en) 2020-08-28
JP6491760B2 (en) 2019-03-27
WO2016155483A1 (en) 2016-10-06
CN106155956A (en) 2016-11-23

Similar Documents

Publication Publication Date Title
US10153652B2 (en) Charging system
CN107678985B (en) Display device and signal source switching method
US10931125B2 (en) Detection circuit and method for starting charging
RU2683615C1 (en) Interface identification method and terminal
US9215526B2 (en) Circuit for microphone pin assignment detection and method thereof
KR20140126491A (en) power supply circuit and method for controlling thereof
CN203933930U (en) Earphone interface circuit and portable electron device
CN111246199B (en) Control method and device for camera test, terminal equipment and storage medium
KR102012937B1 (en) Apparatus and method for connecting an external device in a portable terminal
US10942553B2 (en) Display device
US20140334112A1 (en) Motherboard with connector compatible with different interface standards
CN107706977B (en) Charging current detection method and charging device
US20200067244A1 (en) Plug and Multi-Mode Charging and Audio Cable
CN105611218A (en) Video conference switching system
CN214375036U (en) Mobile device test system
WO2017070828A1 (en) Loudspeaker module, audio compensation method and device
WO2021057373A1 (en) Method for realizing functions of both earphone and serial port by means of earphone pin
KR20220160450A (en) State detection device for use in an audio interface
CN108287289B (en) Common ground detection circuit and detection method thereof
TWI652949B (en) Headset apparatus
US10545551B2 (en) Communication device and communication method for transmitting data according to a predetermined communication standard
CN220526325U (en) Interface detection circuit and terminal equipment
CN215647302U (en) Audio processing device and audio system
US20230204635A1 (en) Power capability determination device, electronic device, and power capability determination method
CN111030226B (en) Equipment detection method and electronic equipment

Legal Events

Date Code Title Description
MM4A The patent is invalid due to non-payment of fees

Effective date: 20210315