Support Forum

Share your projects and post your questions

Register   or   Sign In
The Forum

No SPI clock -> no DAC output

1 Views - Created 9 days ago

9 days ago

Posted by:
josh

josh Avatar

Location:
Cambridge, UK

Hello all,

I wonder whether someone could help troubleshoot the ExpanderPi2 that I'm using. The idea is to use the DAC output to control a device with a TTL input.

I've connected the ExpanderPi2 up to my Raspberry Pi 2 (model B v1.1) and followed the ABE instructions for setting up the python library and enabling SPI:

https://www.abelectronics.co.uk/kb/article/23/python-library-and-demos
https://www.abelectronics.co.uk/kb/article/2/spi-and-raspbian-linux-on-a-raspberry-pi

To be clear: SPI is enabled on the raspberry pi (both in
/boot/config.txt
and in sudo raspi-config) and I've rebooted the device since making those changes.

When I run the 'demo_dacwrite.py' script I see no movement on either DAC output, and no movement on the header pins for SPI_CLK, SPI_MOSI, SPI_MISO, or SPI_CE1_N.

The demo script is certainly running because I added a line to print the set voltage. This means that the spidev.SpiDev object was correctly initialised and opened.

Any suggestions why SPI would be inactive?

Thanks in advance for your support!

9 days ago

Posted by:
josh

josh Avatar

Location:
Cambridge, UK

PS: apologies for mistakes in formatting, apparently I can't edit the post.

9 days ago

Posted by:
andrew

andrew Avatar

Location:
United Kingdom

andrew Twitter  andrew Website  

Hello Josh

Are you using the latest version of Raspberry Pi OS bookworm or an older version?

I have just tried setting up a fresh installation of Bookworm on a Raspberry Pi 2 (model B v1.1) and it appears to be working ok with an Expander Pi and our Python library.

If you are getting no movement on the SPI header pins that would suggest an issue with the Raspberry Pi rather than the Expander Pi.

Do you have a spare Raspberry Pi you could test with or a spare SD card you could use to install a fresh version of Raspberry Pi OS. This would allow you to narrow the problem down to either the Raspberry Pi or the operating system.

Sign in to post your reply

Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.