Does anyone know of example code for using the ATMEGA hardware SPI interface for high-speed shifting-in of data from a parallel-in serial-out shift register? I want to use 74hc165 and prefer the Ardunio programming environment.
I have looked around on the web and have found examples for software-based shift-in and using the SPI for shift-out, but nothing really on SPI and shift-in. My project is for midi-fying old organs, so I need 88 key inputs for the keyboards and maybe a dozen more key contacts for settings - let's say 128 inputs max. The software method is probably fast enough to scan keys for human music input, but I would like to use the hardware method since you get a nice interrupt when data is available.
I know muxing will be suggested but usually organ keyboards have a common ground buss so it wouldn't work, unless you can break up the buss, but that break the original functionality.
Thank you!
Arduino SPI for shifting in
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- uhclem
- Posts: 107
- Joined: Sun Jul 08, 2007 6:03 pm
Re: Arduino SPI for shifting in
This is the best I have found:
http://softsolder.com/2009/07/18/arduin ... l-data-io/
I'll try it out and see if I can get the input portion to work.
http://softsolder.com/2009/07/18/arduin ... l-data-io/
I'll try it out and see if I can get the input portion to work.
Please be positive and constructive with your questions and comments.