New answers tagged

1

Finely i try the below code for serial mode. it's worked perfectly... type def union { unsigned char BYTE; struct { unsigned BIT0:1; unsigned BIT1:1; unsigned BIT2:1; unsigned BIT3:1; unsigned BIT4:1; unsigned BIT5:1; unsigned BIT6:1; unsigned BIT7:1; }; }ByteToBit; ...


1

The ADXL345 uses SPI_MODE3 and DPS310 the SPI_MODE0. The libraries for these devices don't use SPI transactions, but set the settings only in begin(), so they can't be used together. Your options to solve this is either to put one sensor on software SPI or to put one or both sensors on I2C. The ADXL345 can be used as I2C device. Its library supports I2C with ...


4

The image is incorrect, unfortunately. The SPI pins are below: PB0 - #SS PB1 - SCK PB2 - MOSI PB3 - MISO


0

according to this : it's more similar to I2C than SPI. anyway, it's just 2 wire custom serial interface. you can use any 2 GPIOs for this purpose. for sending a byte, you have to: initialize 2 GPIOS (CLK_IO and DAT_IO) to output, high. set DAT_IO low wait at least 1us (according to datasheet ver 1.1, page 18) then set CLK_IO low. place the D0 bit value on ...


1

An SD card has two interfaces: The SPI interface is what is used by the Arduino (it is rather slow). The second one is a parallel interface, which is capable of way bigger transmission speed. It is most likely, that the camera uses that interface, since it has to transmit rather big data packets in a short time. But as I remember some pins are used for both ...


2

I have a lengthy reference question about SPI which may help you. To transfer outwards you do not need to use an interrupt. Nor is it polled. The data is simply placed in the SPI register and the hardware clocks the data out at the defined SPI rate. To transfer inwards you are just reading the register. However to know when you need to read it, you would ...


Top 50 recent answers are included