Method and system for gain control in a communications device

Embodiments of methods and systems for gain control in a communications device are described. In an embodiment, a method for gain control in a communications device involves detecting a change in an amplification gain that is applied to an analog signal in the communications device and compensating for the change in the amplification gain by manipulating an amplitude of a digital signal that is converted from the analog signal. Other embodiments are also described.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority under 35 U.S.C. § 119 to European Patent Application No. 18306752.9, filed on Dec. 19, 2018, the contents of which are incorporated by reference herein.

BACKGROUND

Communications devices that communicate with each other wirelessly may experience long distance communications with bad channel conditions as well as close distance communications with good channel conditions. Consequently, wireless communications devices typically use amplifiers to amplify signals. However, changing the configuration of an amplifier, for example, the amplification gain of the amplifier can cause unexpected signal change, corrupt a data frame and result in data reception errors.

SUMMARY

Embodiments of methods and systems for gain control in a communications device are described. In an embodiment, a method for gain control in a communications device involves detecting a change in an amplification gain that is applied to an analog signal in the communications device and compensating for the change in the amplification gain by manipulating an amplitude of a digital signal that is converted from the analog signal. Other embodiments are also described.

In an embodiment, compensating for the change in the amplification gain by manipulating the amplitude of the digital signal that is converted from the analog signal involves freezing the amplitude of the digital signal during a time window in which the change in the amplification gain affects the amplitude of the digital signal.

In an embodiment, compensating for the change in the amplification gain by manipulating the amplitude of the digital signal that is converted from the analog signal further involves measuring a gap in the amplitude of the digital signal during the time window that is caused by the change in the amplification gain.

In an embodiment, compensating for the change in the amplification gain by manipulating the amplitude of the digital signal that is converted from the analog signal further involves removing the gap in the amplitude of the digital signal during the time window.

In an embodiment, compensating for the change in the amplification gain by manipulating the amplitude of the digital signal that is converted from the analog signal involves manipulating the amplitude of the digital signal prior to a start of a data frame reception.

In an embodiment, compensating for the change in the amplification gain by manipulating the amplitude of the digital signal that is converted from the analog signal involves manipulating the amplitude of the digital signal during a data frame reception.

In an embodiment, compensating for the change in the amplification gain by manipulating the digital signal that is converted from the analog signal involves compensating for the change in the amplification gain by manipulating the digital signal prior to signal edge detection of the digital signal.

In an embodiment, the analog signal is a baseband analog signal that is converted from a Radio frequency (RF) signal.

In an embodiment, the communications device is a near field communications (NFC) device.

In an embodiment, a communications device includes a gain compensation timing unit configured to detect a change in an amplification gain that is applied to an analog signal in the communications device and a signal amplitude control unit configured to compensate for the change in the amplification gain by manipulating an amplitude of a digital signal that is converted from the analog signal.

In an embodiment, the signal amplitude control unit is further configured to freeze the amplitude of the digital signal during a time window in which the change in the amplification gain affects the amplitude of the digital signal.

In an embodiment, the signal amplitude control unit is further configured to measure a gap in the amplitude of the digital signal during the time window that is caused by the change in the amplification gain.

In an embodiment, the signal amplitude control unit is further configured to remove the gap in the amplitude of the digital signal during the time window.

In an embodiment, the signal amplitude control unit is further configured to manipulate the amplitude of the digital signal prior to a start of a data frame reception. In an embodiment, the signal amplitude control unit is further configured to manipulate the amplitude of the digital signal during a data frame reception.

In an embodiment, the signal amplitude control unit is further configured to compensate for the change in the amplification gain by manipulating the digital signal prior to signal edge detection of the digital signal.

In an embodiment, the analog signal is a baseband analog signal that is converted from an RF signal.

In an embodiment, the communications device is an NFC device.

