JP2009199140A - Data transfer method, data transfer program and recording medium storing data transfer program - Google Patents
Data transfer method, data transfer program and recording medium storing data transfer program Download PDFInfo
- Publication number
- JP2009199140A JP2009199140A JP2008037265A JP2008037265A JP2009199140A JP 2009199140 A JP2009199140 A JP 2009199140A JP 2008037265 A JP2008037265 A JP 2008037265A JP 2008037265 A JP2008037265 A JP 2008037265A JP 2009199140 A JP2009199140 A JP 2009199140A
- Authority
- JP
- Japan
- Prior art keywords
- data
- data transfer
- usb
- time
- abnormal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
Description
本発明は、USB(Universal Serial Bus)プロトコルに定められたインタフェースでデータ転送を行うデータ転送方法、データ転送プログラムおよびデータ転送プログラムを格納した記録媒体に関する。 The present invention relates to a data transfer method, a data transfer program, and a recording medium storing a data transfer program, in which data is transferred using an interface defined by a USB (Universal Serial Bus) protocol.
近年、USBプロトコルに定められたインタフェース(USBインタフェース)を備えた半導体メモリを用いた記録媒体であるUSBメモリが様々な用途に用いられるようになっている。 In recent years, a USB memory, which is a recording medium using a semiconductor memory having an interface (USB interface) defined in the USB protocol, has been used for various purposes.
この種のUSBメモリはパーソナルコンピュータ等の外部記憶装置として用いる以外に、例えば、音楽データや映像データを記録して、USBインタフェースを備えたステレオ機器やテレビなどの電子機器に装着することで、USBメモリに記録された音楽データや映像データを再生するような用途に用いられることもある。 In addition to using this type of USB memory as an external storage device such as a personal computer, for example, music data and video data can be recorded and attached to an electronic device such as a stereo device or a television equipped with a USB interface. It may be used for the purpose of reproducing music data or video data recorded in a memory.
このようなUSBメモリなどのデバイスとステレオ機器やテレビなどの電子機器(ホスト)とを接続するUSBインタフェースの信号線に、静電気や無線LANなどの無線通信の電磁波の影響によるノイズが印加されると、再生中の音声や映像に不具合が生じたり、再生そのものが停止してしまうなどといった問題があった。 When noise due to the influence of electromagnetic waves of wireless communication such as static electricity or wireless LAN is applied to a signal line of a USB interface that connects a device such as a USB memory and an electronic device (host) such as a stereo device or a television set. There are problems such as a problem in the sound and video being played back, or the playback itself being stopped.
上述した問題に対して、例えば特許文献1に記載のUSB機器が提案されている。特許文献1に記載のUSB機器は、追加したリセット回路により、USB機器の暴走時などにリセットを行って、USB機器の初期化を行っている。
しかしながら、特許文献1に記載のUSB機器は、リセット回路というハードウェアを追加しているために、ハードウェアの増大化および複雑化や当該リセット回路自身の電気的な弊害の検証が必要となることなどから開発コストの増大という問題があった。
However, since the USB device described in
そこで、本発明は、例えばハードウェアの追加を行わずに、ノイズによる影響を少なくするデータ転送方法、データ転送プログラムおよびデータ転送プログラムを格納した記録媒体を提供することを課題とする。 Accordingly, an object of the present invention is to provide a data transfer method, a data transfer program, and a recording medium storing the data transfer program that reduce the influence of noise without adding hardware, for example.
上記課題を解決するために、請求項1に記載のデータ転送方法は、USBプロトコルに定められたインタフェースを用いたデバイスとホストとの間のデータ転送方法であって、前記インタフェースの信号線に外部から印加される電気的なノイズの影響による異常データを検出し、前記異常データの長さが予め定めた第1の時間以下である場合は、当該異常となったデータを再度前記デバイスから読み出し、前記異常データの長さが前記第1の時間を超えて予め定めた第2の時間以下である場合は、当該異常データの次のデータを前記デバイスから読み出し、前記異常データの長さが前記第2の時間を超える場合は、リセット動作を行ってデバイスの先頭からデータを読み出すことを特徴としている。
In order to solve the above-mentioned problem, the data transfer method according to
請求項6に記載のデータ転送プログラムは、USBプロトコルに定められたインタフェースを用いたデバイスとの間でデータ転送を行うデータ転送手段としてコンピュータを機能させるデータ転送プログラムであって、前記インタフェースの信号線に外部から印加される電気的なノイズによる異常データを検出する検出手段と、前記異常データの長さが第1の時間以下である場合は、前記データ転送手段に当該異常となったデータを再度前記デバイスから読み出させ、前記異常データの長さが前記第1の時間を超えて第2の時間以下である場合は、前記データ転送手段に当該異常データの次のデータを前記デバイスから読み出させ、前記異常データの長さが前記第2の時間を超える場合は、前記データ転送手段にリセット動作を行わせてデバイスの先頭からデータを読み出すように制御する制御手段として、前記コンピュータを機能させることを特徴としている。
7. The data transfer program according to
以下、本発明の一実施形態にかかるデータ転送方法を説明する。本発明の一実施形態にかかるデータ転送方法は、印加される電気的なノイズの影響による異常データの長さが、予め定めた第1の時間以下である場合は、当該データを再度読み出し、第1の時間を超えて予め定めた第2の時間以下である場合は、当該データの次のデータを読み出し、第2の時間を超える場合は、リセット動作を行ってデバイスの先頭からデータを読み出すので、ノイズの影響の大きさ(長さ)によって再送信、読み飛ばし(マスク)、リセットと、動作を変更することができ、ノイズの影響に応じた低減策によりノイズの影響を少なくすることができる。また、データが異常であるか否かでノイズ印加の検出を行い、データの扱いを変更しているのみであるので、ハードウェアの追加等が不要となり、開発コストを抑えながらノイズの影響を少なくすることができる。 Hereinafter, a data transfer method according to an embodiment of the present invention will be described. In the data transfer method according to an embodiment of the present invention, when the length of abnormal data due to the effect of applied electrical noise is equal to or shorter than a predetermined first time, the data is read again, If the time exceeds 1 time and is less than or equal to the predetermined second time, the next data of the data is read. If the time exceeds the time, the reset operation is performed to read the data from the top of the device. , Resend, skip (mask), reset, and operation can be changed depending on the magnitude (length) of the influence of noise, and the influence of noise can be reduced by reducing measures according to the influence of noise . In addition, noise application is detected based on whether or not the data is abnormal, and only the handling of the data is changed. This eliminates the need for additional hardware and reduces the impact of noise while reducing development costs. can do.
また、デバイスからホストへのデータ転送が、USBプロトコルに定められたバルク転送によりデータの転送が行われてもよい。このようにすることにより、バルク転送を用いたデータ転送においてノイズの影響を少なくすることができる。 In addition, data transfer from the device to the host may be performed by bulk transfer defined by the USB protocol. By doing so, it is possible to reduce the influence of noise in data transfer using bulk transfer.
また、第1の時間および第2の時間が、USBプロトコルに定められたフレームの数によって予め定められていてもよい。このようにすることにより、特別なタイマなどを用いずに単にフレーム数をカウントするカウンタなどで第1の時間および第2の時間を計測することができるので、第1の時間および第2の時間の判定を容易にすることができる。 In addition, the first time and the second time may be determined in advance by the number of frames determined in the USB protocol. In this way, the first time and the second time can be measured by using a counter that simply counts the number of frames without using a special timer. Can be easily determined.
また、第2の時間が、ホスト内において強制リセットがなされる時間未満であってもよい。このようにすることにより、強制リセットがなされて、ホスト内が初期化されることなく、デバイスとのデータ転送のみの初期化を行うことができる。 Further, the second time may be less than the time for which the forced reset is performed in the host. By doing so, it is possible to initialize only the data transfer with the device without forcibly resetting and initializing the host.
また、デバイスには、音声データまたは映像データが記録されていてもよい。このようにすることにより、音声データや映像データを転送して再生する際に、極力再生を継続しつつ、ノイズ印加による影響を少なくすることができる。 In addition, audio data or video data may be recorded on the device. In this way, when audio data and video data are transferred and reproduced, the influence of noise application can be reduced while continuing reproduction as much as possible.
また、本発明の一実施形態にかかるデータ転送プログラムは、検出手段で検出された印加される電気的なノイズの影響による異常データの長さが、予め定めた第1の時間以下である場合は、データ転送手段に当該データを再度読み出させ、第1の時間を超えて予め定めた第2の時間以下である場合は、データ転送手段に当該データの次のデータを読み出させ、第2の時間を超える場合は、データ転送手段にリセット動作を行わせてデバイスの先頭からデータを読み出すようにそれぞれ制御手段で制御するので、ノイズの影響の大きさ(長さ)によって再送信、読み飛ばし(マスク)、リセットと、動作を変更することができ、ノイズの影響に応じた低減策によりノイズの影響を少なくすることができる。また、データが異常であるか否かでノイズ印加の検出を行い、データの扱いを変更しているのみであるので、ハードウェアの追加等が不要となり、開発コストを抑えながらノイズの影響を少なくすることができる。 In the data transfer program according to the embodiment of the present invention, when the length of the abnormal data due to the influence of the applied electrical noise detected by the detection unit is equal to or less than the predetermined first time, , When the data transfer means reads the data again, and when the second time exceeds the first time and is equal to or less than the predetermined second time, the data transfer means reads the next data of the data, If this time is exceeded, the control means controls the data transfer means to perform a reset operation so that data is read from the beginning of the device. Therefore, retransmission and skipping are performed depending on the magnitude (length) of the influence of noise. (Mask), reset, and operation can be changed, and the influence of noise can be reduced by a reduction measure corresponding to the influence of noise. In addition, noise application is detected based on whether or not the data is abnormal, and only the handling of the data is changed. This eliminates the need for additional hardware and reduces the impact of noise while reducing development costs. can do.
また、上述のデータ転送プログラムをコンピュータ読み取り可能な記録媒体に格納してもよい。このようにすることにより、データ転送プログラムを機器に組み込む以外に単体でも流通させることができ、バージョンアップ等も容易に行える。 Further, the above-described data transfer program may be stored in a computer-readable recording medium. In this way, the data transfer program can be distributed alone as well as incorporated into the device, and version upgrades can be easily performed.
本発明の一実施例にかかるデータ転送方法を図1乃至図4を参照して説明する。本発明の一実施例にかかるデータ転送方法は、図1に示すようなUSB機器1に適用されている。USB機器1は、図1に示すように、USBメモリ2と、本体部3と、を備え、USBメモリ2と本体部3とはUSBプロトコルに定められたインタフェースによって接続されている。
A data transfer method according to an embodiment of the present invention will be described with reference to FIGS. A data transfer method according to an embodiment of the present invention is applied to a
デバイスとしてのUSBメモリ2は、フラッシュメモリなどの不揮発性メモリが用いられた記録装置であり、USBインタフェースに則した接続端子を備えている。本実施例ではUSBメモリ2にはMP3(MPEG Audio Layer-3)やAAC(Advanced Audio Coding)などで符号化された音楽データが記録されている。勿論音楽データが符号化されたデータに限らないことは言うまでもない。
The
ホストとしての本体部3は、USBホスト部4と、マイコン5と、メモリ6と、デコーダ7と、音声出力端子8と、を備えている。
The
USBホスト部4は、USBインタフェースに則した接続端子を備え、マイコン5からの指示によってUSBメモリ2とUSBプロトコルに規定された通信を行い、USBメモリ2からのデータの読み出しやUSBメモリ2の制御などを行う。
The
データ転送手段、検出手段、制御手段としてのマイコン5は、CPU(Central Processing Unit)やRAM(Random Access Memory)およびROM(Read Only Memory)などを内蔵したマイクロコンピュータであり、本体部3全体の制御やUSBホスト部4とUSBメモリ2間のデータ転送やノイズの影響による異常データ検出時の制御などを行う。
The
メモリ6は、USBメモリ2から読み出された音楽データを一時蓄積する半導体メモリである。
The
デコーダ7は、メモリ6に蓄積された音楽データを読み出して復号化し、その後アナログ信号に変換して音声出力端子8から出力する。
The
次に、上述した構成のUSB機器1において、USBメモリ2と本体部3との間のデータ転送時のノイズによる異常発生時の処理について図2ないし図4のフローチャートを参照して説明する。図2ないし図4に示したフローチャートはマイコン5内のROMに記録されたプログラムによって構成されマイコン5内のCPUが実行する。
Next, in the
まず、ステップS1において、USBデバイスとの接続状態を定期的に確認し、ステップS2に進む。本ステップでは、USBプロトコルに定められたバルク転送でUSBホスト4にUSBメモリ2から音楽データを読み出させて、その音楽データを受信したら、フレーム単位にACKまたはNAKコマンドをUSBメモリ2に送出させる。ACKおよびNAKコマンドはUSBプロトコルに規定され、ACKは正常に受信できたことを示し、NAKは正常に受信できなかったことを示すコマンドである。
First, in step S1, the connection state with the USB device is periodically checked, and the process proceeds to step S2. In this step, the
次に、ステップS2において、異常データを受信したか否かを判断し、異常データを受信した場合(YESの場合)はステップS3に進み、そうでない場合(NOの場合)はステップS1に戻る。異常データとは、USBインタフェースの信号線であるDP(D+ともいう)およびDM(D−ともいう)が両方ともLowレベルの状態になっている場合をいう。USBプロトコルでは、転送されるデータの“0”や“1”を意味するDPとDMとの組み合わせが規定されており、転送されるデータとしてDP、DMともにLowという組み合わせはあり得ない。したがって、このようなデータとしてあり得ない組み合わせが検出された場合は異常データとして認識する。特に、外部から静電気や無線通信からの電磁波が原因とされるノイズが信号線に印加された場合は、このような異常データとしてUSBインタフェースの信号線上に現れることが多いので、この異常データを検出することでノイズの検出を行うことができる。すなわち、外部から印加される電気的なノイズの影響による異常データを検出している。 Next, in step S2, it is determined whether or not abnormal data has been received. If abnormal data has been received (in the case of YES), the process proceeds to step S3. If not (in the case of NO), the process returns to step S1. Abnormal data refers to the case where DP (also referred to as D +) and DM (also referred to as D-), both of which are USB interface signal lines, are in a low level state. In the USB protocol, a combination of DP and DM, which means “0” or “1” of data to be transferred, is defined, and there is no combination of DP and DM Low as data to be transferred. Therefore, when such a combination that is not possible as data is detected, it is recognized as abnormal data. In particular, when noise caused by static electricity or electromagnetic waves from wireless communication is applied to the signal line from the outside, this abnormal data often appears on the USB interface signal line as such abnormal data. By doing so, noise can be detected. That is, abnormal data due to the influence of electrical noise applied from the outside is detected.
次に、ステップS3において、ステップS2で検出した異常データは第1の時間としての1フレーム以内か否かを判断し、1フレーム以内の場合はステップS4に進み、1フレームを超える場合はステップS6に進む。本ステップにおける判定はUSBフレームごとに行う。つまり、1つのUSBフレームにおいて1ビットでも異常データが検出された場合はそのUSBフレームは異常と判断する。したがって、1フレームを超える場合とは、1ビットでも異常データが検出されたUSBフレームが連続して2フレーム以上検出されたか否かということを意味する。なお、この第1の時間は1フレーム以内に限らないが、少なくとも後述する第2の時間よりも短い時間としなければならない。 Next, in step S3, it is determined whether or not the abnormal data detected in step S2 is within one frame as the first time. If it is within one frame, the process proceeds to step S4. If it exceeds one frame, step S6 is performed. Proceed to The determination in this step is performed for each USB frame. That is, if abnormal data is detected even with one bit in one USB frame, it is determined that the USB frame is abnormal. Therefore, the case of exceeding one frame means whether or not two or more USB frames in which abnormal data is detected even with one bit are detected continuously. The first time is not limited to within one frame, but must be at least shorter than the second time described later.
次に、ステップS4において、USBメモリ2に対してNAKを返答し、再度同じ1フレームを要求してステップS5に進む。つまり、異常データが検出されたUSBフレームの再送信を要求している。
Next, in step S4, NAK is returned to the
次に、ステップS5において、NAK返答して再送信されてきたフレームデータを上書きし、正常なデータに変更してステップS1に戻る。つまり、再送信されたUSBフレームをメモリ6の当該USBフレームが書き込まれるアドレスに上書きさせる。このようにすることで、1フレーム期間程度のノイズであれば再送信を行ってメモリ6のデータを上書きするので、デコーダ7のデコード動作に影響することなく、音声信号が途切れることなく再生が継続される。
Next, in step S5, the frame data retransmitted in response to the NAK is overwritten, changed to normal data, and the process returns to step S1. That is, the retransmitted USB frame is overwritten on the address in the
ステップS6においては、ステップS2で検出した異常データは第2の時間としてのマスク処理可能なフレーム数か否かを判断し、マスク処理可能なフレーム数の場合はステップS7に進み、マスク処理不可能なフレーム数(マスク処理可能なフレーム数を超える)の場合はステップS8に進む。マスク処理とは異常データとなったUSBフレームを再生しないで読み飛ばすことを意味し、マスク処理可能なフレーム数は予め定められたフレーム数である。ただし、この予め定められたフレーム数は、マイコン5とUSBホスト4とを接続するバスの仕様により、バスの通信が行われずマイコン5が暴走したなどの正常な状態でないとして、マイコン5に対して割り込みなどによって強制的にリセットを行う時間よりも短い時間とする。つまり、強制的にリセットを行う時間より長く設定してしまうと、マイコン5に強制リセットがかかってしまい再生が継続できなくなってしまうのと、マイコン5自身がリセットされるとマイコン5のプログラムも初期化されてしまうので、復帰時間がかかってしまう恐れがあるため、強制的にリセットを行う時間よりは短くすることでプログラム上で処理ができるようにしている。
In step S6, it is determined whether or not the abnormal data detected in step S2 is the number of frames that can be masked as the second time. If the number of frames that can be masked is reached, the process proceeds to step S7 and mask processing is impossible. If the number of frames is greater (exceeds the number of frames that can be masked), the process proceeds to step S8. Masking means that USB frames that have become abnormal data are skipped without being reproduced, and the number of frames that can be masked is a predetermined number of frames. However, the predetermined number of frames is based on the specifications of the bus connecting the
次に、ステップS7において、予め定めた数フレームマスクし、次のSOF、Adress、StreamDataを要求してステップS1に戻る。SOF(Start Of Flame)やAdressおよびStreamDataとはUSBフレームに含まれるデータである。つまり、異常データと判断されたフレームはデコーダ7によるデコード処理を行わせない。USBメモリ2に対してはマスクしたフレームの次のアドレスのデータを要求し、次のアドレスのデータから再生を継続する。
Next, in step S7, a predetermined number of frames are masked, the next SOF, Address, and StreamData are requested, and the process returns to step S1. SOF (Start Of Flame), Address, and StreamData are data included in the USB frame. That is, the frame determined to be abnormal data is not subjected to decoding processing by the
ステップS8においては、USBホスト部4にUSBメモリ2に対してUSBリセットを送出させてステップS9に進む。USBリセットとはDP、DM両信号ともLowレベルにすることである。このようにすることで、USBメモリ2の動作が初期化される。
In step S8, the
次に、ステップS9において、USBホスト部4からGet DescriptorをUSBメモリ2に対して送出させて、ステップS10に進む。本ステップでは、USBメモリ2のアドレス0に格納されたUSBメモリ2を識別するための情報などUSBメモリ2を改めて認識するための情報を得るコマンドを送出している。
Next, in step S9, the
次に、ステップS10において、再度USBリセットを送出させてステップS10に進む。本ステップの2回目のリセットを行うことで、USBメモリ2を確実に初期化することができる。
Next, in step S10, the USB reset is sent again, and the process proceeds to step S10. By performing the second reset in this step, the
次に、ステップS11において、USBホスト部4からデバイス(USBメモリ2)にUSBアドレスを割り当てて、Set AdressをUSBメモリ2に送出させてステップS1に戻る。これで、USBメモリ2の再セットアップが完了し、音楽データの読み出しを再開することができる。
Next, in step S11, a USB address is allocated from the
本実施例によれば、本体部3と音楽データが記録されたUSBメモリ2とがUSBインタフェースによって接続されたUSB機器1において、USBインタフェースの信号線上に電気的なノイズが印加されたことを、データとして規定されていない異常なデータによって検出し、その異常データが検出されたUSBフレームが1フレーム以下の場合は異常データが検出されたUSBフレームを再送信させ、異常データが検出されたUSBフレームが1フレームを超えてマスク可能なフレーム数以下の場合は異常データが検出されたUSBフレームをマスクし次のUSBフレームから再生させ、マスク可能なフレーム数を超えた場合はUSBメモリ2に対してリセットをして再セットアップを行うことで、異常データが検出されたフレーム数に応じてノイズの影響の低減策を行うことができる。また、データが異常であるか否かでノイズ印加の検出を行っているので、ハードウェアの追加等が不要となり、開発コストを抑えることができる。
According to the present embodiment, in the
また、USBプロトコルに定められたバルク転送によりデータの転送が行われているので、バルク転送を用いた音楽データなどの転送においてノイズの影響を少なくすることができる。 In addition, since data transfer is performed by bulk transfer defined in the USB protocol, it is possible to reduce the influence of noise in transferring music data or the like using bulk transfer.
また、ノイズの影響(異常データの長さ)を判定するためにUSBフレーム数を用いているので、フレーム数をカウントするのみでよく、判定を容易にすることができる。 Further, since the number of USB frames is used to determine the influence of noise (abnormal data length), it is only necessary to count the number of frames, and the determination can be facilitated.
また、マスク可能なフレーム数をマイコン外部からの強制リセットがかかる時間よりも短くすることで、極力再生を継続してノイズによってマイコン5の初期化が発生しないようにすることができる。
Further, by making the number of maskable frames shorter than the time required for the forced reset from the outside of the microcomputer, it is possible to continue the reproduction as much as possible and prevent the initialization of the
なお、USBメモリ2に記録されるデータは音楽データ(音声データ)に限らず映像データとしてもよい。本発明ではマスク(読み飛ばし)を行うために、音楽や映像などデータの欠落が発生しても影響が少ない(音飛びや映像の乱れなどは発生するものの少なくとも再生は継続できる)ようなデータであれば適用することができる。
The data recorded in the
前述した実施例によれば、以下のデータ転送方法およびデータ転送プログラムが得られる。 According to the embodiment described above, the following data transfer method and data transfer program can be obtained.
(付記1)USBプロトコルに定められたインタフェースを用いたUSBメモリ2と本体部3との間のデータ転送方法であって、
インタフェースの信号線に外部から印加される電気的なノイズの影響による異常データを検出し、異常データの長さが1フレーム以下である場合は、当該異常となったデータを再度USBメモリ2から読み出し、異常データの長さがイフレームを超えてマスク可能な時間以下である場合は、当該異常データの次のデータをUSBメモリ2から読み出し、異常データの長さがマスク可能な時間を超える場合は、リセット動作を行ってUSBメモリ2の先頭からデータを読み出すことを特徴とするデータ転送方法。
(Supplementary note 1) A data transfer method between the
If abnormal data due to the effect of electrical noise applied to the interface signal line from the outside is detected and the length of the abnormal data is one frame or less, the abnormal data is read from the
このデータ転送方法によれば、ノイズの影響の大きさ(長さ)によって再送信、読み飛ばし(マスク)、リセットと、動作を変更することができるのでノイズの影響を少なくすることができる。また、データが異常であるか否かでノイズ印加の検出を行い、データの扱いを変更しているのみであるので、ハードウェアの追加等が不要となり、開発コストを抑えながらノイズの影響を少なくすることができる。 According to this data transfer method, operations such as retransmission, skipping (masking), and reset can be changed according to the magnitude (length) of the influence of noise, so that the influence of noise can be reduced. In addition, noise application is detected based on whether or not the data is abnormal, and only the handling of the data is changed. This eliminates the need for additional hardware and reduces the impact of noise while reducing development costs. can do.
(付記2)USBプロトコルに定められたインタフェースを用いたUSBメモリ2と本体部3との間でデータ転送を行うマイコン5としてコンピュータを機能させるデータ転送プログラムであって、
インタフェースの信号線に外部から印加される電気的なノイズによる異常データを検出するマイコン5と、
異常データの長さが1フレーム以下である場合は、マイコン5に当該異常となったデータを再度USBメモリ2から読み出させ、異常データの長さがイフレームを超えてマスク可能な時間以下である場合は、マイコン5に当該異常データの次のデータをUSBメモリ2から読み出させ、異常データの長さがマスク可能な時間を超える場合は、マイコン5にリセット動作を行わせてUSBメモリ2の先頭からデータを読み出すように制御するマイコン5として、コンピュータを機能させることを特徴とするデータ転送プログラム。
(Supplementary Note 2) A data transfer program for causing a computer to function as the
A
If the length of the abnormal data is 1 frame or less, the
このデータ転送プログラムによれば、ノイズの影響の大きさ(長さ)によって再送信、読み飛ばし(マスク)、リセットと、動作を変更することができるのでのノイズの影響を少なくすることができる。また、データが異常であるか否かでノイズ印加の検出を行い、データの扱いを変更しているのみであるので、ハードウェアの追加等が不要となり、開発コストを抑えながらノイズの影響を少なくすることができる。 According to this data transfer program, it is possible to reduce the influence of noise because the operation can be changed, such as retransmission, skipping (masking), and reset, depending on the magnitude (length) of the influence of noise. In addition, noise application is detected based on whether or not the data is abnormal, and only the handling of the data is changed. This eliminates the need for additional hardware and reduces the impact of noise while reducing development costs. can do.
なお、前述した実施例は本発明の代表的な形態を示したに過ぎず、本発明は、実施例に限定されるものではない。すなわち、本発明の骨子を逸脱しない範囲で種々変形して実施することができる。 In addition, the Example mentioned above only showed the typical form of this invention, and this invention is not limited to an Example. That is, various modifications can be made without departing from the scope of the present invention.
1 USB機器
2 USBメモリ(デバイス)
3 本体部(ホスト)
5 マイコン(データ転送手段、検出手段、制御手段)
1
3 Main body (host)
5 Microcomputer (data transfer means, detection means, control means)
Claims (7)
前記インタフェースの信号線に外部から印加される電気的なノイズの影響による異常データを検出し、前記異常データの長さが予め定めた第1の時間以下である場合は、当該異常となったデータを再度前記デバイスから読み出し、前記異常データの長さが前記第1の時間を超えて予め定めた第2の時間以下である場合は、当該異常データの次のデータを前記デバイスから読み出し、前記異常データの長さが前記第2の時間を超える場合は、リセット動作を行ってデバイスの先頭からデータを読み出すことを特徴とするデータ転送方法。 A data transfer method between a device and a host using an interface defined in the USB protocol,
When abnormal data due to the influence of electrical noise applied from the outside to the signal line of the interface is detected and the length of the abnormal data is equal to or shorter than a predetermined first time, the abnormal data Is read from the device again, and when the length of the abnormal data exceeds the first time and is equal to or shorter than a predetermined second time, the next data of the abnormal data is read from the device, and the abnormal data When the data length exceeds the second time, the data transfer method is characterized in that the data is read from the head of the device by performing a reset operation.
前記インタフェースの信号線に外部から印加される電気的なノイズによる異常データを検出する検出手段と、
前記異常データの長さが第1の時間以下である場合は、前記データ転送手段に当該異常となったデータを再度前記デバイスから読み出させ、前記異常データの長さが前記第1の時間を超えて第2の時間以下である場合は、前記データ転送手段に当該異常データの次のデータを前記デバイスから読み出させ、前記異常データの長さが前記第2の時間を超える場合は、前記データ転送手段にリセット動作を行わせてデバイスの先頭からデータを読み出すように制御する制御手段として、前記コンピュータを機能させることを特徴とするデータ転送プログラム。 A data transfer program for causing a computer to function as data transfer means for transferring data to and from a device using an interface defined in the USB protocol,
Detecting means for detecting abnormal data due to electrical noise applied from the outside to the signal line of the interface;
When the length of the abnormal data is equal to or shorter than the first time, the data transfer unit is caused to read the abnormal data again from the device, and the length of the abnormal data is equal to the first time. If it is less than or equal to the second time, the data transfer means reads the next data of the abnormal data from the device, and if the length of the abnormal data exceeds the second time, A data transfer program that causes the computer to function as control means for controlling the data transfer means to perform a reset operation so as to read data from the head of the device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008037265A JP5022939B2 (en) | 2008-02-19 | 2008-02-19 | Data transfer method, data transfer program, and recording medium storing data transfer program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008037265A JP5022939B2 (en) | 2008-02-19 | 2008-02-19 | Data transfer method, data transfer program, and recording medium storing data transfer program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2009199140A true JP2009199140A (en) | 2009-09-03 |
JP5022939B2 JP5022939B2 (en) | 2012-09-12 |
Family
ID=41142602
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008037265A Expired - Fee Related JP5022939B2 (en) | 2008-02-19 | 2008-02-19 | Data transfer method, data transfer program, and recording medium storing data transfer program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5022939B2 (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07212836A (en) * | 1994-01-25 | 1995-08-11 | Sanyo Electric Co Ltd | Digital cordless telephone equipment |
JPH0945017A (en) * | 1995-08-01 | 1997-02-14 | Matsushita Electric Ind Co Ltd | Error data processing apparatus |
JPH1117855A (en) * | 1997-06-23 | 1999-01-22 | Canon Inc | Picture processor and control method for the same |
JP2001223858A (en) * | 2000-02-09 | 2001-08-17 | Nisca Corp | Image reader and transmission method for image data |
JP2002373036A (en) * | 2001-06-15 | 2002-12-26 | Nec Computertechno Ltd | Usb equipment |
JP2003091502A (en) * | 2001-09-18 | 2003-03-28 | Sanyo Electric Co Ltd | Data communication device |
-
2008
- 2008-02-19 JP JP2008037265A patent/JP5022939B2/en not_active Expired - Fee Related
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07212836A (en) * | 1994-01-25 | 1995-08-11 | Sanyo Electric Co Ltd | Digital cordless telephone equipment |
JPH0945017A (en) * | 1995-08-01 | 1997-02-14 | Matsushita Electric Ind Co Ltd | Error data processing apparatus |
JPH1117855A (en) * | 1997-06-23 | 1999-01-22 | Canon Inc | Picture processor and control method for the same |
JP2001223858A (en) * | 2000-02-09 | 2001-08-17 | Nisca Corp | Image reader and transmission method for image data |
JP2002373036A (en) * | 2001-06-15 | 2002-12-26 | Nec Computertechno Ltd | Usb equipment |
JP2003091502A (en) * | 2001-09-18 | 2003-03-28 | Sanyo Electric Co Ltd | Data communication device |
Also Published As
Publication number | Publication date |
---|---|
JP5022939B2 (en) | 2012-09-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4869234B2 (en) | Signal source device | |
KR102393427B1 (en) | Semiconductor device and semiconductor system | |
JP5271532B2 (en) | Video transmission system | |
JP2008219796A (en) | Data reproduction apparatus and transmitter | |
US10432230B2 (en) | Error detection or correction of a portion of a codeword in a memory device | |
JP4964940B2 (en) | Data protection method and system, storage device, and storage device controller | |
JP2010522406A (en) | System and method for preventing errors in storage media | |
US8151136B2 (en) | Method and device for correcting code data error | |
JP2007174041A (en) | Video encoding device, video encoding method, and electronic equipment using the video encoding device | |
JP5022939B2 (en) | Data transfer method, data transfer program, and recording medium storing data transfer program | |
JP2010027163A (en) | Semiconductor memory controller, semiconductor memory system, and recording/reproducing method for the semiconductor memory system | |
JP2010122743A (en) | Hdmi receiver | |
JP2010252107A (en) | Semiconductor integrated circuit device | |
US7444581B2 (en) | Error handling of storage device data in real time systems | |
JP2004297666A (en) | Data encoding method and data encoding apparatus | |
JP4178915B2 (en) | Electronics | |
JP2009199141A (en) | Data transfer method, data transfer program and recording medium storing data transfer program | |
JP5588555B2 (en) | Video transmission device | |
CN110248238B (en) | Limited memory bandwidth system and method for dynamically limiting memory bandwidth | |
WO2010125616A1 (en) | Coded stream decoding apparatus | |
TW394887B (en) | ATAPI interface control circuit and DVD player for this interfere control circuit | |
JP2010122742A (en) | Hdmi data generating device, data recorder, and firmware recording medium | |
JP6973402B2 (en) | Transmitter, transmitter, receiver and receiver | |
JP2010277651A (en) | Key data recording system and reproducing device | |
WO2015151779A1 (en) | Electronic device and method for determining cable adaptability |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20101213 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120229 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120306 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120427 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20120522 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20120618 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20150622 Year of fee payment: 3 |
|
LAPS | Cancellation because of no payment of annual fees |