Search results

  1. E

    Lots of buttons for x-plane

    Expanding the GPIO count Hi, I have experience of using multiple MCP23S107's - the SPI variant of the same chip you mention, and they work great - I currently have 7 of them hooked up to a Pi and via an ISR can reliably read 112 gpio's. I am in the process of porting this python code to C on a...
  2. E

    phase shift PWM channels on FTM0 for LED dimming

    An alternate solution would be to offload the PWM function to a PCA9685 16 channel 12 bit chip - these natively support phase shifting of the outputs to not only reduce total power draw but to also minimise EMI -...
  3. E

    Port Expander compatibility - MCP23017 + Teensy 4.0

    Hi - I've used the SPI variant of these expanders - MCP23S17 and they work fine on the T4 and even with sub-optimal breadboard layout I have successfully overclocked them to 18MHz. In my use-case I am reading the outputs of ~20 rotary encoders using interrupts with this library...
  4. E

    Tensey 4.0 + Pi-4 Home Automation Perimeter Monitoring ....

    Take a look at https://github.com/sumotoy/gpio_expander - I have used that library with multiple MCP23S17 GPIO expanders on a T4 using interrupts to trigger reads from 112 end points. Originally wrote code in python running on a Pi to do this, but on a T4 it's 1000 times faster:)
  5. E

    measurement discrepancies when using multiple potentiometers?

    I'd have thought that you maybe are seeing spikes/noise and these may be affecting the instantaneous voltage being measured at each detent. You could try say reading the pins 3 times in succession and averaging the result to see if that resolves your issues, or alternatively ditch the analog...
  6. E

    port and toggle question T4

    What a great thread - only this week was I poring through the documentation to work out how to map the physical pins to the controlling registers, particularly with respect being able to handle fast interrupts on pin changes! This has at least given me a way in even though my programming skills...
  7. E

    how to add 2 more pot to this code

    sample code to simply read GPIO expander chip with interrupt Hi I've attached some test code that reads up to 8 rotary encoders sitting on SPI-0 at address 0 and using interrupt pin 9 - this has been tested and works on a Due and Teensy 4. It merely writes out to the serial port the encoder #...
  8. E

    how to add 2 more pot to this code

    If you want to interface physical rotary knobs to your software.... Not sure if I've got the wrong end of what you are trying to solve - If you want to have manual pots as per your picture, you could implement them with rotary encoders and capture the digital output to tweak/control whatever...
Back
Top