U.S. patent application number 12/719698 was filed with the patent office on 2011-06-16 for quadrature signal decoding using a driver.
This patent application is currently assigned to STMICROELECTRONICS Pvt. Ltd.. Invention is credited to Ranajay MALLIK, Munish MANGAL.
Application Number | 20110142155 12/719698 |
Document ID | / |
Family ID | 44142885 |
Filed Date | 2011-06-16 |
United States Patent
Application |
20110142155 |
Kind Code |
A1 |
MALLIK; Ranajay ; et
al. |
June 16, 2011 |
QUADRATURE SIGNAL DECODING USING A DRIVER
Abstract
A system and method for decoding quadrature signals includes a
quadrature signal generator, a quadrature signal decoder, a key
matrix and a driver. The quadrature signal generator generates
quadrature signals on rotation. The quadrature signal decoder is
configured to convert the quadrature signals into non-overlapping
signals. The key matrix is configured to receive the
non-overlapping signals. The driver is configured to scan the key
matrix to decode the non-overlapping signals to generate an event
update corresponding to a direction of rotation of the quadrature
signal generator.
Inventors: |
MALLIK; Ranajay; (Ghaziabad,
IN) ; MANGAL; Munish; (Armritsar, IN) |
Assignee: |
STMICROELECTRONICS Pvt.
Ltd.
Greater Noida
IN
|
Family ID: |
44142885 |
Appl. No.: |
12/719698 |
Filed: |
March 8, 2010 |
Current U.S.
Class: |
375/268 |
Current CPC
Class: |
H03M 1/305 20130101;
H04L 27/22 20130101; H03M 1/303 20130101; H03M 1/306 20130101 |
Class at
Publication: |
375/268 |
International
Class: |
H04L 27/02 20060101
H04L027/02 |
Foreign Application Data
Date |
Code |
Application Number |
Dec 15, 2009 |
IN |
2605/DEL/2009 |
Claims
1. A system comprising: a quadrature signal generator operative to
generate quadrature signals on rotation; a quadrature signal
decoder operative to convert the quadrature signals into
non-overlapping signals; a key matrix operative to receive the
non-overlapping signals; and a driver coupled to the key matrix and
operative to decode the non-overlapping signals and generate an
event update corresponding to a direction of rotation of the
quadrature signal generator.
2. The system as claimed in claim 1, wherein the key matrix
transfers each of the non-overlapping signals to the driver through
a corresponding key input.
3. The system as claimed in claim 1, wherein the quadrature signal
generator is selected from a group of an incremental rotary
encoder, an optical tachometer, and a hall effect sensor.
4. The system as claimed in claim 1, wherein a segment output of
the driver is coupled to complementary signals of the
non-overlapping signals.
5. The system as claimed in claim 1, further comprising: a
transistor coupled at a collector terminal to a segment output of
the driver, wherein a base terminal of the transistor receives one
of the non-overlapping signals.
6. The system as claimed in claim 1, wherein the key matrix
receives each of the non-overlapping signals through a
corresponding transistor.
7. The system as claimed in claim 1 further comprising: a
microcontroller coupled to the driver, wherein the driver sends an
interrupt signal to the microcontroller to indicate generation of
the event update.
8. The system as claimed in claim 7, wherein the microcontroller
facilitates a pre-determined action based on the interrupt
signal.
9. The system as claimed in claim 7 further comprising: a display
unit coupled to the driver, wherein the microcontroller facilitates
display of the direction of rotation of the quadrature signal
generator onto the display unit through the driver.
10. The system as claimed in claim 1, wherein the driver comprises
a storage element to store the event update.
11. A method comprising: deriving non-overlapping signals from
quadrature signals; providing the non-overlapping signals to a key
matrix; and scanning the key matrix to decode the non-overlapping
signals.
12. The method as claimed in claim 11, further comprising updating
a storage element based on the scanning.
13. The method as claimed in claim 12, further comprising: sending
an interrupt signal to a microcontroller based on the updating of
the storage element.
14. The method as claimed in claim 11, wherein the scanning
includes generating an event update, corresponding to a direction
of rotation of a quadrature signal generator, based on a current
between a segment output and a key input.
15. A method comprising: generating quadrature signals on rotation;
converting the quadrature signals into non-overlapping signals; and
decoding the non-overlapping signals and generating an event update
corresponding to a direction of rotation.
Description
RELATED APPLICATION
[0001] The present application claims priority of Indian Patent
Application No. 2605/DEL/2009 filed Dec. 15, 2009, which is
incorporated herein in its entirety by this reference.
FIELD OF THE INVENTION
[0002] The present invention relates to quadrature signal
generators. The present invention has particular utility in systems
for decoding quadrature signals using a driver.
BACKGROUND
[0003] Appliances, such as washing machines, audio-video players
and set top boxes, include one or more quadrature signal generators
on their respective user interfaces. Examples of quadrature signal
generators include, but are not limited to, incremental rotary
encoders and hall effect sensors.
[0004] In general, the quadrature signal generators track motion
and determine an angular position and velocity of a shaft by
providing two outputs that are 90.degree. out of phase with each
other. In other words, the quadrature signal generators provide
quadrature signals in response to movement of the shaft. Such
quadrature signals can be decoded either by a microcontroller or by
an integrated circuit (IC) dedicated for the purpose.
[0005] Generally, several bytes of memory are consumed by coding
instructions, which are written in the microcontroller, to decode
the quadrature signals. In addition, extra lines or cables are
required to interface the microcontroller with the incremental
rotary encoder. The burden becomes even more pronounced in complex
applications where the microcontroller has to attend to critical
tasks as well. On the other hand, ICs that are used for the purpose
of decoding quadrature signals are not just complex to implement,
but are also cost ineffective. In addition, the ICs occupy a
substantial fraction of the board real estate.
SUMMARY
[0006] This summary is provided to introduce concepts related to
decoding of quadrature signals using a driver, which are further
described below in the detailed description. This summary is not
intended to identify essential features of the claimed subject
matter nor is it intended for use in determining or limiting the
scope of the claimed subject matter.
[0007] In one embodiment, the system includes a quadrature signal
generator, a quadrature signal decoder, a key matrix, and a driver.
The quadrature signal generator generates a plurality of quadrature
signals on rotation. The quadrature signal decoder is configured to
convert the plurality of quadrature signals into non-overlapping
signals. The key matrix is configured to receive the
non-overlapping signals. Further, the driver scans the key matrix
to decode the non-overlapping signals and generate an event update
corresponding to a direction of rotation of the quadrature signal
generator.
BRIEF DESCRIPTION OF THE DRAWINGS
[0008] The detailed description is described with reference to the
accompanying figures. In the figures, the left-most digit(s) of a
reference number identifies the figure in which the reference
number first appears. The same numbers are used throughout the
drawings to reference like features and components. For simplicity
and clarity of illustration, elements in the figures are not
necessarily to scale.
[0009] FIG. 1 illustrates an exemplary system for decoding
quadrature signals, in accordance with an embodiment of the present
subject matter.
[0010] FIG. 2(a) illustrates an exemplary configuration of a
quadrature signal decoder, in accordance with an embodiment of the
present subject matter.
[0011] FIG. 2(b) is a graphical representation of quadrature
signals provided by a quadrature signal generator and plots of
non-overlapping signals generated by the quadrature signal decoder,
in accordance with an embodiment of the present subject matter.
[0012] FIG. 3 illustrates an exemplary method diagram for decoding
quadrature signals using a driver, in accordance with an embodiment
of the present subject matter.
DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS
[0013] The disclosed subject matter relates to decoding of signals
using a driver. Particularly, the subject matter relates to the
decoding of quadrature signals generated by a quadrature signal
generator.
[0014] Typically, to facilitate and simplify operation of
appliances, such as DVD players and washing machines, one or more
quadrature signal generators, for example, incremental rotary
encoders are provided with the appliances. The quadrature signal
generator generates quadrature signals corresponding to rotation of
the quadrature signal generator in a clockwise or a counter
clockwise direction. Decoding of the quadrature signals is
generally achieved through a set of instructions in the
microcontroller. Based on whether the quadrature signal generator
has moved clockwise or counter clockwise, the microcontroller
chooses a specific action. The specific action may include actions,
such as updating the LED display unit, increasing volume/channel,
decreasing brightness, etc.
[0015] However, the aforementioned scheme consumes substantial code
space within the microcontroller, which can be used instead for
other critical tasks. In addition, the interconnections between the
quadrature signal generator and the microcontroller make the
appliances unnecessarily complex. Therefore, some schemes utilize
dedicated integrated circuits (ICs) for the purpose of decoding
quadrature signals. However, the dedicated ICs add to the overall
cost of the appliances and are also area consuming.
[0016] The present subject matter relates to a system and method
for decoding quadrature signals with reduced complexity and minimal
cost. In one implementation, a light emitting diode (LED) driver
having a key matrix interface is used to decode the quadrature
signals generated by quadrature signal generators, such as
incremental rotary encoders, hall effect sensors, etc. Such an LED
driver may be already present in the appliances, for example, to
drive eight segment LED display units.
[0017] The LED display units, formed from multiple LEDs, are
generally provided as a part of a user interface of the appliances.
The LED drivers are designed to drive the LEDs connected in either
a common anode or a common cathode configuration. Further, the LED
driver is coupled to a key matrix, which is a matrix of keys or
switches. Such a key matrix is also a part of the user interface of
the appliances. An event such as a key press or a key release can
be decoded by the LED driver by scanning the key matrix. For the
purpose, each key is individually coupled between a key input and a
segment output of the LED driver. The LED driver scans the segment
outputs and key inputs in one scanning cycle, and if any key is
pressed, the LED driver senses the key press and updates an
internal storage element.
[0018] Further, the LED driver sends an interrupt signal to a
microcontroller. The microcontroller accordingly reads the storage
element and takes a decision for subsequent action corresponding to
the key press. The LED display unit, which is coupled to the LED
driver, may or may not be updated depending on the action taken by
the microcontroller. In a similar manner, the key release event is
decoded.
[0019] Therefore, the LED drivers are enriched with a number of
functionalities, for example, capability of driving multiple LEDs,
controlling brightness of LEDs, decoding key matrix, and
interfacing with the microcontroller. The present subject matter
relates to configuring such a driver associated with the key matrix
interface to decode the quadrature signals in a manner similar to
the detection of a key press.
[0020] In the present implementation, the system for decoding
quadrature signals includes a quadrature signal decoder, a key
matrix, and a driver. The quadrature signal decoder converts a
plurality of quadrature signals into non-overlapping signals. The
key matrix is configured to receive the non-overlapping signals.
Further, the driver scans the key matrix to decode the
non-overlapping signals.
[0021] Devices that can implement the disclosed quadrature signal
decoding using driver include, but are not limited to, automobile
dashboards, set-top boxes, computing devices, washing machines,
video cassette recorders (VCRs), digital versatile disc (DVD)
players, microwave ovens, refrigerators, and other white goods.
[0022] FIG. 1 illustrates an exemplary system 100 for decoding
quadrature signals. The system 100 includes a driver 102 configured
to drive a display unit 104. The driver 102 may be a light emitting
diode (LED) driver configured to drive an eight segment, six digit
LED display unit. Alternatively, the driver 102 may be a vacuum
fluorescent display (VFD) driver designed to drive a VFD display
unit.
[0023] The operation and construction of the system 100 is
described with reference to certain examples and illustrations. The
examples, in no way, should be construed to be limiting. In the
description to follow, the LED driver and the LED display unit have
been used to explain the operation of the system 100. However, it
will be appreciated that the following description extends to
various driver-display unit configurations in accordance with the
present subject matter. Accordingly, some variations may be
possible with a change in the driver-display unit configuration, as
will be understood by a person skilled in the art.
[0024] The driver 102 may be a common anode LED driver, which can
be used to drive multiple LEDs (not shown in this figure) using
segment outputs 106 and digit outputs 108. There can be eight
segment outputs 106-1, 106-2, . . . , 106-8, for an eight segment
LED display unit and six digit outputs 108-1, 108-2, . . . , 108-6,
for driving six digits of the LED display unit. Additionally, there
may be one more digit output 108-7 for driving all the digits
simultaneously.
[0025] The driver 102 adjusts the current provided to each of the
LEDs through an external resistor in conformance with current
rating of the LEDs. In the common anode configuration, the segment
outputs 106 sink current from cathodes of the LEDs, while the digit
outputs 108 source current to anodes of the LEDs.
[0026] The driver 102 may be coupled to a key matrix 110 that
serves as a user interface or part of the user interface. The key
matrix 110 is formed using a set of switches or keys 112, usually
arranged in a grid or matrix form. The keys 112 are located at the
intersection points of rows and columns of the key matrix 110.
Typically, an event, for example, a key press or a key release, is
decoded by a driver by scanning the rows and the columns in a
specific manner. For the purpose, the rows are coupled to key
inputs of a driver and the columns are coupled to segment outputs
of the driver. For example, in a 8.times.2 key matrix 110, two rows
are coupled to two key inputs of the driver 102, namely key input
114-1 and key input 114-2, while eight columns are coupled to the
eight segment outputs 106 of the driver 102. For illustration
purposes, a segment output 106-1 is depicted as one of the eight
segment outputs 106. The driver 102 is configured to sequentially
scan the segment outputs 106 and the key inputs 114-1 and 114-2 to
decode an event like a key press or a key release.
[0027] In case a key from amongst the keys 112 is pressed by the
user, the row and column corresponding to that key get coupled.
Subsequently, the driver 102 scans each column one by one to
determine a location of the depressed key. Such a scan of the key
matrix 110 yields that the current in the key input is equal to the
current in the corresponding segment output, thereby giving the
driver 102 an indication that a specific key is pressed.
[0028] The key press may be de-bounced to ensure that the key has
indeed been pressed. Once the location of the depressed key has
been correctly determined, a storage element 116 within the driver
102 is updated with, for example, the location of the depressed
key. In one implementation, the storage element 116 is a
register.
[0029] Furthermore, the driver 102 generates an interrupt signal
118 and provides the interrupt signal 118 to a microcontroller 120.
The microcontroller 120 can generate and receive signals, for
example, the interrupt signal 118, clock signal 122, etc., based on
operational instructions. Among other capabilities, the
microcontroller 120 is configured to provide data 124 to the driver
102. The data 124 can be in provided in the form of commands.
Examples of such commands include configuration commands to
configure the driver 102 for displaying the location of the
depressed key, data read commands for reading the location of the
depressed key, and memory write commands for writing in a memory of
the microcontroller 120. In response to every interrupt signal 118,
the microcontroller 120 interfaces with the driver 102 to read the
storage element 116 and take an appropriate action depending on the
application. In one example, the microcontroller 120 facilitates
display of a value of the depressed key on the display unit 104
through the driver 102.
[0030] In addition to the above mentioned components, the system
100 includes a quadrature signal generator 126. Examples of the
quadrature signal generator 126 include, but are not limited to,
incremental rotary encoders, hall effect sensors and optical
tachometers. The quadrature signal generator 126 is capable of
generating quadrature signals, namely quadrature signal 128-1 and
quadrature signal 128-2, hereinafter collectively referred to as
quadrature signals 128. The quadrature signals 128 are 90.degree.
out of phase with each other. Based on whether the quadrature
signal generator 126 is turned in a clockwise or a counter
clockwise direction, one of the two quadrature signals 128 either
lags or leads with respect to the other. Thus, the lead-lag
relationship between the quadrature signals 128 helps in
determining the speed and the direction of rotation of a component,
say a shaft, integral to the quadrature signal generator 126.
[0031] To this end, the quadrature signals 128 are decoded in two
phases. In a first phase, a quadrature signal decoder 130 coupled
to the quadrature signal generator 126 decodes the quadrature
signals 128 to generate non-overlapping signals 132, which are then
decoded by the driver 102 in a second phase. This is further
elaborated in the subsequent paragraphs.
[0032] In the first phase, the quadrature signal decoder 130
converts the quadrature signals 128-1 and 128-2 into
non-overlapping signals 132-1 and 132-2, respectively, based on the
direction of rotation of the quadrature signal generator 126. In
one implementation, when the quadrature signal generator 126
rotates in a clockwise direction, the quadrature signal decoder 130
converts the quadrature signal 128-1 into the non-overlapping
signal 132-1, while providing a zero signal at the non-overlapping
signal 132-2. Similarly, when the quadrature signal generator 126
rotates in a counter clock wise direction, the quadrature signal
decoder 130 converts the quadrature signal 128-2 into the
non-overlapping signal 132-2, while providing a zero signal at the
non-overlapping signal 132-1.
[0033] The non-overlapping signals 132-1 and 132-2 obtained on the
first and the second output terminals, respectively, of the
quadrature signal decoder 130 are coupled to the key inputs 114-1
and 114-2, respectively. On the other hand, the complementary
signals of the two non-overlapping signals, namely complementary
non-overlapping signals 134-1 and 134-2 obtained on third and
fourth output terminals, respectively, of quadrature signal decoder
130, are coupled to a segment output of the driver 102, for
example, the segment output 106-1. In such a configuration, the
user interface is reduced to a 7.times.2 key matrix, as one segment
output is being used for the purpose of decoding the quadrature
signals.
[0034] In operation, whenever there is a clockwise rotation of the
quadrature signal generator 126, the non-overlapping signal 132-1
and the complementary non-overlapping signal 134-1 are obtained at
the first and third output terminals of the quadrature signal
decoder 130, respectively in the first phase. Due to the
configuration described earlier, the non-overlapping signal 132-1
and the complementary non-overlapping signal 134-1 also appear at
the key input 114-1 and segment output 106-1 respectively.
[0035] In the second phase of decoding the quadrature signals 128,
the driver 102 scans the key matrix 110, row by row and column by
column. When the driver 102 scans the key matrix 110, it appears as
if a current from the segment output 106-1 is being sinked, while
an equivalent current is being sourced to the key input 114-1. This
gives an impression that a first key has been pressed. Accordingly,
the driver 102 also considers the rotation of the quadrature signal
generator 126 as a key press and updates its storage element 116
with an event update of the key press. Subsequently, the driver 102
sends the interrupt signal 118 to the microcontroller 120.
[0036] Similarly, whenever the quadrature signal generator 126
rotates in a counter clock wise direction, the non-overlapping
signal 132-2 and the complementary non-overlapping signal 134-2 are
obtained at the second and fourth output terminals of the
quadrature signal decoder 130, respectively. Again, when the driver
102 scans the key matrix 110, it appears as if a current from the
segment output 106-1 is being synchronized? sinked, while a current
is being sourced to the key input 114-2, thus giving an impression
that a second key has been pressed. The storage element 116 is
updated with an event update to indicate that the second key
located at the intersection of key input 114-2 and segment output
106-1 is depressed, and the interrupt signal 118 is generated by
the driver 102.
[0037] In response to the interrupt signal 118, the microcontroller
120 reads the event update in the storage element 116. Based on the
reading, the microcontroller 120 may facilitate various actions,
for instance, updating the display unit 104, increasing
volume/channel, and decreasing brightness. In one example, the
microcontroller 120 facilitates display of the direction of
rotation of the quadrature signal generator 126 onto the display
unit 104 through the driver 102.
[0038] Thus, the quadrature signals 128 can be decoded using
existing scanning logic of the key matrix 110 present in the system
100. As the algorithm for decoding of the key press or release
events is already implemented in the microcontroller 120, no
additional coding is required for decoding of key press or release
events created due to the quadrature signals 128. In addition, the
number of connections to the microcontroller 120 are also limited,
thus reducing the overall cost and complexity of the application in
which the system 100 is implemented. An exemplary configuration of
the quadrature signal decoder 130 is elaborated in subsequent
figures to further illustrate its operation.
[0039] FIG. 2(a) illustrates an exemplary configuration 200 of the
quadrature signal decoder 130. FIG. 2(b) is a graphical
representation of the quadrature signals 128, provided by the
quadrature signal generator 126, and plots of the non-overlapping
signals 132-1 and 132-2 generated by the quadrature signal decoder
130.
[0040] In one implementation, the quadrature signal generator 126
may be a rotary encoder, for example, an incremental rotary encoder
202. Generally, the incremental rotary encoder 202 is used in
applications and devices that require precise shaft rotation, for
example, in robotics, photographic lenses, computer input devices
(mice and trackballs), and volume control applications. The
illustration, hereinafter, is in terms of the incremental rotary
encoder 202. However, the explanation can be extended to any device
that generates square wave or quadrature signals, for example, a
hall effect sensor or an optical tachometer, though with a few
modifications, as will be appreciated by a person skilled in the
art.
[0041] As mentioned in the description of FIG. 1, the incremental
rotary encoder 202 generates the quadrature signals 128 in response
to the rotation of a shaft (not shown in this figure). In
construction, the incremental rotary encoder 202 is typically a
three-terminal device that generates quadrature signals, for
example, the quadrature signal 128-1 and the quadrature signal
128-2, at two of its terminals, while the third terminal is pulled
up at a supply voltage such as V.sub.cc 204 (say 5 volts). The
quadrature signals 128-1 and 128-2 generated by the incremental
rotary encoder 202 are illustrated in FIG. 2(b). The quadrature
signals 128-1 and 128-2 are 90.degree. out of phase with each
other.
[0042] The incremental rotary encoder 202 is coupled to a
quadrature signal decoder 130, in accordance with one embodiment of
the present subject matter. Also, in said embodiment, the
quadrature signal decoder 130 is coupled to the key matrix 110 in
order to facilitate decoding of the direction of rotation of the
shaft integral to the incremental rotary encoder 202.
[0043] Further, the quadrature signal decoder 130 may be a dual
flip flop, such as IC 7474. The quadrature signal decoder 130 may
be alternatively implemented using a combination of two D-flip
flops or any other flip flops, such as reset-set (RS) flip flops,
which provide similar functionalities. Although the present subject
matter has been explained in considerable details with respect to
IC 7474, however, it will be appreciated that any other IC capable
of latching the quadrature signals 128-1 and 128-2 may be used.
Additionally, any IC configured to convert two overlapping signals
into non-overlapping signals may be implemented within the
quadrature signal decoder 130. Accordingly, connections to various
pins of the quadrature signal decoder 130 may be modified according
to the requirements of the application, as will be understood by a
person skilled in the art.
[0044] In said embodiment, the quadrature signal decoder 130 is a
14-pin IC that functions as a dual D-flip flop. Thus, the
quadrature signal decoder 130 may be considered as an IC having two
flip flops 206-1 and 206-2. Pins 1 through 6 of the IC are included
in the flip flop 206-1, while pins 8 through 13 are included in the
flip flop 206-2. Pins 7 and 14 of the IC are common between the
flip flops 206-1 and 206-2.
[0045] In operation, pin 7 is coupled to ground and pin 14 is
coupled to V.sub.cc 204. Pin 2 of the flip flop 206-1 is coupled to
receive quadrature signal 128-1 through passive elements, such as a
resistor 208, a resistor 210, and a capacitor 212. Pin 3 receives
quadrature signal 128-2, also through passive elements, such as a
resistor 214, a resistor 216, and a capacitor 218. The quadrature
signal 128-2 serves as a clock signal for flip flop 206-1. The flip
flop 206-1 provides an output signal at pin 5 and a complementary
output signal at pin 6.
[0046] Further, pin 12 is coupled to receive the quadrature signal
128-2 through one or more passive elements (not shown in this
figure). Likewise, pin 11 receives quadrature signal 128-1 through
the passive elements. The quadrature signal 128-1 serves as a clock
signal for the flip flop 206-2. The flip flop 206-2 provides an
output signal at Pin 9 and a complementary output signal at Pin
8.
[0047] Pins 4 and 10 are provided for asynchronous setting of the
flip flops 206-1 and 206-2, respectively. To this end, the pins 4
and 10 are tied to the V.sub.cc 204. In addition, pins 1 and 13 are
provided for asynchronous resetting of the flip flops 206-1 and
206-2 and are, therefore, tied to the quadrature signals 128-1 and
128-2, respectively. Moreover, when in operation, pin 7 is coupled
to ground and pin 14 is coupled to VCC 204. Pins 6 and 8 are
coupled to one of the segment outputs of the driver 102, for
example, to the segment output 106-1.
[0048] A current protection diode, for example, diodes 220-1 and
220-2 may be coupled to the segment output 106-1 to protect the
display unit 204 from a large reverse current. Further, pin 5 is
coupled to the key input 114-1 and pin 9 is coupled to the key
input 114-2.
[0049] In operation, when the incremental rotary encoder 202 is
rotated in a clockwise direction, the flip flop 206-1 gets
activated and the non-overlapping signal 132-1 is provided. A
waveform of the non-overlapping signal 132-1, is further
illustrated in FIG. 2(b). As shown in FIG. 2(b), when the
incremental rotary encoder 202 is rotated in the clockwise
direction, the non-overlapping signal 132-1 follows the quadrature
signal 128-1 based on the timing of the clock signal, in this case,
the quadrature signal 128-2. For example, until a positive
transition of the quadrature signal 128-2, the non-overlapping
signal 132-1 is at a low level even though the quadrature signal
128-1 is at a high level. Now, until the level of the quadrature
signal 128-2 is high, the non-overlapping signal 132-1 follows the
quadrature signal 128-1.
[0050] Thus, at the positive transition of the quadrature signal
128-2 applied at the pin 3, the non-overlapping signal 132-1 is
obtained at pin 5, and a complementary non-overlapping signal 134-1
is obtained at pin 6. Since the pin 5 is coupled to the key input
114-1 and the pin 6 is coupled to the segment output 106-1, it
appears as if a current is flowing from the segment output 106-1 to
the key input 114-1, thus giving the driver 102 an impression that
a first key is pressed.
[0051] Similarly, when the incremental rotary encoder 202 is
rotated in a counter clockwise direction, the flip flop 206-2 gets
activated and the non-overlapping signal 132-2 is provided. A
waveform of the non-overlapping signal 132-2 is shown in FIG. 2(b).
As seen from the figure, when the incremental rotary encoder 202 is
rotated in the counter clock wise direction, the non-overlapping
signal 132-2 follows the quadrature signal 128-2 until the clock
signal, in this case, the quadrature signal 128-1 is at a high
level. Thus, at a positive transition of the quadrature signal
128-1 applied on the pin 11, the non-overlapping signal 132-2 is
obtained at the pin 9 and a complementary non-overlapping signal
134-2 is obtained at the pin 8. Since the pin 9 is coupled to the
key input 114-2 and the pin 8 is coupled to the segment output
106-1, it appears as if the segment output 106-1 is the source of
current and the key input 114-2 is a sink, thus giving an
impression that a key is pressed.
[0052] Once a key press is detected in response to a rotation of
the incremental rotary encoder 202 in a clockwise or a counter
clockwise direction, the storage element 116 within the driver 102
gets updated and the interrupt signal 118 gets generated, as
already described in FIG. 1.
[0053] In another embodiment, instead of using the complementary
non-overlapping signals 134-1 and 134-2, an additional transistor
may be implemented as a switch. Alternatively, the transistor can
be implemented in a common emitter configuration. For example, a
base terminal of the transistor may receive input from the
non-overlapping signal 132-1, while the collector and emitter
terminals of the transistor may be coupled to the segment output
106-1 and the key input 114-1, respectively. In yet another
embodiment, the base terminal of the transistor may receive input
from a complementary non-overlapping signal, for example,
complementary non-overlapping signal 134-1.
[0054] In this way, a driver, such as the driver 102 having an
integrated key matrix scanning feature, can be used to decode the
quadrature signals 128 in a manner similar to the detection of a
key press or a key release event.
[0055] FIG. 3 illustrates an exemplary method 300 for decoding
quadrature signals using a driver. The exemplary method may be
described in the general context of analog and digital circuit
elements. However, it will be noted that the method is also
implementable through computer executable instructions.
[0056] The order in which the method is described is not intended
to be construed as a limitation, and any number of the described
method blocks can be combined in any order to implement the method,
or an alternative method. Additionally, individual blocks may be
deleted from the method without departing from the spirit and scope
of the subject matter described herein. Furthermore, the methods
can be implemented in any suitable hardware, software, firmware, or
combination thereof.
[0057] At block 302, quadrature signals are received from a
quadrature signal generator. For example, the quadrature signal
generator 126 generates quadrature signals 128 based on a direction
of rotation of the incremental rotary encoder 202.
[0058] At block 304, non-overlapping signals are obtained from the
quadrature signals. The quadrature signals 128 obtained from the
quadrature signal generator 126, such as the incremental rotary
encoder 202, are fed to a quadrature signal decoder 130 to yield
non-overlapping signals 132-1 and 132-2. In one implementation, the
quadrature signal decoder 130 is implemented using two flip flops,
for example, the flip flops 206-1 and 206-2.
[0059] In response to a clockwise rotation of the quadrature signal
encoder 126, flip flop 206-1 is activated. As a result, the
non-overlapping signal 132-1 follows the quadrature signal 128-1
until the level of quadrature signal 128-2 is high. Alternatively,
for a counter clockwise rotation of the quadrature signal generator
126, the non-overlapping signal 132-2 follows the quadrature signal
128-2 as long as the level of quadrature signal 128-1 is high. In
said implementation, the complementary non-overlapping signals
134-1 and 134-2 can also be generated by the flip flops 206.
Alternatively, the complementary non-overlapping signals 134-1 and
134-2 may be generated using a transistor in a common emitter
configuration.
[0060] At block 306, a key matrix is scanned to decode the
non-overlapping signals. In one implementation, each of the
non-overlapping signals 132-1 and 132-2 are coupled to a
corresponding key on the key matrix 110, while each of the
complementary non-overlapping signals are coupled to the common
segment output, for example, segment output 106-1. Each key is
coupled to a key input and a common segment output The driver 102
scans the segment output 106-1 and key inputs 114-1 and 114-2 in
one scanning cycle, and if the driver 102 senses that a current
from the segment output 106-1 is being sinked, while a current is
being sourced to the key input 114-1, the driver 102 registers it
as a key press event. Furthermore, the driver 102 updates the
storage element 116 with an event update corresponding to the
registered key press event and subsequently, generates the
interrupt signal 118 for the microcontroller 120. Accordingly, the
microcontroller 120 may facilitate various actions, for instance,
updating the display unit 104, increasing volume/channel, and
decreasing brightness based on the event update.
[0061] Although embodiments for quadrature signal decoding using
driver have been described in language specific to structural
features and/or methods, it is to be understood that the invention
is not necessarily limited to the specific features or methods
described. Rather, the specific features and methods are disclosed
as exemplary embodiments for the quadrature signal decoding using
the driver.
* * * * *