In an embodiment, a method for gain control in an NFC device involves detecting a change in an amplification gain that is applied to an analog signal in the NFC device and compensating for the change in the amplification gain by manipulating an amplitude of a digital signal that is converted from the analog signal, prior to signal edge detection of the digital signal.

In an embodiment, compensating for the change in the amplification gain by manipulating the amplitude of the digital signal that is converted from the analog signal, prior to signal edge detection of the digital signal, involves freezing the amplitude of the digital signal during a time window in which the change in the amplification gain affects the amplitude of the digital signal and measuring a gap in the amplitude of the digital signal during the time window that is caused by the change in the amplification gain.

Other aspects and advantages of embodiments of the present invention will become apparent from the following detailed description, taken in conjunction with the accompanying drawings, depicted by way of example of the principles of the invention.

DETAILED DESCRIPTION

FIG. 1depicts an embodiment of a communications device102that can be used with a counterpart communications device104to form a communications system100. In the communications system depicted inFIG. 1, the communications device102communicates with the counterpart communications device104via a communications channel106. In some embodiments, the communications device102is a card/transponder device or the communications device102is in a “card-mode” in which the communications device102behaves as a card/transponder device and the counterpart communications device104is a dedicated reader device or a communications device in “reader-mode” in which the counterpart communications device104behaves as a reader device. In some other embodiments, the communications device102is a reader device or the communications device is in a reader mode and the counterpart communications device104is a dedicated card device or a communications device in card-mode.

In the embodiment depicted inFIG. 1, the communications device102includes an antenna112and an RF transceiver114configured to receive incoming RF signals from the antenna and/or to transmit outgoing RF signals through the antenna. The antenna may be any suitable type of antenna. In some embodiments, the antenna is an induction type antenna such as a loop antenna or any other suitable type of induction type antenna. However, the antenna is not limited at an induction type antenna. The communications device may be fully or partially implemented as an integrated circuit (IC) device. In some embodiments, the communications device is a handheld computing system or a mobile computing system, such as a mobile phone that includes one or more IC devices. Although the illustrated communications device is shown with certain components and described with certain functionality herein, other embodiments of the communications device102may include fewer or more components to implement the same, less, or more functionality.

In some embodiments, the communications device102communicates with other communications devices (e.g., the counterpart communications device104) via inductive coupling. For example, the communications device102is a near field communications (NFC) device that uses magnetic field induction for communications in close proximity. The communications device102can be configured for either passive load modulation (PLM) or active load modulation (ALM). In some embodiments, the communications device is implemented as an RF transponder that is compatible with the International Organization for Standardization (ISO)/the International Electrotechnical Commission (IEC) 14443 standard that may operate at 13.56 MHz. In these embodiments, the antenna112is an induction type antenna such as a loop antenna or any other suitable type of induction type antenna.

In the embodiment depicted inFIG. 1, the counterpart communications device104includes an antenna122and an RF transceiver124configured to receive incoming RF signals from the antenna122and/or to transmit outgoing RF signals through the antenna122. The antenna may be any suitable type of antenna. In some embodiments, the antenna is an induction type antenna such as a loop antenna or any other suitable type of induction type antenna. However, the antenna is not limited at an induction type antenna. The counterpart communications device104may be fully or partially implemented as an IC device. In some embodiments, the counterpart communications device is a handheld computing system or a mobile computing system, such as a mobile phone. Although the illustrated counterpart communications device is shown with certain components and described with certain functionality herein, other embodiments of the counterpart communications device may include fewer or more components to implement the same, less, or more functionality.

In some embodiments, the counterpart communications device104communicates with other communications devices (e.g., the communications device102) via inductive coupling. For example, the counterpart communications device104is an NFC device that uses magnetic field induction for communications in close proximity. The counterpart communications device can be configured for either PLM or ALM. In some embodiments, the counterpart communications device is implemented as an RF transponder that is compatible with the ISO/IEC 14443 standard that may operate at 13.56 MHz. In the embodiments, the antenna122is an induction type antenna such as a loop antenna or any other suitable type of induction type antenna.

