# Patent

## Title
Systems and methods for communicating with an implantable stimulator

## Abstract

An exemplary system for communicating with an implantable stimulator includes a coil configured to transmit a signal modulated with on-off keying (OOK) modulation to transmit control data. The system further includes a first telemetry receiver in the implantable stimulator configured to receive the control data in accordance with the OOK modulation. An exemplary method of communicating with an implantable stimulator includes modulating a signal with control data using OOK modulation and transmitting the signal to the implantable stimulator.

## Background
RELATED APPLICATIONS
The present application is a continuation-in-part and claims the priority under 35 U.S.C. §120 of previous U.S. patent application Ser. No. 10/607,962, filed Jun. 27, 2003 now U.S. Pat. No. 7,177,698, and which is incorporated herein by reference in its entirety. U.S. patent application Ser. No. 10/607,962 claims the benefit under 35 U.S.C. §119(e) of Provisional Application Ser. No. 60/392,475, filed Jun. 28, 2002, which is also incorporated herein by reference in its entirety.


BACKGROUND
Radio-frequency (RF) powered implantable stimulators and battery powered implantable stimulators are described in the art. See, for instance, U.S. Pat. No. 5,193,539 (“Implantable Microstimulator); U.S. Pat. No. 5,193,540 (“Structure and Method of Manufacture of an Implantable Microstimulator”); U.S. Pat. No. 5,312,439 (“Implantable Device Having an Electrolytic Storage Electrode”); U.S. Pat. No. 6,185,452 (“Battery-Powered Patient Implantable Device”); U.S. Pat. Nos. 6,164,284 and 6,208,894 (both titled “System of Implantable Device for Monitoring and/or Affecting Body Parameters”). Each of these patents is incorporated herein by reference in its respective entirety.
Implantable stimulators configured to prevent or treat various disorders associated with prolonged inactivity, confinement or immobilization of one or more muscles are taught, e.g., in U.S. Pat. No. 6,061,596 (“Method for Conditioning Pelvis Musculature Using an Implanted Microstimulator”); U.S. Pat. No. 6,051,017 (“Implantable Microstimulator and Systems Employing the Same”); U.S. Pat. No. 6,175,764 (“Implantable Microstimulator System for Producing Repeatable Patterns of Electrical Stimulation”); U.S. Pat. No. 6,181,965 (“Implantable Microstimulator System for Prevention of Disorders”); U.S. Pat. No. 6,185,455 (“Methods of Reducing the Incidence of Medical Complications Using Implantable Microstimulators”); and U.S. Pat. No. 6,214,032 (“System for Implanting a Microstimulator”). Each of these patents is incorporated herein by reference in its respective entirety.
A typical implantable stimulator is intended to permanently remain in the body of a patient once it is implanted. Hence, transcutaneous communication between an implantable stimulator and an external device is important for the stimulator to function properly. For example, communication with the implantable stimulator may be effected to perform a number of functions including, but not limited to, transferring power to the stimulator, transferring data to and from the stimulator, programming the stimulator, and monitoring the stimulator's various functions.
SUMMARY
An exemplary system for communicating with an implantable stimulator includes a coil configured to transmit a signal modulated with on-off keying (OOK) modulation to transmit control data. The exemplary system further includes a first telemetry receiver in the implantable stimulator configured to receive the control data in accordance with the OOK modulation.
An exemplary method of communicating with an implantable stimulator includes modulating a signal with control data using on-off keying (OOK) modulation and transmitting the signal to the implantable stimulator.



BRIEF DESCRIPTION OF THE DRAWINGS
The accompanying drawings illustrate various embodiments of the present invention and are a part of the specification. The illustrated embodiments are merely examples of the present invention and do not limit the scope of the invention.
FIG. 1 shows an exemplary implantable stimulator and an exemplary external device according to principles described herein.
FIG. 2 shows a functional block diagram of an exemplary implantable stimulator according to principles described herein.
FIG. 3 shows a first signal including control data that has been modulated using frequency shift keying (FSK) and a second signal including control data that has been modulated using on-off keying (OOK) according to principles described herein.
FIG. 4 illustrates an exemplary OOK receiver that may be used to receive and demodulate a stream of control bits that have been modulated using OOK modulation according to principles described herein.
FIG. 5 illustrates an exemplary application specific integrated circuit (ASIC) implementation of an OOK receiver according to principles described herein.
FIG. 6 is a timing diagram of various signals corresponding to the exemplary OOK receiver shown in FIG. 5 according to principles described herein.
FIG. 7 is a flow chart illustrating an exemplary method of communicating with an implantable stimulator using OOK modulation according to principles described herein.



