Hello, I have been trying to get the ISD 4004 to work with the Arduino. I have looked at an older post on this forum that deals with this subject however, it was not very clear with how the issues were solved. My main question right now is about the LSB_FIRST and MSB_FIRST settings for SPI and how they interact with the connected device. If you are using LSB_FIRST and use the SPI.transfer
command, will the Arduino reverse the bits? For example:
//NOTE: the ISD4004 first takes 16 address bits and then 8 command bits
//The code below would send one byte of the address bits
byte addr1 = 0b00000010;
byte addr2 = 0b00000000;
SPI.transfer(addr1); // assuming LSB_FIRST has been set in the SPI settings, will
// the arduino transfer 00000010 or 0100000000
Also, the datasheet says you must first transfer 16 address bits and then 8 command bits for a total of 24 bits. Is there a way I should transfer them all at once, or can I just send each byte using SPI.transfer(someByte)
? I was debating on using SPI.transfer16(someHexAddress)
to transfer the addresses however I was wary as I could not find much information about the command unlike SPI.transfer
.
Link to most recent datasheet for ISD 4004