Hi Everyone,
First post! I'm very new to the Arduino/microcontrollers in general (got my first Uno in the Sparkfun Inventor's kit via mail two days ago) and I'm loving it so far. My background isn't in EE/embedded hardware, so I was pleasantly surprised at how easy the Arduino is to program. Since then, I've worked through the tutorials and understand the basics of analogue & digital I/O on the Arduino, but now I have a question I can't seem to find an answer to.
One of the reasons I originally became interested in programming the Arduino is that I want to use it to read data from this, a 13bit absolute rotary encoder that uses the SSI protocol. For my project, I need 12+ encoders, and the Arduino seems like a great way of keeping the hardware physically small and the setup portable without breaking the bank.
After some Googling, I came across this post from 2006, which seems to try to do the same thing I'm looking to do. The only hang-up is that there are no mentions of Clock +/- signals, which are necessary for timing. I'm assuming that the OP was getting his clock signal from another piece of hardware, but I would love to get this encoder to read using only the Arduino, since I do not really know what I would need to generate a clock signal. Is this possible to do?
After some additional searching, someone suggested that it would be possible to "fake" a clock signal by doing something like in the following code, but this did not seem to work.
void loop()
{
 if (digitalRead(CLOCK_MINUS_PIN)==LOW && digitalRead(CLOCK_PLUS_PIN)==HIGH)
 {
  digitalWrite(CLOCK_MINUS_PIN,HIGH);
  digitalWrite(CLOCK_PLUS_PIN,LOW);
 }Â
 else
 {
  digitalWrite(CLOCK_MINUS_PIN,LOW);
  digitalWrite(CLOCK_PLUS_PIN,HIGH);
 }
 delayMicroseconds(10);
I also found the Arduino SPI library, but the problem is that the SPI protocol seems to lump everything into 1 clock instead of 2.
Does anyone have any suggestions as to how this project can be done? Any help would be greatly appreciated!
Thanks!
arduinoRobo