waveshareteam/High-Precision-AD-DA-Board

Wiki/Manual/Schematic disagree on CE pins

Opened this issue · 3 comments

The wiki and manual says CS0 = Pin 15 (aka gpio22) CS1 = Pin 16 (aka gpio 23)
Schematic says CE0 = Pin 24 (gpio 8) CE1 = Pin 26 (gpio 7)
Schematic numbers correspond to convention of using these for SPI CE0/1
My kiln control relay on gpio22 ripples on/off when the A/D chip is read, so I am going to say the wiki/manual are wrong and schematic is right.
Comments at head of python code also indicate this is how board is actually connected

Ok more confused by the table in Raspberry Pi/AD-DA/readme.txt
it says

ADC_CS -> 15 (Physical, BCM: GPIO. 3, 22)

what is that formatting? bcm=3 gpio=22 or bcm=22 gpio=3?
I think you mean that AD chip select is on physical pin 15, which is BCM 22.
Most GPIO tables published now call this GPIO22 (eg. run "pinout" from command line)
or see the rPi doc page : https://www.raspberrypi.org/documentation/usage/gpio/

Found it!!
Your board and docs may be confusing but there is also an error in configuration of SPI (spidev)
in the config.py file you initialize
SPI = spidev.SpiDev(0,0)
but you never tell SPI that your code will handle chip select.
If you add the line:
SPI.no_cs=True
to each of the config.py files, it should make the problem go away
Without doing this, SPI will toggle its default CS0 line on each call to it.

Yes, you are right, I will modify