Throughout the drawings, identical reference numbers designate similar, but not necessarily identical, elements.
DETAILED DESCRIPTION
Several types of implantable stimulators and external devices utilize a magnetic field to achieve transcutaneous communication via a bidirectional telemetry link. An implantable stimulator and an external device typically both have an RF coil that is used as the transmitter and receiver of the magnetic field. Accurate communication between an implantable stimulator and an external device typically requires a precise reference clock within the implantable stimulator. The reference clock allows timing synchronization in the transmission of data to and from the implantable stimulator so that the implantable stimulator may demodulate data that has been modulated by the external device.
Many implantable stimulators include a precision circuit configured to provide the precise reference clock. The precision circuit may require calibration data for the reference clock to be synchronized with the frequency of the transmitting coil of the external device. This calibration data may be transmitted by the external device via the bidirectional telemetry link. However, in some instances, the bidirectional telemetry link may fail due to a number of factors including, but not limited to, a loss of battery power in the stimulator, interference, and/or coil malfunction. Without a functioning telemetry link between the external device and the implantable stimulator, important control data such as, but not limited to, the calibration data may not be transmitted to the implantable stimulator.
Hence, systems and methods for communicating with an implantable stimulator are described herein. A coil may be configured to transmit a signal including control data in accordance with a first telemetry scheme or a second telemetry scheme to an implantable stimulator. The implantable stimulator may include a first telemetry receiver for receiving the control data in accordance with the first telemetry scheme and a second telemetry receiver for receiving the control data in accordance with the second telemetry scheme. In some embodiments, the first telemetry scheme includes frequency shift keying (FSK) modulation and the second telemetry scheme includes on-off keying (OOK) modulation.
In the following description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the present system and method. It will be apparent, however, to one skilled in the art that the present system and method may be practiced without these specific details. Reference in the specification to “one embodiment” or “an embodiment” means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment. The appearance of the phrase “in one embodiment” in various places in the specification are not necessarily all referring to the same embodiment.
FIG. 1 shows an exemplary implantable stimulator (10) and an exemplary external device (20). The implantable stimulator (10) may be any type of implantable medical device, for example, an implantable microstimulator. Microstimulators are smaller than conventionally sized stimulators and are more easily implanted in a patient. Microstimulators may be injected through a large bore needle or placed via a small incision in the skin. An exemplary, but not exclusive, implantable microstimulator is the BION® microstimulator (Advanced Bionics® Corporation, Valencia, Calif.) which may be configured to stimulate tissue to alleviate urinary incontinence, reduce pain, or otherwise provide therapy for various disorders. Other examples of implantable stimulators include, but are not limited to, spinal cord stimulators (SCS), cochlear implants, and deep brain stimulators. As used herein and in the appended claims, unless otherwise specifically denoted, the terms “stimulator” and “microstimulator” will be used interchangeably to refer to any implantable medical device that may be implanted within a patient for therapeutic purposes. A typical stimulator or microstimulator is configured to transcutaneously communicate with an external device.
The implantable stimulator (10) may be implanted in the target tissue area of a patient and the external device (20) may be used to communicate with and/or transfer power to the stimulator (10). Such communication and/or power transfer may include, but is not limited to, transcutaneously transmitting data to the stimulator (10), receiving data from the stimulator (10), transferring power to a battery (16) in the stimulator (10), and/or providing recovery power to the battery (16) when the battery has been depleted to zero volts.
As illustrated in FIG. 1, the implantable stimulator (10) may include a number of components. A battery (16), which may be rechargeable, is configured to supply the stimulator (10) with power. A coil (18) is configured to receive and/or emit a magnetic field that is used to communicate with the external device (20). The coil (18) may also be used to receive energy used to recharge the battery (16). A stimulating capacitor (15) and two or more electrodes (22, 24) are configured to stimulate tissue with electric current. One or more of these components may be housed within a case (not shown). The stimulator (10) may include additional and/or different electronic sub-assembly (14) configured to perform a variety of functions as best serves a particular application.
The functions performed by the external device (20) will vary as best serves the particular application of the stimulator (10). The shape and design of the external device (20) will likewise vary. The external device (20) may be embodied by the external components (20) shown in FIG. 1 of the present application's parent application (U.S. patent application Ser. No. 10/607,962). For example, the external device (20) may include a chair pad and a base station. In use, the chair pad may be placed on a chair, and a patient who has an implanted stimulator (10) may sit on the chair pad to recharge the battery (16) in the stimulator (10) and/or to transfer data between the base station and the stimulator (10). The external device (20) may alternatively be a remote control or any other external component. In general, the external device (20) may be any device configured to communicate with and/or transfer power to an implantable stimulator (10).
The exemplary external device (20) of FIG. 1 may include control circuitry (39) and an antenna/charging coil (34) configured to emit and/or receive a magnetic field that is used to communicate with the implantable stimulator (10). The control circuitry (39) may be any circuitry configured to control the operation of the antenna/charging coil (34). In some examples, the antenna/charging coil (34) and the coil (18) of the stimulator (10) communicate by sending RF signals across a bidirectional telemetry link (48). The RF signals sent across the bidirectional telemetry link (48) may be modulated using a frequency dependent telemetry scheme, such as frequency shift keying (FSK), or by some other modulation scheme. The antenna/charging coil (34) and the coil (18) of the stimulator (10) may also communicate via a forward telemetry link (38). The forward telemetry link (38) may use an on/off keying (OOK) modulation scheme. The forward telemetry link (38) is also known as an OOK telemetry link. On/off keying (OOK) modulation is frequency independent and is also known as pulse width modulation (PWM). The forward telemetry link (38) will be described in more detail below.
The external device (20) may be configured to perform any number of functions via the bidirectional telemetry link (48) and/or the forward telemetry link (38). For example, the external device (20) may be configured to transcutaneously charge the rechargeable battery (16) in the implanted stimulator (10). The external device (20) may also be configured to transcutaneously transmit data to the stimulator (10), receive data from the stimulator (10), and/or provide recovery power to the rechargeable battery (16) when the battery (16) has been depleted to zero volts. The transmitted data may include configuration bits, programming bits, calibration bits, and/or other types of data.
FIG. 2 shows a functional block diagram of an exemplary implantable stimulator (10). As shown in FIG. 2, the coil (18) may be coupled to a receiver (42) and configured to receive an RF signal via the bidirectional telemetry link (48). The receiver (42) may be any circuit configured to receive and process an RF signal. For example, the receiver (42) may be a microprocessor, digital signal processor (DSP), application specific integrated circuit (ASIC), processor with firmware, field programmable gate array (FPGA), or any other combination of hardware and/or software.
The RF signal may be sent by the external device (20), for example, and may include a carrier signal having modulated control data. The receiver (42) may then rectify the carrier signal to provide charging power for the rechargeable battery (16) and demodulate the carrier signal to extract the control data. As used herein and in the appended claims, the terms “control data” or “control bits” will be used to refer to any data or bits that are transmitted from the external device (20) to the implantable stimulator (10) or from the implantable stimulator (10) to the external device (20). For example, the control data may include, but is not limited to, calibration data used by a reference clock generation circuit (56) and programming data used by a control circuit (58).
As shown in FIG. 2, the control data may be input into the control circuit (58). The control circuit (58) is configured to control the operation of the stimulator (10). For example, the control circuit (58) may cause a pulse generator circuit (52) to generate and deliver electrical stimulation pulses to a patient through the electrodes (22, 24). The control circuit (58) may be a microprocessor, DSP, ASIC, processor with firmware, FPGA, or any other combination of hardware and/or software.
In some embodiments, the coil (18) may also be connected to a back telemetry circuit (54) to allow telemetry data to be sent from the stimulator (10) to the external device (20). The back telemetry circuit (54) may be any circuit configured to transmit data. The coil (18) may also be connected to an OOK receiver (43) to receive OOK modulated data. The OOK receiver (43) may be any circuit configured to receive and process an RF signal that has been OOK modulated. For example, the OOK receiver (43) may be a microprocessor, DSP, ASIC, processor with firmware, FPGA, or any other combination of hardware and/or software. Furthermore, the OOK receiver (43) may be integrated into the receiver (42). The function of the OOK receiver (43) will be described in more detail below.
Referring to FIG. 2, the receiver (42) may require a precise reference clock (ref clk) to rectify and/or demodulate the RF signal. The precise reference clock, as known in the art, may provide a clock signal having a frequency that is synchronized with the frequency used by the external device (20) to generate the RF signal. In some embodiments, the precise reference clock signal is generated by a reference clock generation circuit (56). As shown in FIG. 2, the reference clock generation circuit (56) generates the precise reference clock signal based on a clock signal generated by a clock generation circuit (55). The clock signal is also known as the system clock. The clock generation circuit (55) may be any clock generation circuit known in the art and may output a clock signal having an arbitrary frequency that remains constant over time. In the illustrated example, the reference clock generation circuit (56) includes precise resistor-capacitor (RC) networks and/or IC networks configured to process the clock signal output by the clock generation circuit (55) and generate the precise reference clock signal.
The reference clock generation circuit (56) and the clock generation circuit (55) are illustrated as separate components within the stimulator (10). However, it will be understood that the reference clock generation circuit (56) and/or the clock generation circuit (55) may be integrated into a single component, integrated into the control circuit (58), or integrated into any other circuitry included in the stimulator (10).
In some embodiments, the reference clock generation circuit (56) requires calibration data to synchronize the frequency of the reference clock signal with the frequency used by the external device (20) to generate the RF signal. This calibration data may be periodically sent, for example, from the external device (20) via the bidirectional telemetry link (48). However, if the bidirectional telemetry link (48) is disabled for any of a number of reasons, some of which will be described in detail below, the calibration data may not be conveyed to the reference clock generation circuit (56) resulting in a reference clock (ref clk) that is not synchronized with the frequency used by the external device (20). As will be described in more detail below, the frequency independent OOK telemetry link (38) may then be used to transmit the calibration data to the reference clock generation circuit (56). The calibration data may then be used to resynchronize the reference clock (ref clk) with the frequency used by the external device (20) such that the bidirectional telemetry link (48) may again be used to transmit control data and/or transfer power from the external device (20) to the stimulator (10).
The implantable stimulator (10) of FIG. 2 may operate in a number of different states. For example, the stimulator (10) may operate in a normal operational state wherein the stimulator (10) receives RF signals from the external device (20) via the bidirectional telemetry link (48) and generates stimulation pulses. The stimulator (10) may enter into a hibernation state when the voltage output by the battery (16) falls below a voltage defined by a battery voltage hibernation level internal register (VHIB) (not shown). The VHIB is a programmable voltage value a of hibernation threshold for the battery (16). In the hibernation state, stimulation and FSK telemetry via the bidirectional telemetry link (48) are discontinued. However, in some embodiments, the stimulator (10) continues listening for an incoming OOK telemetry signal via the forward telemetry link (38). The stimulator (10) may also be configured to detect an applied external charging field used to charge the battery (16) while in the hibernation state.
The stimulator (10) may also operate in storage mode to conserve power. In storage mode, the stimulator (10) disables all circuitry except for circuitry that is used to recharge the battery (16) and circuitry used to listen for and receive an OOK telemetry signal via the forward telemetry link (38).
Hence, the OOK telemetry link (38) allows the external device (20) to communicate with the stimulator (10) even when the stimulator (10) is not actively listening for an RF signal to be transmitted via the bidirectional telemetry link (48), e.g., when the stimulator (10) is operating in the hibernation state or in the storage state. The OOK telemetry link (38) also provides a communication interface between the external device (20) and the stimulator (10) that may be used in emergency situations, e.g., when the bidirectional telemetry link (48) fails or when there is an emergency power shutdown.
FIG. 3 shows a first signal (130) including control data that has been modulated using FSK and a second signal (131) including control data that has been modulated using OOK, or PWM. The first signal (130) may be transmitted via the bidirectional telemetry link (48; FIG. 1) and the second signal (131) may be transmitted via the OOK telemetry link (38; FIG. 1). As shown in FIG. 3, the frequency of the first signal (130) varies between two frequencies, F1 and F2. FIG. 3 shows that a binary “1” is represented by the first frequency F1, and a binary “0” is represented by the second frequency F2. Alternatively, the first frequency F1 may represent “0” and the second frequency F2 may represent “1”. The first signal (130), as shown in FIG. 3, transmits the bits “1010110100” for illustrative purposes.
The second signal (131) of FIG. 3 has been modulated using OOK modulation. As shown in FIG. 3, the signal (131) includes either a first frequency F1′ or no transmitted signal (frequency equals zero) for one of two pulse widths, PW1 or PW2. A transmitted signal having a first pulse width, PW1, regardless of whether the frequency is F1′ or zero (off), is interpreted as, e.g., a binary “0”; whereas a transmitted signal having a second pulse width, PW2, regardless of whether the frequency is F1′ or zero (off), is interpreted as, e.g., a binary “1”. Alternatively, a “1” may correspond to PW1 and a “0” may correspond to PW2. A change from the F1′ frequency to the zero (off) frequency is used to indicate a data transition from one bit to the next bit in the data stream.
Thus, as illustrated in FIG. 3, the signal (131) first has a frequency F1′ for a pulse width of PW1, indicating a binary “0”. The signal (131) then transitions to being “off” (frequency equal zero) for a pulse width of PW1, indicating another binary “0”. The signal then transitions to having a frequency equal to F1′ for a pulse width of PW2, indicating a binary “1”. The rest of the states of the signal (131) are shown in FIG. 3. Thus, the second signal (131), as shown in FIG. 3, transmits the bits “001001.”
As mentioned, the OOK receiver (43) of FIG. 2 may be configured to receive and demodulate an OOK signal sent via the OOK telemetry link (38). In order for the OOK receiver (43) to distinguish between the first and second pulse widths (PW1 and PW2), a start bit having a fixed pulse width may be sent to the implantable stimulator (10) before any other control bits are sent. The start bit may be a “0” or a “1”; however, for illustrative purposes, the start bit is a “0” in the examples described herein. The OOK receiver (43) may be configured to use the clock generated by the clock generation circuit (55; FIG. 2) to increment a counter for the duration of the fixed pulse width to determine a “bit width threshold.” As will be explained in more detail below, the OOK receiver (43) may then compare the pulse widths of each of the subsequent control bits in the OOK signal to the bit width threshold and determine the values of the control bits.
Because the OOK receiver (43) compares pulse widths, the frequency of the clock signal generated by the clock generation circuit (55) does not have to be synchronized with the frequency of the external device (20) in order for the OOK receiver (43) to function. Hence, the OOK telemetry link (38) is considered to be “frequency independent” and may be used to communicate with a number of implantable stimulators (10) each having different system clock frequencies.
FIG. 4 illustrates an exemplary OOK receiver (43) that may be used to receive and demodulate a stream of control bits that have been modulated using OOK modulation. As shown in FIG. 4, the OOK receiver (43) may include a bit threshold counter (140) configured to measure the pulse width corresponding to the start bit. The OOK receiver (43) may further include a pulse width counter (141) configured to measure the pulse widths of each of the control bits that are included in the OOK modulated control data subsequent to the start bit. The clock signal (clk) generated by the clock generation circuit (55; FIG. 2) is input into each of the counters (140, 141) to facilitate the counter functions. The counters (140, 141) may be any type of counter circuitry known in the art. For example, the counters (140, 141) may include flip-flop circuitry.
As shown in FIG. 4, the bit threshold counter (140) generates and outputs a value (A) representing the bit width threshold. The bit width threshold may be equal to the pulse width of the start bit or, alternatively, the bit width threshold may be a multiple of the actual number of samples taken by the bit threshold counter (140). For example, the bit threshold counter (140) may output a value that is two times the number of samples taken by the counter (140) such that the bit width threshold is equal to a higher value than the actual pulse width of the start bit.
The pulse width counter (141) also outputs a value (B) representing the pulse width for each control bit included in the modulated control data. A comparator (142) may then compare the pulse width of each of the control bits with the pulse width of the start bit. For illustrative purposes only, the start bit is a “0”. Thus, if the pulse width of a particular control bit is greater than the pulse width of the start bit, the comparator (142) outputs a “1”. Likewise, if the pulse width of a particular control bit is less than or equal to the pulse width of the control bit, the comparator (142) outputs a “0”.
FIG. 5 illustrates one exemplary implementation of the OOK receiver (43) of FIG. 4. The exemplary OOK receiver (43-1) illustrated in FIG. 5 is implemented using an ASIC. However, the OOK receiver (43), as described above, may be implemented using any of a variety of different combinations of hardware and/or software. FIG. 5 shows that the counters (140, 141) may be implemented using digital flip-flops. The flip-flops may be D flip-flops (140, 141), as shown in FIG. 5, or they may be any other type of flip-flop.
As shown in FIG. 5, digital circuitry may be used in connection with the bit threshold counter (140), the pulse width counter (141), and the comparator (142). For example, logic (144) and AND gate (145) are used to cause the bit threshold counter (140) to only measure the pulse width of the start bit. Likewise, logic (144), inverters (146, 150), flip-flops (147, 149), and AND gate (148) are used to cause the pulse width counter (142) to measure the pulse widths of each of the subsequent control bits in the control data. The logic (144) may be any combination of digital logic as is known in the art. FIG. 5 also shows that the OOK receiver (43-1) may include an edge detector circuit (143) that may be used to generate a clock signal (clk_ook) for the demodulated control data (DATA_OOK). Exemplary VHDL (Very High Speed Integrated Circuit Hardware Description Language) code that may be used to program the OOK receiver (43-1) is shown in the Appendix. FIG. 6 is a timing diagram of various signals corresponding to the OOK receiver (43-1) shown in FIG. 5 and the VHDL code listed in the Appendix.
FIG. 7 is a flow chart illustrating an exemplary method of communicating with an implantable stimulator (10; FIG. 1) using OOK modulation. As shown in FIG. 7, a start bit is first sent to the OOK receiver (43; FIG. 4) (step 180). The pulse width of the start bit is then measured (step 181). A control bit may then be sent to the OOK receiver (43; FIG. 4) (step 182). The pulse width of the control bit is then measured (step 183). The pulse width of the control bit and the pulse width of the start bit are then compared (step 184). If the pulse width of the control bit is greater than the pulse width of the start bit (Yes; step 184), a control bit having a value of “1” may be output by the comparator (step 185). However, if the pulse width of the control bit is not greater than the pulse width of the start bit (No; step 184), a control bit having a value of “0” may be output by the comparator (step 186).
The preceding description has been presented only to illustrate and describe embodiments of invention. It is not intended to be exhaustive or to limit the invention to any precise form disclosed. Many modifications and variations are possible in light of the above teaching. It is intended that the scope of the invention be defined by the following claims.