In an example operation of the communications system100, an RF signal is received by the antenna112of the communications device102from the antenna122of the counterpart communications device104and is passed to the RF transceiver114of the communications device102to convert the RF signal into a digital signal, which can be further processed by a digital processor. A signal may be generated in response to the RF signal and is used to produce an outgoing RF signal at the RF transceiver114, which may be transmitted to the counterpart communications device using the antenna112.

FIG. 2depicts a receiver unit214that is an embodiment of the RF transceiver114of the communications device102and/or the RF transceiver124of the counterpart communications device104depicted inFIG. 1. In the embodiment ofFIG. 2, the receiver unit includes an optional high frequency (HF) attenuator232, a down-converter234, an amplifier236, an analog-to-digital converter (ADC) unit238, a gain control unit240, a gain compensation unit242and a digital signal processing (DSP) unit244. Each of the gain control unit, the gain compensation unit and the DSP unit may be implemented as hardware, software, firmware, and/or a combination of hardware, software, and/or firmware. In some embodiments, at least one of the gain control unit, the gain compensation unit and the DSP unit is implemented as a processor such as a microcontroller or a central processing unit (CPU). The receiver unit depicted inFIG. 2is a possible implementation of the RF transceiver114or124depicted inFIG. 1. However, the RF transceiver114or124depicted inFIG. 1can be implemented differently from the receiver unit depicted inFIG. 2. Although the illustrated receiver unit is shown with certain components and described with certain functionality herein, other embodiments of the receiver unit may include fewer or more components to implement the same, less, or more functionality. For example, although the receiver unit is depicted inFIG. 2as including the HF attenuator, in some embodiments, the receiver unit does not include the HF attenuator.

Wireless communications devices typically employ amplification gain control to adapt to long distance communications with bad channel conditions as well as close distance communications with good channel conditions. However, changing the amplification gain can cause unexpected signal change, corrupt a data frame and result in data reception errors. For example, a change in the amplification gain for an amplifier can cause a step (e.g., increase or decreases) in the amplitude of a resulting digital signal. An amplitude step in a digital signal can be incorrectly decoded as a change in the signal envelope of the digital signal. In addition, an amplitude step in a digital signal can mask out a real envelope change, which may result in an incorrectly decoded signal. Compared to an RF receiver that changes the amplification gain (also known as amplifier gain switching) without proper amplification gain compensation, thus corrupting a data frame during the reception of the data frame, the receiver unit214depicted inFIG. 2can perform amplification gain compensation prior to the reception of a data frame as well as during the reception of a data frame. Consequently, the receiver unit depicted inFIG. 2can reduce or minimize signal reception errors and can decrease the possibility of failure in the reception of a data frame. Thus, the performance and robustness of the receiver unit depicted inFIG. 2may be improved relative to the performance and robustness of an RF receiver that changes the amplification gain without proper amplification gain compensation.

In the embodiment ofFIG. 2, the HF attenuator232is configured to attenuate a received RF signal250to generate an attenuated RF signal252. The HF attenuator may attenuate the received RF signal based on an input (e.g., an attenuation factor) from the gain control unit. In some embodiments, the RF input signal is received from the antenna112or the antenna122. For example, the RF input signal may be received from an induction type antenna such as a loop antenna. In some embodiments, the receiver unit214does not include the HF attenuator and the received RF signal is directly input into the down-converter.

In the embodiment ofFIG. 2, the down-converter234is configured to convert an RF signal into a converted signal (e.g., a baseband signal)254having a frequency that is lower than the frequency of the RF signal. For example, when the HF attenuator232is included in the receiver unit, the down-converter may be configured to convert the attenuated RF signal252from the HF attenuator into the converted signal. When the HF attenuator is not included in the receiver unit, the down-converter may be configured to convert the received RF signal250into the converted signal. The down-converter may be implemented by a mixer and/or other known analog down converting circuit. In some embodiments, the down-converter is a baseband convert configured to convert the RF signal into a baseband signal.

