[ Main Page ]

Analog Discovery

Tipsというほどでもないが、音声帯域のファンクションジェネレータのデバッグの際に使用して非常に使いやすかったので おすすめとして一項目設けた。DIGILENTというアメリカの会社が製造している PC用デジタルオシロスコープ+ファンクションジェネレータ+ロジックアナライザ+パターンジェネレータ+電圧計+スペクトラムアナライザ+ネットワークアナライザで、 校正は出来ないので、商用としては使えないが、実験・研究用途には非常に重宝する。日本だと、有名どころで秋月電子通商で購入できる。 学生価格で購入したい場合は手続きがいるようである。
初代購入後にしばらくして2代目がほぼ同価格出たので、そこだけは少し残念であったが、それを補って余りある仕事をしてくれたと思う。

別項目で挙げた機械の製作の時に使用していた様子。DACはMCP4922を使い、差動アンプによりバイポーラの出力としている。
DIO 0がラッチ、DIO 1/2/3はSPIのDATA/CS/SCLKにあたる。Arduinoは通常16MHzだが、水晶発振子を20MHzにして、タイマでSPIを駆動させると、12bitのDACで 最高125kHz程度までは動かすことが出来るが、それ以上になると、DACの精度を落とすかパラレルDACを使う必要が出てくる。
最初はただのタイマに呼び出される関数内でラッチも呼んでいたが、ラッチまでのクロックが時々前後し、ジッタがかなり出てしまうため、 DACのラッチはタイマでハード的に駆動させたところ、ほぼジッタは消失し、予想通りの出力となるようになった。

Rule of Open-Source Programming #34:

Every successful project will eventually spawn a sub-project

    -- Shlomi Fish
    -- "Rules of Open Source Programming"

> This reminds me of Paul Graham's articles, in which he claims that LISP
> programmers are better. But why is it so (whether or not you agree to
> the conclusion)? There are at least two opposite reasons: 1. Because
> programmers that learned LISP become better 2. Because good programmers
> prefer LISP when they come to know it.

No. 1 is true, naturally. No. 2 is not true - I know LISP but I prefer Perl. 
Other like Python, etc. The reasons I don't prefer LISP are:

1. The standards of Common LISP and Scheme don't define anything practical.
2. LISP is at the moment incredibly verbose.
3. As Larry Wall noted, all LISP code comes in parenthesis and so it all looks 
the same. (Perl is the exact opposite in this regard).
4. I cannot make heads nor tails of serious LISP code. Many LISPers create so 
many macros and use them along with regular LISP code, so you keep having to 
refer to the previous definitions, and make a lot of research to get you 
started.

SICP Scheme is easy and fun. But serious LISP code can take too much time to 
understand. OTOH, recently I had little problem reading the source code of 
other Perl programmers, and extending it or fixing bugs. (likewise for 
Python).

    -- Shlomi Fish
    -- Post to Linux-IL ( http://www.mail-archive.com/linux-il%40cs.huji.ac.il/msg39629.html )


Powered by UNIX fortune(6)
[ Main Page ]