APPENTDIX







LIBRARY ieee;


USE ieee.std_logic_1164.ALL;


ENTITY ook_demod_and_decode IS









PORT (










clk:
IN std_logic; divided down system clk



ook_output:
IN std_logic; output of ook receiver



wait_for_packet:
IN std_logic; charging and no packet rcvd



data_demod_ook:
OUT std_logic; demodulated data



cik_ook:
OUT std_logic clk for demodulated data



);







END entity ook_demod_and_decode;


************************************************************************


*


ARCHITECTURE rtl OF ook_demod_and_decode IS









CONSTANT threshhold length: integer:=4; length of threshhold counter








SIGNAL threshhold:
std logic vector(threshhold_length-1







DOWNTO 0);










SIGNAL meas_thresh_start:
std_logic; start measuring leading 0



SIGNAL measure_threshhold:
std_logic; high only when measuring first







0










SIGNAL clk_threshhold:
std_logic; clk thrsh counter, active 1st pls



SIGNAL en_ook_receiver L:
std_logic; high after threshhold is fixed



SIGNAL clk_width_counter:
std_logic; clock for bit width counter



SIGNAL reset_width_counter_L:
std_logic; reset for bit width counter



SIGNAL samples inpulse:
std logic vector(threshhold length







DOWNTO 0);










