We’re rewarding the question askers & reputations are being recalculated! Read more.

New answers tagged

2

You should not manually control the SD card's CS pin. By doing so you are confusing both the library and the SD card. There is a special operation with SD cards in "SPI" mode that isn't part of the SPI standard as part of the initialization routine whereby the master (the Arduino) must send at least 72 clock pulses to the card with the CS pin held HIGH. ...


-1

Yes, you can. They use ATmega328 / Atmega328P microcontrollers, which are basically the same. (The differencies of those microcontrollers are about Brown Out Detection - how they could be set to react on too low voltage. No problem in nearly any Arduino operation.) The boards differ mainly in the board size and places for pins.


0

It fires after a single byte has been sent or received (the two are one and the same). This is because there is only room for one byte in the buffer, so you need to get it out of that buffer (or put a new one in) after each 8-bit transfer.


1

I thin the following is happening: The MCP transmits 1 measurement per SPI transaction, which consists of activating chip select, reading data and deactivating chip select. To distinguish between different transactions, the time between deactivation and reactivation of chip select need to have a bit delay between them. Currently your code runs really fast, ...


1

My rough idea is that I should put CS low, then read two bytes using SPI.transfer() twice, and then bring CS high again. Is that correct? Yes, that is correct. But looks like the AD7476 doesn't have any buffer, so I guess timing must be really precise in order to not miss any bit? No. The conversion is controlled by the SPI clock. The ADC is a ...


Top 50 recent answers are included