In the embodiment ofFIG. 2, the amplifier236is configured to amplify the converted signal254to generate an amplified signal256based on an input (e.g., an amplification gain) from the gain control unit. In some embodiments, the amplifier is a baseband amplifier (BBA) configured to amplify a baseband signal produced by the down-converter based on an amplification gain from the gain control unit to generate an amplified signal. In the embodiment ofFIG. 2, the ADC unit238is configured to convert the amplified signal into a digital signal258. The ADC unit may be implemented with one or more suitable analog circuits.

In the embodiment ofFIG. 2, the gain control unit240is configured to control the amplification gain of the amplifier236and/or the attenuation factor of the HF attenuator232. In some embodiments, the gain control unit is configured to control the amplification gain of the amplifier and/or the attenuation factor of the HF attenuator based on a received signal strength indicator (RSSI) value, which may be received from the down-converter234and/or the ADC unit238. In some embodiments, the amplifier control unit is configured to switch the amplification gain of the amplifier and/or the attenuation factor of the HF attenuator between multiple predefined values based on an RSSI value history (e.g., a current RSSI value and/or at least a previous RSSI value). In some embodiments, the gain control unit is configured to compare the RSSI value with a threshold and to switch the amplification gain of the amplifier and/or the attenuation factor of the HF attenuator if the RSSI value is larger than or smaller than the threshold. In some embodiments, the gain control unit includes an RSSI unit configured to obtain an RSSI value based on an amplitude of the RF signal. In an embodiment, the RSSI unit obtains the RSSI value based on an amplitude of a component of the RF signal. For example, the RSSI unit obtains the RSSI value based on a DC value of a down-converted version of the RF signal. In an embodiment, the RSSI unit obtains the RSSI value based on the digital signal that is generated by the ADC unit. The RSSI value may be a number such as an integer. The amplitude of the RF signal may be a voltage of the RF signal and/or a current of the RF signal. In some embodiments, the RSSI value has a non-linear relationship with the amplitude of the RF signal. For example, an RSSI value of 30 may be associated with an amplitude of 2V while an RSSI value of 35 may be associated with an amplitude of 3V.

In the embodiment ofFIG. 2, the gain compensation unit242is configured to detect a change in an amplification gain that is applied to an analog signal in the communications device102or104and to compensate for the change in the amplification gain by manipulating an amplitude of a digital signal that is converted from the analog signal. Because the gain compensation unit manipulates the amplitude of the digital signal to compensate for the change in the amplification gain, a step (e.g., increase or decreases) on the amplitude of a resulting digital signal that is caused by a change in the amplification gain can be measured and removed by the gain compensation unit. Consequently, decoding errors that are caused by a change in the signal envelope of the digital signal can be reduced or avoided. In addition, decoding errors that are caused by an actual signal edge that is masked out by an amplitude step in the digital signal can be reduced or avoided. In some embodiments, the analog signal is the baseband analog signal254that is converted from the received RF signal252by the down-converter234and the gain compensation unit is configured to detect a change in an amplification gain of the amplifier236for amplifying the baseband analog signal and to compensate for the change in the amplification gain by manipulating the amplitude of the digital signal that is converted from the analog signal by the ADC unit. The gain compensation unit can generate an amplitude compensated digital signal260. In some embodiments, the gain compensation unit manipulates the amplitude of the digital signal prior to a start of a data frame reception and/or during a data frame reception. In some embodiments, the gain compensation unit is configured to manipulate the amplitude of the digital signal prior to signal edge detection of the digital signal.

In some embodiments, the gain compensation unit242is configured to freeze the amplitude of the digital signal258during a time window in which the change in the amplification gain affects the amplitude of the digital signal. In an embodiment, the gain compensation unit is configured to measure a gap in the amplitude of the digital signal during the time window that is caused by the change in the amplification gain. In an embodiment, the gain compensation unit is configured to adjust or remove the gap in the amplitude of the digital signal during the time window.

