!252〇〇7 九、發明說明: 【發明所屬之技術領域】 本發明係關於一種通信協定,尤其是關於一種用於植入 式微電刺激系統之通信協定。 【先前技術】 植入式微電刺激系統乃使用在醫療工程上,幫助部分器 官失去動作電位之病人作電刺激之復健或醫療。本發明之 通信協定係應用於植入式微電刺激系統,該植入式微電刺 激系統係以射頻訊號(Radio Frequency Signal)方式,在人體 内部與外部進行溝通資料與傳遞功率。 在習知技術之通信協定中,以微處理器作為接收器資料 運算核心的做法所使用之通信協定,使用時需遵守特定微 處理斋之通訊協定規格(如美國專利編號:US6255901, US5 5 32641,US6307428),而一般之微處理器所使用的傳 輪封包相較於特殊應用晶片(ASIC)之封包規格要累贅許 夕,易造成不必要的資料位元傳輸浪費與功率消耗,因此 並非適合植入式生物晶片之通信協定。 因此,有必要提供一種創新且具進步性的之通信協定, 以解決上述問題。 【發明内容】 本發明目的在於提供一種用於植入式微電刺激系統之通 L協疋,其包含··至少一同步封包、一起始封包至少一資 料Λ框。4同步封包用以使該植人式微電刺激系統至一同 步狀態。該起㈣包制於該同步封包之後,用以使該植 96414.doc !252〇〇7 入式彳放電刺激系統至一資料讀取狀態。該資料訊框接續於 Λ之始封包之後’該資料訊框具有複數個欄位,每一個欄 位具有至少一位元,用以控制該植入式微電刺激系統作相 對應之動作。 本發明之通信協定設計複數個欄位,以適用於植入式微 電刺激系統。本發明之通信協定符合RS232規袼以達成傳輸 制之功把。利用本發明之通信協定,可使該植入式微電 刺激系統以射頻訊號由生物體外傳送指令,使生物體内產 生相對應之電刺激信號。 【實施方式】 本毛明用於植入式微電刺激系、统之通信協定包括單一封 包協定之制定、由複數個封包組成之「訊框」(frame)之制定 及訊框和訊框之間溝通之制定等三個部分,以下將上述三 項之制定作詳細闡述。 參考圖1A所示’在本發明之單__封包協定中,—單一封 括^個位元為—單位封包,並且每個封包皆具有一 …、甘位…—與最後之-個結束位元 (End),其餘八個位 ^ ,..^ 為此封包之貧料位元(DATA),如 此的作法可有效區八4 ^刀封包之起始與結束。另外,可透過辨 認封包起始和結炭的士 a Γ 了透過辨 ^ , 、方式將中間的資料擷取出來,豆 (baud rate)為96000,〜Λ 人一 木…、已羊 灼10 KHz的貧料傳輸率。 參考圖1B所示,龙显 4不本發明之訊框音 係包括複數個單一封~ M少 〜、圖。一汛框10 平 封包11,係為連锖值送次^ 能。由此可以丟山不 巧适、,只傳迗貧料時的封包型 心由此了以看出電腦 于、逆π的封包訊號而不會有 96414.doc 1252007 間斷。接收的時候判斷其中的起始位元=〇和結束位元爿並 計數所接收到之位元數,可將連續資料正確以單_封包的 形式的判讀出纟。此做法的另_優點為當單—封包之起始 位元與結束位元不遵守上述規則時,數位控制電路會將: 封包判定為無效封包,如此可避免部分因封包受雜訊干擾 或解調錯誤所產生系統之誤動作。 圖2為本發明之訊框應用至植人式微電刺激系統之實施 例。該訊框纖序由二同步封包21、22(synchr〇nizati〇n packet),一起始封包23(start-up packet),與一個以上之資 料訊框(data frame)所組成,茲說明如下·· 同步封包(synchronization packet): 同步封包2丨乃為一遵守起始位元=〇和結束位元=ι之封 包,其中八個資料位元固定設定為"1〇1〇1〇1〇”。同步封包 可幫助該植人式微電刺㈣_接收器作資料傳輪料二 職資料接收之準備。該同步封包之數量乃由“需求所 決定,在此設定為兩個同步封包21、22。同步封包的作用 為將電路由預備狀態提升至同步狀態,以準備接收其下— 個起始封包。 起始封包(start_up packet): 起始封包23接續在同步封包22之後,同樣具有一起始位 元=〇及一結束位元=1,其八個資料位元固定設定為 ”10101001”,並在其後接續傳輸資料訊框。起始封包的作 用為告知該植入式微電刺激系統内之一數位控制電路該同 步封包之結束,並將該數位控制電路引導至資料讀取狀 96414.doc 1252007 悲,倘方起始封包之貧料位元内容不為,,丨〇丨〇丨〇〇丨,,,則該 數位控制t路判定此訊框為失效《訊框㈣se frame),該數 位控制電路將會回到預備狀態。 資料訊框(data frame): 本發明之實施例中,資料訊框係包括一第一資料封包24 及一第一資料封包25。該第一資料封包24及第二資料封包 25均具有一起始位元、八個資料位元及一結束位元。同樣 地,該起始位元為〇,該結束位元為丨。本發明之通信協定 设什该第一資料封包24及第二資料封包25之八個資料位元 具有複數個攔位,以適用於控制植入式微電刺激系統。 該第一資料封包24的八個資料位元具有一刺激頻道欄位 (channel)、一刺激方向攔位⑷及一刺激強度欄位 (magnitude)。該刺激頻道攔位具有二位元,該刺激方向欄 位具有一位元,該刺激強度欄位具有五位元。該第二資料 封包25之八個資料位元具有一連續刺激欄位(c〇ntinu〇us, cont.)、一刺激時間攔位(duration)、一刺激間距欄位 (interval)、一刺激相位欄位(phase,ph.)及一奇偶校驗欄位 (parity,ρ·)。該連續刺激欄位具有一位元,該刺激時間攔位 具有二位元,該刺激間距攔位具有三位元,該刺激相位欄 位具有一位元,該奇偶校驗攔位具有一位元。其欄位之功 月匕如下表1所示。 參考圖3 A及3B,其顯示刺激相位(phase)之波形。其中, 圖3A為單相刺激波形圖,圖3B為雙相刺激波形圖。由圖3A 可以計算單相電刺激的頻率(frequency)與刺激間距 96414.doc 1252007 (interval),刺激時間(durtaion)之間的關係。 攔位 設 定 channel 2個位元,控制兩個神經頻道。 :所有頻道關閉。 ’ΌΓ :第一頻道關閉,第二頻道開啟。 π1〇":第一頻道開啟,第二頻道關閉。 ”11” :所有頻道皆開啟。 d(direction) 1個位元,控制電流正向刺激或反向刺激。 •Ό” :正向刺激。 ’Τ’ :反向刺激。 magnitude 5個位元,指定電流刺激的強度,由300 uA〜2 mA。 cont.(continuous) 1個位元,設定連續刺激的訊號,讓晶片持續自動依據 其 duration,interval 與 ph.(phase)產生電刺激。 :不進入連續刺激,資料訊框需連續傳送產生刺激。 ”Γ :進入連續刺激,資料訊框需停止傳送。 duration 2個位元,設定刺激的時間,10 us〜2 ms 〇 interval 3個位元,設定刺激訊號間的間隔,0〜50 ms。 ph.(phase) ’Όπ設定為單相(mono-phase)刺激 ” Γ設定為雙相(bi-phase)刺激 p.(parity) 若資料中有奇數個’Τ’,則parity為”1” ;若資料中有偶數 個’’Γ,則 parity 為 表1 96414.doc 1252007 單相電刺激的頻率(frequency)與刺激間距(interval),刺 激時間(durtaion)之間的關係為: freq = l/(interval + duration) 由圖3B可計算雙相電刺激的頻率公式為: freq = 1/ (interval + 2*duration) 表2及表3分別為刺激間距(interval)與刺激時間(duration) 之設定值,刺激頻率範圍可由20 Hz〜10 KHz,在功能性電 刺激領域已涵蓋刺激神經與阻隔神經訊號之功能。因此, 此多種頻率之功能性電刺激器可在多種臨床治療上被應 用0 位元值 000 001 010 Oil 100 101 110 111 刺激間距 Os 100 us 200 us 1 ms 3 ms 5 ms 10 ms 50 ms 頻率 10 KHz 5 KHz 3.3 KHz 1 KHz 330 Hz 200 Hz 100 Hz 20 Hz 表2 位元值 00 01 10 11 刺激時間 100 us 500 us 1 ms 2 ms 表3 圖4為利用上述之訊框使植入式微電刺激系統進入連續 模式之示意圖。當輸入訊號指定電路為連績模式後’輸入 訊號即歸零,而依照之前訊框所指定之刺激時間及刺激強 度週期訊號來作連續性之週期刺激。 一個訊框之結束可使用連續16個位元,此時數位控制 電路會判定最後所接收到的’’ Γ’位元為此訊框之結束,並進 96414.doc -10- 1252007 入預備狀態,以接收下一個新訊框之同步封包。 個訊框中可包含多於—個之f料訊框,惟#訊框之資 訊包含連續刺激位元((;0加.)=1進入連續模式時,訊框需停 止傳送,使植入式微電刺激系統内之數位控制電路依照含 有連續刺激位元(⑽旧之訊框内容設定輸出之刺激頻道 (channel),方向(d),與刺激強度(magnitude)。若在連續模 式中接收到位元"1”時,_定為連續模式之結束,並將接 下來之封包判定為一新訊框之同步封包,進入同步狀態。 本發明之通信協定設計複數個攔位,以適用於植入式微 電刺激系統,使該植入式微電刺激系統之傳送器以本發明 之通信協定之固定封包格式編碼後之電刺激資料訊息傳 达,並供該植入式微電刺激系統之接收器接收俾作相對應 生物性電刺激之動作。本發明之通信協定非常適用於醫療 工業上之植入式微電刺激系統,可望在癱瘓病患與植入式 微電刺激研究上有所貢獻,深具實用性。 惟上述實施例僅為說明本發明之原理及其功效,而非限 制本發明。因此,習於此技術之人士可在不違背本發明之 精神對上述實施例進行修改及變化。本發明之權利範圍應 如後述之申請專利範圍所列。 【圖式簡單說明】 圖1A為本發明通信協定之單一封包示意圖; 圖1B為本發明通信協定之訊框示意圖; 圖2為本發明通信協定應用於植入式微電刺激系統之訊 框示意圖; 96414.doc -11 - !252〇〇7 圖3 Α為本發明單相刺激波形圖; 圖3B為本發明雙相刺激波形圖; 圖4為利用本發明之訊框使植入式微電刺激系統進入連 續模式之示意圖。 【主要元件符號說明】 10 本發明之訊框協定 11 單一封包協定 20 應用於植入式微電刺激系統之訊框 21、22 同步封包 23 起始封包 24 第一資料封包 25 第二資料封包 96414.doc -12-BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a communication protocol, and more particularly to a communication protocol for an implanted micro-electric stimulation system. [Prior Art] The implantable micro-electric stimulation system is used in medical engineering to help some patients lose their action potential for electrical stimulation or medical treatment. The communication protocol of the present invention is applied to an implantable micro-electric stimulation system that communicates data and transmits power both inside and outside the human body by means of a radio frequency signal (Radio Frequency Signal). In the communication protocol of the prior art, the communication protocol used by the microprocessor as the core of the receiver data operation is subject to the specific protocol of the micro-processing protocol (such as US Patent No.: US6255901, US5 5 32641). , US6307428), and the general-purpose microprocessor uses a packet package that is more cumbersome than the packet specification of an application-specific chip (ASIC), which is likely to cause unnecessary data bit transmission waste and power consumption, and thus is not suitable. Implanted biochip communication protocol. Therefore, it is necessary to provide an innovative and progressive communication protocol to solve the above problems. SUMMARY OF THE INVENTION It is an object of the present invention to provide a protocol for an implantable micro-electric stimulation system comprising at least one synchronization packet and at least one data frame of a starting packet. 4 Synchronous packets are used to bring the implanted micro-electric stimulation system to a synchronized state. The starting (4) is packaged after the synchronous packet to enable the implanted discharge stimulation system to a data reading state. The data frame is continued after the initial packet. The data frame has a plurality of fields, each field having at least one bit for controlling the implanted micro-electric stimulation system to perform corresponding actions. The communication protocol of the present invention is designed in a plurality of fields for use in an implantable micro-stimulation system. The communication protocol of the present invention conforms to the RS232 specification to achieve the transmission system. With the communication protocol of the present invention, the implantable micro-electric stimulation system can transmit instructions from the outside of the body by radio frequency signals to generate corresponding electrical stimulation signals in the living body. [Embodiment] The communication protocol of Maoming for implantable micro-electric stimulation system includes the development of a single package agreement, the development of a "frame" composed of a plurality of packets, and the communication between the frame and the frame. The formulation of the three parts, the following three provisions are elaborated. Referring to FIG. 1A, in the single__packet agreement of the present invention, a single bit is a unit packet, and each packet has a ..., a grat... and a final end bit. Yuan (End), the remaining eight bits ^,..^ for this packet of poor material bits (DATA), such an approach can effectively start and end the 8 4 knife package. In addition, by identifying the beginning of the package and the charcoal taxi, the intermediate data is extracted by means of discrimination, and the baud rate is 96000, ~ Λ人一木..., 羊羊 10 KHz The poor material transfer rate. Referring to FIG. 1B, Long Xian 4 does not include the frame number of the present invention. One frame 10 is flat, and 11 is the same as the value. As a result, it is not easy to lose the mountain. The envelope type that only conveys the poor material can be seen as a packet signal of the computer and the inverse π without the interruption of 96414.doc 1252007. When receiving, the starting bit = 〇 and the ending bit 判断 are judged and the number of received bits is counted, and the continuous data can be correctly read in the form of a single _ packet. Another advantage of this method is that when the start and end bits of the single-packet do not comply with the above rules, the digital control circuit will: determine the packet as an invalid packet, so as to avoid some interference or solution due to noise. Adjust the malfunction of the system generated by the error. Figure 2 is an illustration of an embodiment of the frame of the present invention applied to a implantable micro-electric stimulation system. The frame sequence consists of two synchronous packets 21, 22, a start-up packet, and one or more data frames. · Synchronization packet: Synchronization packet 2 is a packet that obeys the start bit = 〇 and end bit = ι, where eight data bits are fixedly set to "1〇1〇1〇1〇 The synchronous packet can help the implanted micro-electric spur (4) _ receiver to prepare for the data transfer and the second job data reception. The number of the synchronous packet is determined by the demand, and is set as two synchronous packets 21 . twenty two. The role of the synchronization packet is to raise the circuit from the ready state to the synchronous state in preparation for receiving its next start packet. Start_up packet: The start packet 23 continues after the synchronization packet 22, and also has a start bit = 〇 and an end bit = 1, and its eight data bits are fixedly set to "10101001", and The data frame is then transmitted. The function of the starting packet is to inform the end of the synchronous packet of the digital control circuit in the implanted micro-electric stimulation system, and direct the digital control circuit to the data reading state 96414.doc 1252007 sorrow, if the party starts the packet If the content of the poor bit is not, 丨〇丨〇丨〇〇丨,,, the digital control determines that the frame is invalid (frame) and the digital control circuit will return to the standby state. Data frame: In the embodiment of the present invention, the data frame includes a first data packet 24 and a first data packet 25. The first data packet 24 and the second data packet 25 each have a start bit, eight data bits, and an end bit. Similarly, the start bit is 〇 and the end bit is 丨. The communication protocol of the present invention provides that the eight data bits of the first data packet 24 and the second data packet 25 have a plurality of data blocks for controlling the implanted micro-electric stimulation system. The eight data bits of the first data packet 24 have a stimulation channel, a stimulation direction (4), and a stimulation intensity. The stimulus channel block has two bits, the stimulus direction field has one bit, and the stimulus intensity field has five bits. The eight data bits of the second data packet 25 have a continuous stimulation field (c〇ntinu〇us, cont.), a stimulation time interval (duration), a stimulation interval field (interval), and a stimulation phase. Field (phase, ph.) and a parity field (parity, ρ·). The continuous stimulation field has a one-bit, the stimulation time block has two bits, the stimulation interval block has three bits, and the stimulation phase field has one bit, and the parity block has one bit . The merits of its fields are shown in Table 1 below. Referring to Figures 3A and 3B, the waveform of the stimulation phase is shown. 3A is a single-phase stimulation waveform diagram, and FIG. 3B is a two-phase stimulation waveform diagram. From Fig. 3A, the relationship between the frequency of single-phase electrical stimulation and the stimulation interval 96414.doc 1252007 (interval), stimulation time (durtaion) can be calculated. The block sets the channel 2 bits to control the two neural channels. : All channels are closed. ΌΓ: The first channel is off and the second channel is on. Π1〇": The first channel is turned on and the second channel is turned off. "11": All channels are open. d (direction) 1 bit, controlling current positive or reverse stimulation. •Ό”: positive stimulus. 'Τ': reverse stimulation. magnitude 5 bits, specifying the intensity of the current stimulus, from 300 uA to 2 mA. cont.(continuous) 1 bit, setting the signal for continuous stimulation To allow the chip to automatically generate electrical stimulation based on its duration, interval and ph. (phase): : Do not enter continuous stimulation, the data frame needs to be continuously transmitted to generate stimulation. "Γ : Enter continuous stimulation, the data frame needs to stop transmission. Duration 2 bits, set the stimulus time, 10 us~2 ms 〇 interval 3 bits, set the interval between stimulus signals, 0~50 ms. Ph.(phase) 'Όπ is set to mono-phase stimuli Γ is set to bi-phase stimuli p.(parity) If there are an odd number of 'Τ' in the data, the parity is "1" If there is an even number of ''Γ in the data, the parity is Table 1 96414.doc 1252007 The frequency of single-phase electrical stimulation (frequency) and the stimulation interval (interval), the stimulation time (durtaion) is: freq = l /(interval + duration) The frequency formula for calculating the biphasic electrical stimulation from Fig. 3B is: freq = 1/ (interval + 2*duration) Table 2 and Table 3 are the stimulation interval and the duration of the stimulation, respectively. The set value, the stimulation frequency range can be from 20 Hz to 10 KHz, and the functions of stimulating nerves and blocking nerve signals have been covered in the field of functional electrical stimulation. Therefore, this multi-frequency functional electrical stimulator can be applied in various clinical treatments. Bit value 000 001 010 Oil 100 101 110 111 Stimulus spacing Os 100 us 200 us 1 ms 3 ms 5 ms 10 ms 50 ms Frequency 10 KHz 5 KHz 3.3 KHz 1 KHz 330 Hz 200 Hz 100 Hz 20 Hz Table 2 bit values 00 01 10 11 Stimulation time 100 us 500 us 1 ms 2 ms Table 3 4 is a schematic diagram of using the above-mentioned frame to make the implanted micro-electric stimulation system enter the continuous mode. When the input signal designation circuit is in the continuous mode, the input signal is zero, and according to the stimulation time and stimulation intensity specified in the previous frame. The periodic signal is used for continuous periodic stimulation. The end of a frame can use 16 consecutive bits. At this time, the digital control circuit determines that the last received ''Γ' bit is the end of this frame and enters 96414. .doc -10- 1252007 Enter the ready state to receive the synchronization packet of the next new frame. The frame can contain more than one frame, but the information of the frame contains continuous stimulus bits (( ; 0 plus.) = 1 into the continuous mode, the frame needs to stop transmission, so that the digital control circuit in the implanted micro-electric stimulation system according to the stimulus channel containing the continuous stimulus bit ((10) the old frame content output output (channel ), direction (d), and stimulus intensity. If the bit "1" is received in continuous mode, _ is determined to be the end of continuous mode, and the next packet is determined to be a new frame. The packet is in a synchronized state. The communication protocol of the present invention is designed with a plurality of blocks for application to the implantable micro-electric stimulation system, such that the transmitter of the implantable micro-electric stimulation system is encoded in the fixed packet format of the communication protocol of the present invention. The electrical stimulation data message is conveyed and the receiver of the implantable micro-electric stimulation system receives the action corresponding to the biological electrical stimulation. The communication protocol of the present invention is very suitable for an implantable micro-electric stimulation system in the medical industry, and is expected to contribute to the research of sputum patients and implantable micro-electric stimulation, and has practical utility. However, the above-described embodiments are merely illustrative of the principles of the invention and its effects, and are not intended to limit the invention. Therefore, those skilled in the art can make modifications and changes to the above embodiments without departing from the spirit of the invention. The scope of the invention should be as set forth in the appended claims. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1A is a schematic diagram of a single packet of a communication protocol according to the present invention; FIG. 1B is a schematic diagram of a frame of a communication protocol according to the present invention; FIG. 2 is a schematic diagram of a frame of a communication protocol applied to an implantable micro-electric stimulation system according to the present invention; 96414.doc -11 - !252〇〇7 Figure 3 is a single-phase stimulation waveform diagram of the present invention; Figure 3B is a bi-phase stimulation waveform diagram of the present invention; Figure 4 is an implantable micro-electric stimulation system using the frame of the present invention. A schematic diagram of entering continuous mode. [Major component symbol description] 10 Frame protocol of the present invention 11 Single packet protocol 20 Application to the implanted micro-electric stimulation system frame 21, 22 Synchronous packet 23 Start packet 24 First data packet 25 Second data packet 96414. Doc -12-