SIGNAL ook_delay reg:
std_logic vector(1 DOWNTO 0); delay







ook










SIGNAL clk_ook_int:
std_logic; clk for demodulated data







BEGIN









measure the width of the first negative pulse after entering charging md



measure number of clock cycles, up to max setting of counter



threshhold counter is cleared when not charging



meas_thresh_start <= wait_for_packet AND (NOT ook_output);



enable_ook_reg:PROCESS (wait_for_packet, meas_thresh_start)



BEGIN









IF wait_for_packet =‘0’ THEN









en_ook_receiver_L <= ‘1’;



ELSIF falling edge(meas_thresh_start) THEN









en_ook_receiver_L <= ‘0’;









END if;







END process enable_ook_reg;


measure_threshhold <= meas_thresh_start AND en_ook_receiver_L;


clk_threshhold <= clk ANT) measure_threshhold;


threshhold_counter:ENTITY work.up_counter(structural)









GENERIC MAP (width => threshhold length)



PORT MAP (










reset_L
=>wait_for_packet,



clk
=> clk_threshhold,



q
=> threshhold



);







measure width of pulses after the first negative pulse


width determines if data is 0 or 1


clk_width_counter <= clk AND (NOT en ook_receiver_L);


bit width_counter:ENTITY work.up_counter(structural)