In the embodiment ofFIG. 2, the DSP unit244is configured to process the amplitude compensated digital signal260that is generated by the gain compensation unit242to generate processed bits. The DSP unit may include an envelope generator246configured to generate a signal envelope262of the digital signal and a decoder248configured to decode the signal envelope into decoded bits. The envelope generator and/or the decoder may be implemented as hardware, software, firmware, and/or a combination of hardware, software, and/or firmware. In some embodiments, the envelope generator and/or the decoder is implemented with one or more suitable digital logic circuits. In an embodiment, the envelope generator and/or the decoder is implemented as a processor such as a microcontroller or a CPU.

FIG. 3depicts an embodiment of the gain compensation unit242of the receiver unit214depicted inFIG. 2. In the embodiment ofFIG. 3, a gain compensation unit342includes a signal amplitude control unit372and a gain compensation timing unit374. Each of the gain compensation timing unit and the signal amplitude control unit may be implemented as hardware, software, firmware, and/or a combination of hardware, software, and/or firmware. In some embodiments, at least one of the gain compensation timing unit and the signal amplitude control unit is implemented as a processor such as a microcontroller or a CPU. The gain compensation unit depicted inFIG. 3is a possible implementation of the gain compensation unit depicted inFIG. 2. However, the gain compensation unit depicted inFIG. 2can be implemented differently from the receiver unit depicted inFIG. 3.

In the embodiment ofFIG. 3, the gain compensation timing unit374is configured to obtain a time window in which a change in an amplification gain that is applied to an analog signal in the receiver unit214affects the amplitude of a digital signal that is converted from the analog signal. For example, the gain compensation timing unit is configured to obtain a time window in which a change in an amplification gain that is applied to a baseband analog signal that is input into the amplifier236affects the amplitude of a digital signal that is generated by the ADC unit238. The gain compensation timing unit may be implemented with one or more suitable digital logic circuits. In some embodiments, the gain compensation timing unit receives information regarding the time window (e.g., a gain change time point at which the gain control unit240changes (increases or decreases) the amplification gain) from the gain control unit240. The gain change time point may occur prior to a start of a data frame reception or during a data frame reception. In an embodiment, the gain compensation timing unit receives a gain change time point at which the gain control unit changes (increases or decreases) the amplification gain of the amplifier and calculates a delay in which the amplification gain change affects the amplitude of the digital signal that is generated by the ADC unit. In some embodiments, the gain compensation timing unit includes a delay circuit that is implemented with one or more suitable logic circuits and that is configured to generate a delay in which the amplification gain change affects the amplitude of the digital signal.

In the embodiment ofFIG. 3, the signal amplitude control unit372is configured to control the amplitude of the digital signal (e.g., the digital signal258) during the time window that is obtained by the gain compensation timing unit374. In some embodiments, the signal amplitude control unit is configured to freeze the amplitude of the digital signal during the obtained time window. In an embodiment, the signal amplitude control unit is configured to measure a gap in the amplitude of the digital signal during the time window and to adjust or remove the gap in the amplitude of the digital signal during the time window.

FIG. 4depicts an example of a digital signal400of the receiver unit214depicted inFIG. 2(e.g., a digital signal that is generated by the ADC unit238) before gain compensation, which may be performed by the gain compensation unit242depicted inFIG. 2or the gain compensation unit342depicted inFIG. 3. In the digital signal depicted inFIG. 4, a gap410in the amplitude of the digital signal is measured during a time window420.FIG. 5depicts an example of an amplitude compensated digital signal500, which is the result of the digital signal400FIG. 4after gain compensation (e.g., performed by the gain compensation unit depicted inFIG. 2or the gain compensation unit depicted inFIG. 3). In the digital signal500depicted inFIG. 5, the gap410in the amplitude of the digital signal is removed during the time window420and the signal amplitude of the digital signal is kept at a fixed value during the time window.

