聴覚実験用にトーンバーストを出力する機器が必要になり、予算がなかったため急遽開発したものであるが、その後、 L6470(ステッピングモーターコントローラ)の制御やSDカードの再生機能も追加した。DACには、比較的入手容易なMicrochipのSPI DAC (MCP4922)を 使用し、後段には多段のLCフィルタをアンチエイリアシングフィルタとして配置し、出力を可変できるようにPGA2311も載せた。 アナログ電源はDCDCコンバータを使用して、USBのみの給電で基本まかなえるようにした。
KiCadで製作した基板、Arduinoプログラム本体、ProcessingによるGUIがある。FatFsは、ソフトウエアモードでのSPIピン指定のため、 オリジナルのバージョンでは動作せず、置き換える必要があるので注意。
ABR、VsEP用のGUIがある。SELECT COM PORTでポートを選び、リレーが鳴ることでGUIと接続されたことが確認出来るようにしてある。 古いマシンでWindowsXPを使う場合は、SP3でJava 7を入れた状態でprocessing-2.1.1でしか動作しないので注意する。
SD カード再生機能やモータドライバコントローラを持つファームウエア(WDOSC 60p1 以降)と、 ABR 波形生成機能のみの初期ファームウエア(WDOSC 22p1)がある。DAC のトリガはいずれもハードウエア機能によるが、 試作機と基板で端子が異なるため、ファームウエアのバージョンにより、ショートするピンの位置が異なる。 試作機に関しては、プログラマブルアッテネータ(PGA2311)の SPI端子及び L/R が異なるため、 別のバージョン (WDOSC 23p0LB) を用意した。半固定抵抗で、LPF 以降のゲインは4Vpp(± 10%;4kHz) になるように調整すると良い。
ArduFgx@SF.NET
最新バージョンのアーカイブはしていないので、gitからどうぞ。
発振モードでは、大きく分けて連続出力(発振)モードと、内部トリガ間欠出力モード、外部トリガ間欠出力モードがある。 始めの状態では、連続出力モードで、stで開始、tpで停止である。トリガモードでも、stで開始させないとトリガされない。 コマンドパラメータは=数字で先に引数を入力してからコマンドを入れる。
$ reset
. reset
<< Programmable Triggered Function Generator >>
Version: 60p1 Build: Aug 12 2017, 20:26:45
setup(): Initializing...
$
<< Programmable Triggered Function Generator >>
Version: 60p1 Build: Aug 12 2017, 20:26:45
setup(): Initializing...
$ mo
. mo
*** -60dB att -> ON. ***
$ mf
. mf
*** -60dB att -> OFF. ***
$
<< Programmable Triggered Function Generator >>
Version: 60p1 Build: Aug 12 2017, 20:26:45
setup(): Initializing...
$ status
. status
[ Current Status ]
Trigger Mode : Continuous
Wave Type : Sine Wave
Polarity : Single Mode
Time Period : 10us
Sampling Rate : 100kHz
Tone Frequency : 1kHz
Flat duration : 10ms
Internal Trigger : 100ms
PGA Gain [dB] : 0, 0
$ =4
. =4
Parameter = 4
$ freq
. freq
Frequency = 4kHz (@Fs=100kHz), Updating table ... [Flat][Rise][Fall] done.
Sampling Rate : 100kHz
Tone Frequency : 4kHz
$ status
. status
[ Current Status ]
Trigger Mode : Continuous
Wave Type : Sine Wave
Polarity : Single Mode
Time Period : 10us
Sampling Rate : 100kHz
Tone Frequency : 4kHz
Flat duration : 10ms
Internal Trigger : 100ms
PGA Gain [dB] : 0, 0
$ st
. st
Trigger : Started.
$
聴覚実験、ABRのために出力毎に位相を反転させるモード。Fs=100kHz。usでサンプリングレートを指定するが、Hzでなくてサンプル毎の間隔[us]*2で指定。 サンプリングレートは他のパラメータより先に指定しないと、テーブルの波形が更新されないので注意。
alt
trigext
=20
us
=8
freq
=3
fl
start
Fs=125kHz。
alt
trigext
=16
us
=25
freq
=3
fl
start
内部トリガはms単位で指定。
<< Programmable Triggered Function Generator >>
Version: 60p1 Build: Aug 12 2017, 20:26:45
setup(): Initializing...
$ =1000
. =1000
Parameter = 1000
$ trig
. trig
Internal Trigger = 1000ms
$ tint
. tint
*** Trigger Mode -> Internal. ***
$ ss
. ss
[ Current Status ]
Trigger Mode : Internal Trigger
Wave Type : Sine Wave
Polarity : Single Mode
Time Period : 10us
Sampling Rate : 100kHz
Tone Frequency : 1kHz
Flat duration : 10ms
Internal Trigger : 1000ms
PGA Gain [dB] : 0, 0
$ st
. st
Trigger : Started.
$
<< Programmable Triggered Function Generator >>
Version: 60p1 Build: Aug 12 2017, 20:26:45
setup(): Initializing...
$ ss
. ss
[ Current Status ]
Trigger Mode : Continuous
Wave Type : Sine Wave
Polarity : Single Mode
Time Period : 10us
Sampling Rate : 100kHz
Tone Frequency : 1kHz
Flat duration : 10ms
Internal Trigger : 100ms
PGA Gain [dB] : 0, 0
$ =-10
. =-10
Parameter = -10
$ g1
. g1
PGA Raw Value : 172, 192
PGA Gain [dB] : -10, 0
$ g2
. g2
PGA Raw Value : 172, 172
PGA Gain [dB] : -10, -10
$ ss
. ss
[ Current Status ]
Trigger Mode : Continuous
Wave Type : Sine Wave
Polarity : Single Mode
Time Period : 10us
Sampling Rate : 100kHz
Tone Frequency : 1kHz
Flat duration : 10ms
Internal Trigger : 100ms
PGA Gain [dB] : -10, -10
$
信号開始のトリガはEXT1に出力しているが、ランプ後の刺激時にEXT2から別のトリガを出すようにしているので、 実際の刺激実験のトリガはEXT2を使う。ランプでは殆ど刺激されないので、EXT1でトリガをとって加算平均をとっても脳波には何も出ない。
If we want to have any kind of confidence that the hash is really unbreakable,
we should make it not just longer than 160 bits, we should make sure that it's
two or more hashes, and that they are based on totally different principles.
And we should all digitally sign every single object too, and we should use
4096-bit PGP keys and unguessable passphrases that are at least 20 words in
length. And we should then build a bunker 5 miles underground, encased in
lead, so that somebody cannot flip a few bits with a ray-gun, and make us
believe that the sha1's match when they don't. Oh, and we need to all wear
aluminum propeller beanies to make sure that they don't use that ray-gun to
make us do the modification _ourselves_.
-- Linus Torvalds
-- Message to the git mailing list ( http://lwn.net/Articles/132513/ )
You'll feel devilish tonight. Toss dynamite caps under a flamenco dancer's
heel.