GENERIC MAP (width
=> threshhold_length+1)



PORT MAP (reset_L
=> reset_width_counter_L,










clk
=> clk_width_counter,



q
=> samples inpulse);







data_demod_ook <= ‘1’ WHEN samples_in_pulse > threshhold &  ‘0’









ELSE ‘0’;







pipeline ook transition point to generate clk and reset for width cntr


clk output is generated on first falling edge after ook data transition.


reset is generated on the first rising edge after clk goes high


ook_data_pipeline:PROCESS (en_ook_receiver_L, clk)


BEGIN









IF en_ook_receiver_L = ‘1’ THEN









ook_delay reg <= (OTHERS => ‘0’);









ELSIF falling edge(clk) THEN



ook_delay reg <= ook_delay_reg(0) & (ook_output);



END if;







END process ook_data_pipeline;


clk_ook_int <= (ook_delay_reg(1) XOR ook_delay_reg(0)) AND









NOT en_ook_receiver_L;









clk_ook <= clk_ook_int;



reset_ff:PROCESS (wait_for_packet, clk)



BEGIN









IF wait_for_packet =‘0’ THEN









reset_width_counter_L <= ‘0’;









ELSIF rising_edge(clk) THEN









reset_width_counter L <= NOT clk_ook_int;



END if;