FIG. 6depicts a signal timing diagram for the receiver unit214depicted inFIG. 2. In the signal timing diagram illustrated inFIG. 6, the signal envelope680of the RF signal250that is received at the receiver unit214, an amplification gain690of the amplifier236depicted inFIG. 2that is set by the gain control unit240depicted inFIG. 2, a digital signal658that is generated by the ADC unit238depicted inFIG. 2, and an amplitude compensated digital signal660that is generated by the gain compensation unit242depicted inFIG. 2or the gain compensation unit342depicted inFIG. 3are shown. At time point, t1, a time window620in which the change in the amplification gain affects the amplitude of the digital signal starts. At time point, t2, the time window in which the change in the amplification gain affects the amplitude of the digital signal ends. During the time window, the amplitude of the digital signal is frozen, and a gap in the amplitude of the digital signal during the time window that is caused by the change in the amplification gain is measured and subsequently removed. Because the gap in the amplitude of the digital signal that is caused by the change in the amplification gain is removed, decoding errors that are caused by a change in the signal envelope of the digital signal (e.g., the amplitude decreases of the digital signal in the time window620) can be reduced or avoided.

A change in the amplification gain of the amplifier236in the receiver unit214depicted inFIG. 2can occur at various time points. For example, the gain control unit240can change the amplification gain of the amplifier at any time point prior to a start of a data frame reception in the receiver unit. In some embodiments, during a data frame reception in the receiver unit, the gain control unit changes the amplification gain at a different time point when a signal edge occurs in order to increase system sensitivity. For example, the gain control unit can detect a signal bitgrid (time points when signal edges can occur) based on a received start of frame (SoF) data field and change the amplification gain outside the signal bitgrid to ensure that a gain step and a signal edge cannot occur at the same time. However, in some embodiments, an amplification gain change (i.e., a gain step) and a signal edge occur at the same time. For example, before the signal bitgrid is known to the gain control unit (e.g., before a start of frame (SoF) data field is received at the receiver unit), the gain control unit may, by chance, change the amplification gain at a time point when a signal edge occurs. In these embodiments, the amplification gain change can be compensated for. However, the amplification gain compensation is limited to an allowed range.FIG. 7depicts a gap710in the amplitude of the digital signal258that is generated by the ADC unit238of the receiver unit214depicted inFIG. 2that is caused by an amplification gain change and a signal edge. The gap in the amplitude of the digital signal is measured during a time window. As shown inFIG. 7, before the amplitude compensation, the measured amplitude gap during the time window is equivalent to the sum of the amplitude gap720caused by the amplification gain change and the amplitude gap730caused by the signal edge. Amplitude compensation, which may be performed by the gain compensation unit depicted inFIG. 2or the gain compensation unit depicted inFIG. 3, can change the amplitude gap within an allowed range without masking out the signal edge. After amplitude compensation, the measured amplitude gap during the time window is equivalent to the sum of an adjusted amplitude gap740, which is the amplitude gap720adjusted by an allowed range760, and a residual amplitude gap750to be processed by the DSP unit244.

