1. Technical Field
The present disclosure relates to wire control devices and, particularly, to a wire control device for a wired remote control of an electronic device.
2. Description of Related Art
With the development of miniaturization, and the trend towards the portability of electronic devices, a number of functions that are added, such as music, video, e-book reading, to the electronic devices, to make electronic devices user-friendly. In the meantime, adding more functions to the accessories of electronic devices also becomes an increasingly popular trend. However, to achieve complex functions, the accessories often have complex circuits, which will increase the production costs of the accessories.
Many aspects of the embodiments can be better understood with reference to the following drawings. The components in the drawings are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of the present disclosure. Moreover, in the drawings, like reference numerals designate corresponding parts throughout the several views.
Referring to
In the embodiment, one terminal of the control switch 12 is connected to the
ID pin of the first USB connector 111, and the other terminal of the control switch 12 is connected to the GND pin of the first USB connector 111. In the embodiment, the control switch 12 is an automatic reset switch, when pressed, the control switch 12 is switched on, and the ID pin and the GND pin of the first USB connector 111 are coupled together by the control switch 12; when released, the control switch 12 is switched off, and the ID pin and the GND pin of the first USB connector 111 are disconnected.
The electronic reading device 30 includes a USB port 31, a process unit 32, a storage unit 33, and a display unit 34. The storage unit 33 stores digital files. The display unit 33 displays the files for users to choose and read. In the embodiment, the USB port 31 mates with the first USB connector 111, and also includes five pins: a power pin (VBUS), a first data pin (D+), a second data pin (D−), a General Purpose Input/Output pin GPIO, and a ground pin (GND). The GPIO pin connects to a power source VCC via a pull-up resistor 34 and obtains a high voltage, the GND pin is grounded.
When the first USB connector 111 of the wire control device 10 (or 10′) connects to the USB port 31, the five pins of the first USB connector 111 are coupled to corresponding pins of the USB port 31, namely the VBUS pin, the D+ pin, the D− pin, the ID pin, and the ground GND of the first USB connector 111 are coupled to the VBUS pin, the D+ pin, the D− pin, the GPIO pin, and the GND pin of the USB port 31, respectively. With such connecting structure, the ID pin of the first USB connector 111 is connected to the GPIO pin of the USB port 31 and obtains a high voltage, the GND pin of the first USB connector 111 is connected to the GND pin of the USB port 31 and obtains a low voltage.
The wire control device 10 (or 10′) can be used in two modes: a data transmission mode and a wired remote control mode. When the second USB connector 112 (or 112′) connects to an electronic device 20, the USB control device 10 (or 10′) is used in the data transmission mode, and the wire control device 10 (or 10′) can transmit data between the electronic device 20 and the electronic reading device 30 via the USB cable 11 (or 11′). When user presses the control switch 12 on the wire control device 10 (or 10′), the USB control device 10 (or 10′) is used in the wired remote control mode, and the control switch 12 generates control signals, and the electronic reading device 30 receives the control signals via the USB port 31 and executes corresponding functions. In the embodiment, the wire control device 10 (or 10′) remotely controls the electronic reading device 30 to flip pages.
In the embodiment, when pressed, the control switch 12 is switched on, and the ID pin of the first USB connector 111 is connected to the GND pin of the first USB connector 111 and obtains a low voltage. Thus, the GPIO pin of the USB port 31 also obtains a low voltage via the ID pin of the first USB connector 111.
The process unit 32 detects the voltage of the GPIO pin of the USB port 31, determines an operation type according to the voltage of the GPIO pin and a duration of the voltage, and executes a corresponding function. In the embodiment, when the control switch 12 is pressed for a first duration t1, namely, the process unit 32 detects that the GPIO pin of the USB port 31 obtains a low voltage, and the first duration t1 falls within a first predetermined time length, such as 2 ms<t1<=10 ms, the process unit 32 flips a page backwards and updates the content on the display unit 33. When the control switch 12 is pressed for a second duration t2, namely, the process unit 32 detects that the GPIO pin of the USB port 31 obtains a low voltage. If the second duration t2 falls within a second predetermined time length, such as 10 ms<t2<=20 ms, the process unit 32 flips a page forward and updates the content on the display unit 33.
Referring to the
In step S201, the electronic reading device 30 connects to the wire control device 10 (or 10′).
In step S202, the process unit 32 detects the voltage of the GPIO pin of the USB port 31.
In step S203, the process unit 32 determines whether the voltage of the GPIO pin is a low voltage?
If the voltage of the GPIO pin is not a low voltage, the procedure goes back to step S202. If the voltage of the GPIO pin is a low voltage, in step S204, the process unit 32 determines which time length the duration of the low voltage falls in.
In step S205, if the duration t falls in the first time length, the process unit 32 flips a page backwards and updates the content on the display unit, and then goes back to step S202.
In step S206, if the duration falls in the second time length, the process unit 32 flips a page forward and updates the content on the display unit 33, and then goes back to step S202.
Moreover, it is to be understood that the disclosure may be embodied in other forms without departing from the spirit thereof. Thus, the present examples and embodiments are to be considered in all respects as illustrative and not restrictive, and the disclosure is not to be limited to the details given herein.
Number | Date | Country | Kind |
---|---|---|---|
201010524981.1 | Oct 2010 | CN | national |