Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

asymmetrical read / write on SPI device

10 views
Skip to first unread message

Anonymous Coward

unread,
Apr 17, 2011, 9:53:20 AM4/17/11
to
Hi,

I have a SPI device (SCP1000 pressure sensor) which I need to send 8bits and
read 16 bits. How do I program this using SPI.ReadWrite()?

I tried:

byte[] arrInput = new byte[2];
byte[] arrOutput = new byte[2];

arrInput[0] = (byte)((nAddress << 2) | (0x00));

m_SPI.WriteRead( arrInput, arrOutput );

this didn't work.

I also tried using WriteRead() with UInt16[] as parameters but that didn't
work either.

Thanks in advance.


0 new messages