Hey guys,
I'm studying how to do hardware SPI because I don't think doing it in software is going to be fast enough to write to a DAC at the sampling rates I need.
I've already discovered that to do hardware SPI I need to connect my DAC to specific pins. SPI may use any or all of the following:
D10 - CS aka Chip Select aka SS aka Slave Select
D11 - SDI aka ??? aka MOSI aka Master Out Slave In aka Output
D12 - ??? aka ??? aka MISO aka Master In Slave Out aka Input
D13 - CLK aka SLK aka Serial Clock
What I need to know is this:
-
Do I need to connect pin 10 to the DAC, if it is the only thing I am communicating with? Could I stick a pullup/pulldown resistor on the DAC's CS pin instead to keep it eneabled?
-
If I can get away without connecting pin 10 to the DAC, can I put it to other use without issue, or will the hardware SPI mess with the pin?
-
Question 2 applies to pin 12 as well. The DAC has no way to send data back to the atmega, so that pin will be connected to nothing. Can I use it for something else without screwing up my communications, and without the communications messing with whatever's on the pin?