I'm trying to implement a volume dial. I've got a potentiometer hooked into ADC 0832B (http://www.ti.com/lit/ds/symlink/adc0832-n.pdf), timing diagram below:

enter image description here

When I turn the volume dial, I want an interrupt to happen, then I'll start reading the data. Is there any way this chip can issue an interrupt?

I also read that SPI on rpi does not work in slave mode, so does that mean the adc cannot initiate the data transmission?

The only other way I can think of handling this is by creating a new thread which continuously polls the adc. This doesn't seem like an efficient solution though.

Do ADC chips normally have some kind of interrupt feature? Or is threads the normal way of handling this?


1 Answer 1


The datasheet will specify if the chip generates an interrupt or not. I don't see why it would.

The normal procedure is assert SPI slave select and send command (which triggers a reading) then read result and de-assert SPI.

I guess you could poll ten times a second or so. The load on the Pi would not be measurable.

Why not just use a rotary encoder like most other users?

  • Rotary Encoder! Just looked that up and that seems wayyyyy better. That'll be easy to use with interrupts too. Thanks!
    – Nick Lang
    Commented Oct 25, 2016 at 20:25
  • @NickLang I know this is an old question now, but I've written a kernel driver for using a rotary encoder as a volume control, source and instructions can be found here if you're interested: github.com/JamesGKent/rotary_volume
    – James Kent
    Commented Apr 6, 2018 at 15:17
  • @JamesKent amazing! i'll check it out
    – Nick Lang
    Commented Apr 6, 2018 at 17:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.