|
Help with Arduino and SPI
I'm slowly learning Arduino, and I'd like some help interfacing to an SPI device. The device is connected to the proper pins on an Arduino Uno. I understand in concept how it works. I need to send it 16 bits: 8 bits to specify the register, and 8 to make it do something based on the tables in the reference document. And the most significant bit comes first. However, I'm a little hung up on the exact code to make it start doing something. I've only gotten as far as defining all the registers as constants by their hex values. Is that correct? Can anyone who is familiar with such things perhaps provide a simple code example? I searched and couldn't find anything similar that made sense to me.
__________________
Teacher/Engineer/Machinist - Team 696 Circuit Breakers, 2011 - Present
Mentor/Engineer/Machinist, Team 968 RAWC, 2007-2010
Technical Mentor, Team 696 Circuit Breakers, 2005-2007
Student Mechanical Leader and Driver, Team 696 Circuit Breakers, 2002-2004
Last edited by sanddrag : 18-05-2011 at 01:35.
|