CH32F103/DSO150/FINRSI coupling selection difference

 There is another difference with the original DSO : CPLSEL pin


With the original DSO, the CPLSEL (PA5) is an analog pin which gives the info about the selected coupling.

When reading it with the ADC, you get :

-   0 => GND

-  ~ 2024=> DC

-  4095 => AC (not necessarily the right values, but the principle stands).


The FINRSI clone is different. It uses the CPLSEL pin *AND * another pin the "KEY" pin (PB12).

That pin  was used a long time ago but is no longer needed as the threshold detection is done using the ADC watchdog

Both CPLSEL and KEY are pull up

GND: 

  CPLSEL=1

  KEY=1

AC:

   CPLSEL= 1

   KEY= 0

DC

  CPLSEL=0

  Key=1

So it wastes one pin, but makes the reading much much more simple.



NB: The CH32 only has one ADC, that may explain.

Comments

Popular posts from this blog

Component tester with STM32 : Part 1 ADC, Resistor

Fixing the INA3221

INA3221, weird wiring