FIG. 8depicts a signal timing diagram for the receiver unit214depicted inFIG. 2in which a gain step is added to a signal edge. In the signal timing diagram illustrated inFIG. 8, a signal envelope880for the RF signal250that is received at the receiver unit, an amplification gain890for the amplifier236depicted inFIG. 2that is set by the gain control unit240, a digital signal858that is generated by the ADC unit238depicted inFIG. 2, and a gain compensated digital signal860that is generated by the gain compensation unit242depicted inFIG. 2or the gain compensation unit342depicted inFIG. 3are shown. At time point, t1, a first-time window820in which the change in the amplification gain affects the amplitude of the digital signal starts. At time point, t2, the first-time window in which the change in the amplification gain affects the amplitude of the digital signal ends. During the first-time window, the amplitude of the digital signal is frozen, and a gap in the amplitude of the digital signal during the first-time window that is caused by the change in the amplification gain is measured and subsequently removed such that the amplitude of the digital signal stays flat (i.e., fixed). Because the gap in the amplitude of the digital signal that is caused by the change in the amplification gain is removed, decoding errors that are caused by a change in the signal envelope of the digital signal (e.g., the amplitude decreases of the digital signal in the first-time window820) can be reduced or avoided. At time point, t3, a second-time window840in which the change in the amplification gain affects the amplitude of the digital signal starts. At time point, t4, the second-time window ends. During the second-time window, the amplitude of the digital signal is frozen, and a gap in the amplitude of the digital signal during the second-time window that is caused by the change in the amplification gain is measured and subsequently removed such that the amplitude of the digital signal decreases to a predetermined fixed level. Because the gap in the amplitude of the digital signal that is caused by the change in the amplification gain is removed, decoding errors that are caused by a change in the signal envelope of the digital signal (e.g., the amplitude decreases of the digital signal in the second-time window840) can be reduced or avoided.

FIG. 9depicts a signal timing diagram for the receiver unit214depicted inFIG. 2in which a gain step compensates a signal edge. In the signal timing diagram illustrated inFIG. 9, a signal envelope980for the RF signal250that is received at the receiver unit, an amplification gain990for the amplifier236depicted inFIG. 2that is set by the gain control unit240, a digital signal958that is generated by the ADC unit238depicted inFIG. 2, and a gain compensated digital signal960that is generated by the gain compensation unit242depicted inFIG. 2or the gain compensation unit342depicted inFIG. 3are shown. At time point, t1, a first-time window920in which the change in the amplification gain affects the amplitude of the digital signal starts. At time point, t2, the first-time window ends. During the first-time window, the amplitude of the digital signal is frozen, and a gap in the amplitude of the digital signal during the first-time window that is caused by the change in the amplification gain is measured and subsequently removed such that the amplitude of the digital signal stays flat (i.e., fixed). Because the gap in the amplitude of the digital signal that is caused by the change in the amplification gain is removed, decoding errors that are caused by a change in the signal envelope of the digital signal (e.g., the amplitude decreases of the digital signal in the first-time window920) can be reduced or avoided. At time point, t3, a second-time window940in which the change in the amplification gain affects the amplitude of the digital signal starts. At time point, t4, the second-time window ends. During the second-time window, the amplitude of the digital signal is frozen, and a gap in the amplitude of the digital signal during the second-time window that is caused by the change in the amplification gain is measured and subsequently adjusted such that the amplitude of the digital signal decreases to a predetermined fixed level. Because the gap in the amplitude of the digital signal that is caused by the change in the amplification gain is adjusted, decoding errors that are caused by an actual signal edge that is masked out by an amplitude step in the digital signal (e.g., the lower-than-expected amplitude decrease of the digital signal in the second time window940) can be reduced or avoided.

FIG. 10is a process flow diagram of a method for gain control in a communications device in accordance with another embodiment of the invention. At block1002, detecting a change in an amplification gain that is applied to an analog signal in the communications device. At block1004, the change in the amplification gain is compensated for by manipulating an amplitude of a digital signal that is converted from the analog signal. The communications device may be the same or similar to communications devices depicted with reference toFIGS. 1-9.

FIG. 11is a process flow diagram of a method for gain control in an NFC device in accordance with another embodiment of the invention. At block1102, a change in an amplification gain that is applied to an analog signal in the NFC device is detected. At block1104, the change in the amplification gain is compensated for by manipulating an amplitude of a digital signal that is converted from the analog signal, prior to signal edge detection of the digital signal. The NFC device may be the same or similar to communications devices depicted with reference toFIGS. 1-9.