CH32Vには、OPA が使えるのですが、OPAとはは、 Operational Amplifier/Comparatorということでオペアンプが入っているみたいですね。
2.5.17 Operational amplifier/comparator (OPA)
The product has built-in 2 groups of operational amplifiers/comparators, and the internal selection is linked to
the ADC and TIMx peripherals. Its input and output can be selected by changing the configuration to select
multiple channels. It supports to amplify the external analog small signal and send it to the ADC to realize the
small signal ADC conversion. It can also complete the signal comparator function. The comparison result is
output by GPIO or directly connected to the input channel of TIMx.
CH32V203 は dual OPA と書かれていています。
OPAの特性。
CH32V203 のピン配置をデータシートより抜き出してみました。
| PIN | Alternate |
|---|---|
| PA2 | OPA2_OUT0 |
| PA3 | OPA1_OUT0 |
| PA4 | OPA2_OUT1 |
| PA5 | OPA2_CH1N |
| PA6 | OPA1_CH1N |
| PA7 | OPA2_CH1P |
| PB0 | OPA1_CH1P |
| PB1 | OPA1_OUT1 |
| PB10 | OPA2_CH0N |
| PB11 | OPA1_CH0N |
| PB14 | OPA2_CH0P |
| PB15 | OPA1_CH0P |
OPAのOUT0,OUT1,CH1N,CH1P,CH0N,CH0P があるらしい。
使い方
とはいってもよくわからないな・・・
以下のようなメモ書きのようなものがみつかりました。
これには、以下のように配線が書かれています。
CH32V の外部に帰還抵抗などをくっつけていく必要があるようです。
試しに以下のように回路を作ってみました。JLCPCB で基板を作ってみるつもりです。さて、どうなるか?



