Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
You are viewing an older revision! See the latest version
Homepage
LPC8xx Internal Analog Comparator library¶
LPC800シリーズ(LPC812, LPC824等)に内蔵されているコンパレーター(電圧比較器)を使うライブラリです。
初期化¶
ACMP acmp(vp, vn, hys, lad);
- vp = コンパレーター正入力(ACMP::LADDER / ACMP_I1~3 / BANDGAP)
- vn = コンパレーター負入力(ACMP::LADDER / ACMP_I1~3 / BANDGAP)
- hys = ヒステリシス選択(ACMP::NONE, HYS5mV, HYS10mV, HYS20mV)
- lad = 電圧ラダー選択(0~31)
読み取り¶
acmp.read();
返り値
- 1: vp > vn
- 0: vp < vn
割込み¶
acmp.rise(*func);
vp > vn に検出した時
acmp.fall(*func);
vp < vn を検出した時
Sample¶
Import programACMP_sample
LPC8xx Internal Analog Comparator