END process reset_ff;







END architecture rtl;

## Claims

1. A system, comprising:
an external device, comprising:
first modulation circuitry for producing from first data a first signal modulated with on-off keying (OOK) modulation, wherein the first modulated signal comprises logic ‘0’ bits of a first pulse width and logic ‘1’ bits of a second pulse width different from the first pulse width, wherein each bit further comprises either an ON state with a signal that varies with a first frequency or an OFF state, wherein a transition between adjacent bits in the first signal is marked by a change in the first modulated signal between the ON and OFF states;
a coil configured to wirelessly transmit the first modulated signal to the implantable medical device; and

an implantable medical device, comprising a first telemetry receiver in the implantable medical device for demodulating the first modulated signal to recover the first data.

2. The system of claim 1, further comprising:
second modulation circuitry in the external device for producing from second data a second signal modulated with frequency modulation, wherein the coil is further configured to wirelessly transmit the second modulated signal to the implantable medical device;
a second telemetry receiver in the implantable medical device for demodulating the second modulated signal to recover the second data.

3. The system of claim 2, wherein the frequency modulation comprises frequency shift keying (FSK) modulation.

4. The system of claim 2, wherein the implantable medical device further comprises a reference clock generation circuit for generating a reference clock signal used by the second telemetry receiver.

5. The system of claim 4, wherein the first data comprises calibration data used to calibrate the reference clock generation circuit such that the reference clock signal is synchronized with a frequency used to transmit the second modulated signal.

6. The system of claim 2, wherein the first data comprises a start bit and a number of control bits, the start bit being transmitted before the control bits.

7. The system of claim 6, wherein the first telemetry receiver comprises:
a bit threshold counter configured to measure a pulse width of the start bit to generate a bit width threshold;
a pulse width counter configured to measure a pulse width of the bits; and
a comparator configured to compare the measured pulse widths with the bit width threshold to determine whether a bit comprises a logic ‘0’ or a logic ‘1’.

8. The system of claim 2, wherein the implantable medical device comprises an implantable stimulator.