Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wiki/Manual/Schematic disagree on CE pins #1

Open
MauiJerry opened this issue Aug 5, 2019 · 3 comments
Open

Wiki/Manual/Schematic disagree on CE pins #1

MauiJerry opened this issue Aug 5, 2019 · 3 comments

Comments

@MauiJerry
Copy link

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

@MauiJerry
Copy link
Author

MauiJerry commented Aug 5, 2019

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/

@MauiJerry
Copy link
Author

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.

@hnwangkg-ezio
Copy link
Contributor

Yes, you are right, I will modify

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants